5

As far as I remember a reverse function for some function $f$ exists iff an inverse function exists.

Can I therefore follow from $f(f(x)) = x$ ($f$ is its own inverse function) for some function $f$ that it is bijective without proving it is injective and surjective?

Example:

$f : \mathbb{R} \rightarrow \mathbb{R},\ f(x) = 5 - x$

muffel
  • 2,879
  • 2
    What's the domain of $f$? Is it the full codomain $Y$? – Roland Jun 07 '14 at 15:22
  • 1
    $f$ is bijective for $f: X\to Y$ iff $Y\subset X$ – kingW3 Jun 07 '14 at 15:25
  • @kingW3 what if $Y \subseteq X$? – muffel Jun 07 '14 at 15:35
  • 2
    @muffel As far as I know, it is customary to use the notation $\subset$ to denote weak set inclusion. Personally, I find it annoying and I always use $\subseteq$, but even the most respected mathematicians use $\subset$ with no reservations. – triple_sec Jun 07 '14 at 15:38

6 Answers6

10

This depends on the domain and codomain chosen for the function. For example, suppose that $f : \Bbb{R} \to \Bbb{C}$ is defined by $f(x) = x$. Then $f(f(x)) = x$ for every $x \in \Bbb{R}$, but $f$ is not a bijection since it is certainly not surjective. You can say, however, that if $x \neq y$ are both in the domain of $f$, then $f(x) \neq f(y)$ since otherwise $f(f(x)) = f(f(y)) \implies x = y$.

Tom
  • 9,978
  • Nice counterexample! – triple_sec Jun 07 '14 at 15:43
  • 1
    I'm not convinced: see my answer. – Tom Collinge Jun 07 '14 at 16:07
  • 3
    How does "$f(f(x))$" make sense in this case? The domain of $f$ is $\mathbb{R}$, not $\mathbb{C}$. – Neal Jun 07 '14 at 16:10
  • 1
    I see; you're defining $\mathbb{R}$ as the subset of $\mathbb{C}$ with zero imaginary part. – Neal Jun 07 '14 at 16:19
  • @Neal Yes! That is true. I certainly consider $\Bbb{R} \subset \Bbb{C}$. – Tom Jun 07 '14 at 16:22
  • @Tom When speaking precisely, I don't usually consider $\mathbb{R}$ as a subset of $\mathbb{C}$, but it's a reasonable definition. – Neal Jun 07 '14 at 16:57
  • 1
    @Neal If we don't consider $\Bbb{R} \subseteq \Bbb{C}$ then the statement $f(x) = x$ in my example doesn't even make sense. However, for the purposes of this counterexample, I think that assuming $\Bbb{R} \subseteq \Bbb{C}$ isn't unreasonable. – Tom Jun 07 '14 at 17:12
7

