# I don't understand the mathematical definition of an inverse function

A function $f:X\rightarrow Y$ is called invertible if there exists a function $g:Y \rightarrow X$ such that:

$y=f(x)\Leftrightarrow x = g(y)$ for all $x\in X$ and for all $y \in Y$

In this case we call $g$ an inverse(function) of $f$ and write $g=f^{-1}$

I know that the concept of inverse functions can be visualised as follows: I don't understand why there is a need for a double implication in '$y=f(x)\Leftrightarrow x = g(y)$'.

I thought $y=f(x) \Rightarrow x=g(y)$ would have suffice because:

1. The implication above means 'If x is mapped to y, then there is a rule such that y is mapped to x'. I feel that this statement completely describes the graphic above. So, what kind of graphic is actually being represented if we do not require that the converse be true too?

2. In this case, if the implication is true, then surely its converse would be true too (if I can move from left to right, then surely I can return back). Therefore, it is redundant to emphasis that the converse must be true too. What are some examples of functions where the converse is not true?

• Let A = {a,b} B={1} and let f(a)= f(b)=1. Now let g(1) = a. Clearly the converse does not hold. – Jack Yoon Jul 14 '14 at 10:23
• This relies on the difference between LEFT and RIGHT inverse. They are differents and the inverse of a function $f$ is a function $g$ which is both RIGHT and LEFT inverse. see wiki en.wikipedia.org/wiki/Inverse_function#Left_and_right_inverses – user126154 Jul 14 '14 at 10:25
• @JackYoon The converse is '$g(1)=a \Rightarrow f(a)=1$' and is true, isn't it? The implication $f(b)=1 \Rightarrow g(1)=b$ is false, so $f$ is not invertible. In this case, I only had to consider the truth of the statement $f(x)=y \Rightarrow g(y)=a$ for all $x$ and $y$ in order to determine if $f$ is invertible. I don't see the where we need to look at the converse too. – mauna Jul 14 '14 at 16:33
• You are right in the sense that my statement was wrong way around. But it is not true that you only have to look at one side to prove bijectivity. One implication implies surjectivity, other way implies injectivity. Clearly require both for bijectivity – Jack Yoon Jul 16 '14 at 9:16
• My function f was surjective so => holds. g is injective so <= holds. – Jack Yoon Jul 16 '14 at 9:17

## 1 Answer As u can see $f^{-1}=g$ is not a function because it is not well defined. You would only get a function if define $g(1)=a$ or $g(1)=b$, but then $g\circ f(a\cup b) \neq a\cup b$.

The condition $y=f(x) \iff x=g(y)$ avoids this problems.

• could you please walk me through how the condition $y=f(x) \iff x=g(y)$ avoids the problems? – mauna Jul 14 '14 at 12:32
• Well. As i said above. $g$ is only a map if you define $g(1)=a$ or $g(1)=b$. Lets chose $g(1)=a$. Then $f(a)=1 \Rightarrow g(1)=a$. This is true. But $f(b)=1$ and $g(1)=a$. So it does not hold: $g(f(b))=b$. If we assume that $y=f(x) \iff x=g(y)$, then we can conclude that $y=f(x)=f(g(y))$ and $x=g(y)=g(f(x))$ for arbitrary $x,y$. Is it clear for you now? – Marm Jul 14 '14 at 12:43
• I was under the impression that if '$y=f(x)=f(g(y))$' is true for arbitrary $x,y$ then we can automatically conclude that $x=g(y)=g(f(x))$ is true too. Therefore, its enough to show that $y=f(x)\Rightarrow x=g(y)$ is true for arbitrary $x,y$. Using this in the example you provided, '$f(b)=1 \Rightarrow g(1)=b$' is false. So, I can conclude that the function $f$ is not invertible. It looks like I never need to look at the converse of the implication in order to determine that $f$ is not invertible. At what point does the converse come into play when determining if $f$ is invertible? – mauna Jul 14 '14 at 14:12