# Identity function

An**identity function**

*f*is a function which doesn't have any effect: it always returns the same value that was used as its argument.

Formally, if *M* is a set, we define the identity function id_{M} on \*M* to be that function with domain and codomain *M* which satisfies

- id
_{M}(*x*) =*x*for all elements*x*in*M*.

*f*:

*M*→

*N*is any function, then we have

*f*o id

_{M}=

*f*= id

_{N}o

*f*. In particular, id

_{M}is the identity element of the monoid of all functions from

*M*to

*M*.

When choosing *M* equal to the positive integers, one obtains the identity function Id(*n*), which is a multiplicative function considered in number theory.