# If two functions are mirror images of each other about the line $y=x$, are they inverses of each other?

I know that for a function $$f$$ there exists an inverse $$f^{-1}$$ when $$f$$ is one-one and onto in its domain. I also know that a function $$f$$ and its inverse $$f^{-1}$$ are mirror images about the line $$y=x$$.

Now, can we say that when two functions which are exactly mirror images about the line $$y=x$$, are inverses of each other? Or in other words is the converse of the statement "Function and its inverse are mirror images of each other about the line $$y=x$$" is always true? If it is not always true, kindly give me circumstances when the converse fails.

Edit:

From this Quora answer, it is said that two functions having the same graph need not necessarily be equal. Then how can we conclude that the graph mirror imaged about the line $$y=x$$ is definitely its inverse?

• Ignoring possible issues with domains and ranges, your converse statement is true. – Peter Oct 7 '19 at 11:46
• +1 Good question because the converse is frequently assumed to be true. I myself use the converse quite often without ever considering if it is actually true. – Toby Mak Oct 7 '19 at 11:52
• – Guru Vishnu Oct 15 '19 at 5:34
• – Guru Vishnu Oct 18 '19 at 15:30

Suppose the two functions whose graphs are reflections over the line $$y=x$$ are named $$f$$ and $$g$$. What does it even mean to say the graphs are reflections over the line $$y=x$$? It means that if $$(a,b)$$ is some point on $$f$$'s graph, then $$(b,a)$$ is a point on $$g$$'s graph.

So take any $$a$$ in $$f$$'s domain, and let $$b=f(a)$$. Then the point $$(a,b)$$ is on $$f$$'s graph. So $$(b,a)$$ is on $$g$$'s graph. So $$g(b)=a$$. So $$g(f(a))=a$$. And this was for an arbitrary $$a$$ is $$f$$'s domain. The argument is symmetric for showing that for any $$b$$ in $$g$$'s domain, that $$f(g(b))=b$$. So the conclusion is yes, $$f$$ and $$g$$ are inverses.

• Thank you for your answer. In this Quora answer, it is given that two functions having same graph need not be equivalent and here at math.se it totally confuses me. I completely understood your answer. But based on that Quora answer, it is also equally correct to claim the graph mirrored about $y=x$ may not be the inverse of the original graph. It would be great if you could explain this. – Guru Vishnu Oct 18 '19 at 6:29
• @Intellex Do you understand the difference between a "function" and an "equation"? That Quora answer is about two equations in $x$ and $y$, and the solutions to the two equations make the same graph. But two functions with the same graph are indeed the same function. – alex.jordan Oct 18 '19 at 15:13

Yes, because if one function is $$y = f(x)$$, the other is $$x = g(y)$$, since swapping $$x$$ and $$y$$ has the same effect as reflecting across the line $$y=x$$.

Substituting the first into the second, $$x = g(y) = g(f(x))$$, or in other words, $$g^{-1} (x) = f(x)$$ if $$g^{-1} (x)$$ exists. Similarly, substituting the other way around, $$y = f(x) = f(g(y)$$, so $$f^{-1} (y) = g(y)$$ if $$f^{-1} (y)$$ exists.

• I might make them different functions.. This is making it seem like $f$ is an involution which it need not be. – Cameron Williams Oct 7 '19 at 11:48
• Thanks for the comment. I have now edited. – Toby Mak Oct 7 '19 at 11:51
• Thanks for your answer. I could not think of any situation when the converse doesn't hold good. So, are there any circumstances when two functions are mirror images about $y=x$ but not inverses of each other? – Guru Vishnu Oct 8 '19 at 6:03
• No, because if two functions are inverses of each other, then there is a bijection between the two functions. For example, if $f(x) = x+2$, $f^{-1} (x) = x-2$, and the point $(7,9)$ of $f(x)$ corresponds to $(9,7)$ on $f^{-1} (x)$. Since the mirror image exists, then there has to be a bijection where you can construct an inverse. – Toby Mak Oct 8 '19 at 6:17
• @TobyMak, Could you please read the question again, I have added some details. – Guru Vishnu Oct 9 '19 at 9:51