What is this property called for a function? $f(f(x))=f(x)$
Such a function is called idempotent.
Some examples:
- The absolute value: $\operatorname{abs}: \mathbb{R}\to [0,\infty)$.
- Any lattice operation like $\max$, $\min$, $\cap$, $\cup$, $\gcd$, etc., can be transformed into an idempotent function. For example $f_1(x)=\max(0,x)$, $f_2(n) = \gcd(n, 60)$ and so on.
- Projections, e.g. $\pi_1\big((x,y,z)\big) = (0,y,z)$.
I hope this helps $\ddot\smile$
Idempotent functions
http://en.wikipedia.org/wiki/Idempotence
It is common in computer science, in which you may want the result of an operation to be the same no matter how many times someone performs it. This is especially important in web-apps.
In maths an example would be a projection of a vector into a lower dimensional space.