I am wondering what is the class of functions $f: \mathbb{R}\rightarrow\mathbb{R}$ such that $f(f(x))=f(x)$?

I think it should be:

  1. Constant Value functions
  2. the identity function
  3. absolute value function $|x|$

But I don't know if this is right or how to show it rigorously.

Any suggestions?

  • 5
    $\begingroup$ The magic word is: en.wikipedia.org/wiki/Idempotence $\endgroup$ – tabstop Feb 19 '14 at 4:07
  • $\begingroup$ Combine some of these three: $f(x)=x,x>0$, $f(x)=const, x<0$ $\endgroup$ – miracle173 Feb 19 '14 at 4:13
  • 4
    $\begingroup$ $f(x)=0,x \in \mathbb{Q}$, else $f(x)=\pi$. is a function that is not continous and has this property $\endgroup$ – miracle173 Feb 19 '14 at 4:18

Such functions can be described in the following way:

If $A$ is an arbitrary subset of $\mathbb{R}$ and $g:\mathbb{R} \setminus A \mapsto A$ an arbitrary funtion. Define

$$ f(x) = \left\{ \begin{array}{l l} x & \quad \forall x\in A\\ g(x) & \quad \forall x \not \in A \end{array} \right. $$

$f$ has this idempotency property.

Contrary for an $f$ with the idempotency property such an $A$ and $g$ can be found: $A:=f(\mathbb{R})$ and $g:=f \rvert _{\mathbb{R}\setminus A}$

| cite | improve this answer | |
  • $\begingroup$ so you're saying if $x$ $\not\in$ $A$ then just let $f(x)$ be some arbitrary element of $A$? $\endgroup$ – User112358 Feb 19 '14 at 4:33
  • $\begingroup$ @fatmattxle yes $\endgroup$ – miracle173 Feb 19 '14 at 4:34
  • $\begingroup$ This is a good answer! It is based on the following equivalent form of idempotency : "the image of $f$ is fixed pointwise by $f$". Clearly, what $f$ does to points other than in the image of $f$ is not material! $\endgroup$ – Karthik C Feb 19 '14 at 5:35

Here is a large family of such functions. Choose any function $g(x)$, defined on $(-\infty,0)$, that satisfies $g(x)\ge 0$ for all negative $x$. Then we define $$f(x)=\begin{cases} g(x) & x<0 \\ x & x\ge 0\end{cases}$$

The absolute value is an example from this family, corresponding to $g(x)=-x$. But any function with that condition will do, such as $g(x)=x^2$ or $g(x)=\sqrt{-x}$ or $g(x)=e^x$ or $g(x)=1+\sin x$.

| cite | improve this answer | |

Put $f\left( \mathbb{R} \right) = U \ne \emptyset $, then $\forall y \in U$, we have $f\left( y \right) = y$ by $f\left( {f\left( x \right)} \right) = f\left( x \right)$. We can call $U$ a collection of fixed points of $f$.

If a funtion $g$ maps $\mathbb{R}-U$ to $U$, then it satisfies $g\left( {g\left( x \right)} \right) = g\left( x \right)$.

For example, $f\left( x \right) = \left| x \right|$, we get $U = \left[ {0, + \infty } \right)$, luckily, $f$ maps $\left( { - \infty ,0} \right)$ to $U$.

And, if $U$ has exactly one (fixed) point, say $c$, i.e. $f(c)=c$, then $f$ must maps $\left( { - \infty ,\infty } \right) - \left\{ c \right\}$ to $\{c\}$. That is, $f$ is a constant value function.

| cite | improve this answer | |

Assuming $f^{-1}$ exists, $$f(f(x))=f(x)\\ \implies f^{-1}(f(f(x)))=f^{-1}(f(x))\\ \implies \boxed{f(x)=x}$$ This is the identity function, or, the inclusion map acting on $\mathbb{R}^1$.

| cite | improve this answer | |
  • 1
    $\begingroup$ (Assuming $f^{-1}$ exists.) $\endgroup$ – tabstop Feb 19 '14 at 4:05
  • $\begingroup$ @tabstop Yes, of course. Thank you. $\endgroup$ – user122283 Feb 19 '14 at 4:05
  • $\begingroup$ That's tricky because I didn't assume it exists $\endgroup$ – User112358 Feb 19 '14 at 4:07
  • 4
    $\begingroup$ This doesn't help when $f$ is not invertible, as in $f(x)=c$ for example. $\endgroup$ – Daryl Feb 19 '14 at 4:07
  • 3
    $\begingroup$ For many (if not all) interesting, non-trivial cases $f$ is not invertible. $\endgroup$ – Alt Feb 19 '14 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.