# Continuous functions, its inverse (if exists) and intersections graphically

I have a question regarding graphical intersection between a continuous function and its inverse (if exists).

Suppose $f$ is a real continuous function and $f^{-1}$ exists.

Can anyone assist in proving the following problem:

If $f$ and $f^{-1}$ intersect graphically at some points, then the points must lie on the line $y=x$.(*)

For here, I have some trouble regarding the meaning of "some" points.

If it is uncountable many points of intersection, $y=\frac{1}{x}$ is a counterexample.

What if it is countable (including finite many or countably infinite)?

Intuitively, (*) is true when we draw the functions pictorially, but can anyone provide hints or steps to the proof?

If the statement is wrong at the first place, how should we amend?

Thank you in advance.

• What do you mean by the intersection of two functions? Do you mean the intersection of their graphs? If so, please edit that into the body of the question. – Gerry Myerson Sep 4 '14 at 13:00
• Surely there must be some condition on f, otherwise let f be a function that swaps two given reals and fixes all the others – Belgi Sep 4 '14 at 13:01
• Thank you for the answer. Perhaps I change the question to continuous functions. – Novice Sep 4 '14 at 13:03
• @Belgi I'm missing how that is a counter example. As far as I can tell, all points $a$ such that $f(a)=f^{-1}(a)$ are in $\{(x,x)\colon x\in \mathbb R\}$. – Git Gud Sep 4 '14 at 13:09
• @GitGud the point is (a, f(a)), say f swaps 0 and 1, then f agrees with its inverse for all reals, but does not coincide with y=x(excuse me for the lack of tex, I'm using a mobile phone) – Belgi Sep 4 '14 at 13:18

## 1 Answer

The graphical proof can be algebra-fied: Let's look at a certain $x=x_1$ where $f(x_1)=x_1$ i.e. $f(x)$ intersects the $y=x$ at that $x_1$. Now since they intersect we have $x_1-f(x_1)=0 \Rightarrow x_1=f(x_1)$. Now we take the inverse $f^{-1}$ of both sides: $f^{-1}(x_1)=x_1 \Rightarrow f^{-1}(x_1)-x_1=0$ which means $f^{-1}(x)$ also intersects the $y=x$ line at that $x_1$ which means $f(x)$ intersects $f^{-1}(x)$ on the line $y=x$.

An alternative solution would be to say that in order for an intersection to take place we want $f^{-1}(x)=f(x)$ and the $x$ which satisfies this is where the intersection happens. Taking the $f$ of both sides gives us $x=f(f(x))$ which is a functional equation. Now $f(x)=x$ is a solution to that functional equation which indicates that the intersections happen at $y=x$. The only issue is that I'm not sure how to prove that there are no other solutions to that functional equation.

I hope that helps somewhat.

• By your first paragraph, it seems that you are proving the converse of the statement. – Novice Sep 4 '14 at 14:03
• True, I tried to show that if $f(x)$ intersects $y=x$ then at that point we also have $f(x)$ intersecting $f^{-1}(x)$. – Sheheryar Zaidi Sep 4 '14 at 14:06
• Your second question is the crux. Pictorially it is evident, but $\frac{1}{x}$ is the spoiler. – Novice Sep 4 '14 at 14:09
• Such a function is an involution (I found on Wikipedia). Apparently, $y=-x$ is an involution. The function coincides with its inverse, yet the intersections is the line itself, not $y=x$. – Novice Sep 4 '14 at 14:14
• Which is why we probably cannot show that all intersections take place on the line $y=x$. Interesting problem I must say. – Sheheryar Zaidi Sep 4 '14 at 14:17