1

Let $X$ be a metric space and $f:X\rightarrow X$ be such that $f(f(x))=x$, for all $x\in X$.

Then $f$

  1. is one-one and onto;
  2. is one-one but not onto;
  3. is onto but not one-one;
  4. need not be either.

From the given condition I have that $f^2=i$ where $i$ is the identity function. If $f$ itself is the identity function then the conditions are satisfied as well as $f$ is bijection. Is that the only such function or are there other possibilities ?

My guess is that it will be bijection i.e. option $1$ will be correct .

For see, if $$f(x_1)=y \ \text{and}\ f(x_2)=y \ \text{then} \ f(y)=x_1\ \text{and}\ f(y)=x_2$$ will be possible iff $x_1=x_2$. So this is injective.

Now an injection from a set to itself is trivially surjective so it is bijective. Is my proof correct?

user118494
  • 5,837
  • 4
    $\exp(x)$ is injective $\mathbb{R} \to \mathbb{R}$ but is not surjective – Henry Sep 29 '16 at 07:23
  • Lots of opitions. f (x)=-x. f (x) = 1/x;if n!=0,f (x)=0;if x=0. For {q_i} any enumeration of the rationals f (q_2k)= 2k+1, while f (q_2k+1)= q_2k for rational f (x)=1/x if x irrational, etc. – fleablood Sep 29 '16 at 08:00
  • 1
    You proof of injective is good. Surjective not. – fleablood Sep 29 '16 at 08:03
  • If $ X $ is finite, then the injectivity of $ f $ implies the surjectivity of $ f $ also. However, when $ X $ is infinite, this is no longer necessarily true. – Transcendental Sep 29 '16 at 10:10
  • For surjective: Obviously $X = i(X) = f(f(X))\subseteq f(X)\subseteq X$. – celtschk Oct 15 '16 at 08:07
  • A few post with examples of such functions: http://math.stackexchange.com/questions/1356095/functions-that-are-their-own-inversion http://math.stackexchange.com/questions/541978/can-the-inverse-of-a-function-be-the-same-as-the-original-function http://math.stackexchange.com/questions/46635/examples-of-involutions-on-mathbbr (and many other - just look on the posts shown as linked or related to those posts) – Martin Sleziak Oct 15 '16 at 08:09
  • Note that the metric is completely irrelevant in this statement. – Anne Bauval Apr 14 '23 at 18:35

4 Answers4

5

Injective.

If $f (x)=f (y) $ then $x=f (f (x))=f (f (y)l=y $, so injective.

Surjective:

If $y \in X $. Then $f (y)=x \in X $. So $f (x)=f (f (y))=y $, so surjective.

It really is that simple.

===

But there's more than just f =identity. Lots more.

Pick any such $f$ and any $a,b;a\ne b $ and define $g (a)=b, g (b)=a; g(x)=f (x)$ if $x \ne a;x\ne b $.

Here's a convoluted one. Let $\{q_i\} $ be any enumeration of the rational numbers. Let $f (q_{2k})=q_{2k+1};f (q_{2k+1})=q_{2k} $ and $f (x)=- 1/x $ otherwise.

Or if $x = a_ia_{i-1}....a_0.b_1b_2.... $ be the decimal expansion of $x$ Let f:R to R, map each decimal digit (except the leading digit if it happens to be $5$) to the digit plus or minus $5$. (Example: $f (\pi)= f(3.141592653.....)= 8.696047108....)$ and $f (52 \frac 18)=f(52.125) =57.67055555555555..... = 57\frac {1,207}{1,800}$)

I got a million of them.

fleablood
  • 124,253
  • I don't understand the second example, how the mapping is defined? – mat09 Jan 17 '24 at 03:40
  • 1
    I had a hard time rereading the second example 7 years later too. But $f: a_ia{i=1}...a_{0}.b_2b_2..... \to(\begin{cases}a_0&a_0=5\a_0+5\pmod{10}&a_0\ne 5\\end{cases} )(a_{i-1}+5\pmod{10})...(a_0+5\pmod{10}).(b_1+5\pmod{10})(b_2+5\pmod{10})....$ Basically you are just shifting every digit by 5 (unless the leading digit happens to be five andwe don't want to shift it to $0$ [else we'd have $f(59)=04$ and $f(4)=9$ and $f(f(59))\ne 59$]) – fleablood Jan 17 '24 at 16:06
4

Hint: For any two functions $f:Y\to Z$ and $g:X\to Y$, can

  1. $f\circ g$ be onto if $g$ isn't?
  2. $f\circ g$ be one-to-one if $f$ isn't?
Arthur
  • 199,419
  • thank you . but my proof is correct is not it? – user118494 Sep 29 '16 at 07:18
  • An injection from a set to itself is only bijective iff said set is finite (in fact, that's one way to define "finite set"). So you need to check surjectivity on its own. – Arthur Sep 29 '16 at 07:21
  • 1
    I know. $y$ is the image of $f(y)$ right? – user118494 Sep 29 '16 at 07:36
  • @user118494 Your proof is not correct as a number of people have pointed out already. There are many injections from a set into itself which are not surjective. They can even be extremely unsurjective consider $\epsilon \arctan(x)$. What do you mean by $y$ is the image of $f(y)$. if you're saying $f(f(y))=y$ that's just your premise. If you're saying $f(y)=y$ than that is not necessarily true. – DRF Sep 29 '16 at 07:45
  • @DRF : I meant $y$ is image of $f(y)$ in just this onr case where $f(f(y))=y$ is given that's all. Not for general cases. – user118494 Sep 29 '16 at 08:18
  • 1
    @user118494 Yes, that's correct. – Arthur Sep 29 '16 at 08:19
0

An injection from a set to itself is trivially surjective. No, It is only true for finite sets:

$$\begin{align}f:&\mathbb N \rightarrow \mathbb N \\ &n \mapsto2n\end{align}$$ is trivially injective and not surjective

So you must also prove that your application is surjective. But it is equally simple: $\forall x \in X, y = f(x) \space\mathrm{verifies}\space f(y) = f(f(x)) = x$

0

You have already been explained why your proof is not correct.

Now, the hypothesis rewrites $$f\circ f={\rm id}_X,$$ i.e. $f$ is an involution. It is therefore a bijection. Indeed, more generally:

A map $f:X\to Y$ is bijective if (and only if) there exists a map $g:Y\to X$ such that $$g\circ f={\rm id}_X\quad\text{and}\quad f\circ g={\rm id}_Y.$$

This sufficient condition can even be weakened, thereby becoming a variant of @Arthur 's answer:

A map $f:X\to Y$ is bijective if (and only if) there exist maps $g:Y\to Z$ and $h:T\to X$ such that $$g\circ f\text{ is one-to-one}\quad\text{and}\quad f\circ h\text{ is onto.}$$

Anne Bauval
  • 34,650