What is the proper term for a function where domain and codomain coincide?
E.g. in programming languages a function f : Int => Int or f : Double => Double. Thanks.
What is the proper term for a function where domain and codomain coincide?
E.g. in programming languages a function f : Int => Int or f : Double => Double. Thanks.
Suppose we have a function $f:S\to S$, that is $f$ is a function from $S$ with image (range) in $S$. Such a function is called an endomorphism endofunction (endo comes from the greek or latin word for "within"). Sometimes people use the term codomain to mean the image (range) of a function. If $S$ is finite and the image of $f$ is the whole set $S$, then $f$ is a bijection. If $S$ is infinite, the situation is somewhat more complicated.
Edit: Thanks for the correction.
I would like to add this as a comment, but I don't have enough reputation to do so.
A function $f:S\to S$ can be called an endomorphism in Set, and one doesn't have to worry about the structure-preservation that is implied by -morphism because sets have no additional structure to preserve.
However, it depends on the context: if I want to talk about any function $f:V\to V$, $V$ being a vector space, and I were to use the term endomorphism, it would be understood that $f$ is a linear transformation, because the morphisms in $K$-Vect are linear transformations.
I don't think there is a widespread term for that which is acceptable in all contexts, but a function $X\to X$ is sometimes called a function on $X$ or an operator on $X$ or a unary operation on $X$.