17

I am looking for a name for the following types of functions. Suppose that for function f, we have: $$f(x)=y_x$$ and $$f(f(x))=y_x$$ Is there any name for this property?

rose
  • 183

3 Answers3

18

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$

dtldarek
  • 37,969
  • 2
    I would add that this particular case is in fact a projection! – GPerez Feb 17 '15 at 23:01
  • @GPerez Which case? – dtldarek Feb 17 '15 at 23:08
  • 1
    OP. He has $f^2 = f$. – GPerez Feb 17 '15 at 23:18
  • The identity function is idempotent too :D – Thomas Feb 17 '15 at 23:59
  • @GPerez Why it is a projection? – dtldarek Feb 18 '15 at 07:18
  • The statement in the question (and the notion of idempotence) clearly only makes sense for unary functions. So the phrase "If you want an unary function" is misplaced, and you should instead rephrase that bullet point to only apply to those operators transformed (by supplying a fixed argument) into unary functions. – Marc van Leeuwen Feb 18 '15 at 08:21
  • @MarcvanLeeuwen I don't mind calling $\vee$ or $\max$ idempotent (I disagree that it doesn't make sense), but you are right, in the context of the question the second bullet was formulated silly, fixed now. Thanks for your consideration. – dtldarek Feb 18 '15 at 09:36
  • @dtldarek I thought projections were defined as a map onto a subset where the composition with itself is again the same map. Wikipedia says so too: http://en.wikipedia.org/wiki/Projection_%28mathematics%29 – GPerez Feb 18 '15 at 12:08
  • @GPerez In the terminology I'm used to projection implies some additional structure, as there is already term idempotence which takes care of the general case. – dtldarek Feb 18 '15 at 12:28
5

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.

Richard
  • 386
  • It is worth noting that the "computer science version" is just the ordinary idempotence, only applied to states (e.g. world state, or program state, server state, object state, whatever the context is). – dtldarek Feb 17 '15 at 23:04
1

A function that has the same result when applied once as it does when applied more than once is known as an idempotent function.