Since f(f(x)) exists it implies that f(x) must be in the domain of f (else we can't form $f(f(x))$. So f must map some set A to itself, i.e. $f:A \rightarrow A$. Examples using say R and C are therefore not valid: the domain of f is either R or C, in this case you would have $f: R \rightarrow C$ and $F: C \rightarrow R$ with $f = F|_R$ (i.e. f is $F$ restricted to R), and then $F(f(x)) = x$.

In general if $f:A \to B$ and $F:B \to A$ then $f = F \implies B = A$, and here $f = F$ is implied by $f(f(x)) = x$.

So with that understanding then f is a bijection.

  1. f must be onto (surjective) since for all $x \in A$ $f(x) $ is defined (under normal understanding) and $=x$, so for all $x \in A$ there exists $x \in A$ such that $x = f(x)$
  2. f must be into (injective) as $f(y) = y$ so if $f(x) = f(y)$ then $x = y$.
Tom Collinge
  • 7,981
  • 25
  • 59
  • Consider $f : {0} \to {0} \cup A$ where $A$ is your favorite set; define the rule of $f$ by $f(0) = 0$. In this case $f \circ f$ makes sense because the domain of $f$ is a subset of the range (not codomain) of $f$. Moreover $f(f(x)) = x$ for all $x \in {0}$. – Tom Jun 07 '14 at 16:16
  • 2
    @Tom. If f is a well defined function then it must have a corresponding domain: what is the domain in your example, is it {0} or is it {0} $\cup A$ ? - it can't be both. – Tom Collinge Jun 07 '14 at 16:21
  • I absolutely agree the domain is not both ${0}$ and ${0} \cup A$! The domain of $f$ is ${0}$. The range of $f$ is $f({0}) = {0} \subset {0} \cup A$. Therefore, it makes sense to write the composition of $f$ with itself since the range of $f$ is a subset of the domain of $f$. – Tom Jun 07 '14 at 16:23
  • @Tom Then f is a bijection from {0} to {0}, yes ? – Tom Collinge Jun 07 '14 at 16:50
  • If $f:A\rightarrow B$ then $B\subseteq A$ is enough for each $f(x)$ to be in the domain of $f$. It is not necessary that $B=A$. If $\iota: B\rightarrow A$ is the inclusion of $B$ then $\iota\circ f:A\rightarrow A$. This function is the same as $f$ if and only if $A=B$ (then $\iota$ is the identity). – drhab Jun 07 '14 at 16:53
  • @Tom It's generally assumed that $f: A \rightarrow B$ means all of A. So in the absence of any statement to the contrary it's reasonable to assume that $f:B \rightarrow A$ would mean all of B. Hence, in this case, B = A. – Tom Collinge Jun 07 '14 at 17:18
  • By "all of $A$", I assume you mean that if $f: A \to B$, then the domain of $f$ is $A$. This is correct. However, $f \circ f$ is defined as long as the range of $f$ is a subset of the domain of $f$. In other words, you don't need $f$ to be defined on all of $B$ for $f \circ f$ to be defined, just just need $f$ to be defined on $f(A) \subseteq B$. In general, if $h : A \to B$ and $g : C \to D$, then $g \circ h$ is defined whenever $h(A) \subseteq C$; this does not imply that $B \subseteq C$. – Tom Jun 07 '14 at 18:33
  • @Tom $g \circ h$ is defined whenever $h(A) \subseteq C$, but it's still implicit that for $g : C \to D$ then C is the domain of g. – Tom Collinge Jun 07 '14 at 19:53
3

Assuming $f: A \to A$...

If $f \circ g$ is bijective, then $f$ is a surjective and $g$ is injective. Here, $f \circ f$ is a bijective (in fact it is the identity mapping), so $f$ is surjective and $f$ is injective. Therefore, $f$ is bijective.

M. Vinay
  • 9,004
2

The self-inverse property implies injectivity but not surjectivity.

John Fernley
  • 1,218
2

$f$ is injective, because if $f(x)=f(y)$, then $x=f(f(x))=f(f(y))=y$.

$f$ is surjective because every $x$ is the image of some $y$, namely $f(f(x))=x$ (provided that the image is the same set as the domain).

So... yes.

ajotatxe
  • 65,084
  • 1
    It is not necessarily true that $f$ is surjective. – Tom Jun 07 '14 at 15:23
  • 1
    The proof goes through and $f$ is surjective as long as the codomain is a subset of the domain. – triple_sec Jun 07 '14 at 15:26
  • @triple_sec if the domain is a finite set then the codomain needs to be exactly the domain, however. Just a note ;P – DanZimm Jun 07 '14 at 15:27
  • 1
    @DanZimm True, but this is implied by the condition $f(f(x))=x$. In this case, $x\in\text{Dom}$ implies that $f(f(x))=x$, so $x\in f(\text{Dom})\subseteq\text{Codom}$, so $\text{Dom}\subseteq\text{Codom}$. In fact, I just realized that it must be true for an arbitrary non-empty domain. So, to refine, the result goes through as long as $\text{Dom}=\text{Codom}.$ – triple_sec Jun 07 '14 at 15:31
  • 1
    @DanZimm What's wrong with the function $f : {0} \to \Bbb{R}$ where $f(0) = 0$? The codomain is $\Bbb{R}$, which is not even finite. Note that $f(f(x)) = x$ for every $x$ in the domain of $f$. – Tom Jun 07 '14 at 15:33
  • 1
    @Tom In your example, the codomain is not a subset of the domain, so $f$ will not be surjective, indeed. – triple_sec Jun 07 '14 at 15:34
  • @triple_sec Ah.. I misunderstood DanZimm's comment; I thought the suggestion was that if $f(f(x)) = x$ then the domain and codomain are forced to be equal in the finite case..! My apologies. – Tom Jun 07 '14 at 15:37
  • @Tom I guess DanZimm meant that for a finite domain, the codomain needs to equal it for surjectivity to hold. I think this should be required for arbitrary non-empty domains as well. – triple_sec Jun 07 '14 at 15:40
  • You should start the second line with: 'in general $f$ is not surjective...' and eventually continue with something like: 'however, in special case that the image is the same set as the domain...' Then I will withdraw my downvote and make it an upvote. – drhab Jun 07 '14 at 15:41
1

You have plenty of answers and according to my view you accepted one that is indeed okay. I just want to mention a subtle point here. Your condition was: $$\forall x\; f\left(f\left(x\right)\right)=x$$ and under that condition $f$ is injective but does not have to be surjective.

If it would have been slightly different: $$\forall x\; f\circ f\left(x\right)=x$$ then you are dealing with something else. This condition can only 'make sense' if function $f\circ f$ is indeed defined. That means that its domain and codomain must be the same. So then the answer would have been: yes, $f$ is a bijection.

The first condition is not equivalent with: $f$ is its own inverse (as you argued in your question). The second condition is.

drhab
  • 151,093