[Math] the name for a function whose codomain and domain are equal

abstract-algebracategory-theoryfunctionsterminology

What do we call a function whose domain and co-domain are the same set?

Edit:
While i expressed my question in terms of functions, domains and codomains, i was actually interested in the most abstract mathematical formulation for similar structures. Thus i accepted as the correct answer endomorphism that, being at the level of category theory, answers rather the question: What do we call a morphism from a mathematical object to itself? I could find this out just after getting some answers

Best Answer

Whilst an endomorphism is a morphism or homomorphism from a mathematical object to itself, the technical term for a function that has a domain equal to it's co-domain is called an endofunction.

NB: A homomorphic endofunction is an endomorphism.

Edit: From Wikipedia:

Let $S$ be an arbitrary set. Among endofunctions on $S$ one finds permutations of $S$ and constant functions associating to each $x \in S$ a given $c \in S$.

Every permutation of $S$ has the codomain equal to its domain and is bijective and invertible. A constant function on $S$, if $S$ has more than $1$ element, has a codomain that is a proper subset of its domain, is not bijective (and non invertible). The function associating to each natural integer $n$ the floor of $n/2$ has its co-domain equal to its domain and is not invertible.

Finite endofunctions are equivalent to directed pseudoforests. For sets of size $n$ there are $n^n$ endofunctions on the set.

Particular bijective endofunctions are the involutions, i.e. the functions coinciding with their inverses.

Related Question