Proof that a bijection has unique two-sided inverse

I will use the notation $f$ and $g$ instead of $\alpha$ and $\beta$ respectively, for reasons that will be clear shortly.

Existence. I find viewing functions as relations to be the most transparent approach here. Here's a brief review of the required definitions. A function $f : A \to B$ is a essentially a relation $F \subseteq A \times B$ such that any $x$ in the codomain $A$ appears as the first element in exactly one ordered pair $(x,y)$ of $F$. In what follows, we represent a function by a small-case letter, and the corresponding relation by the corresponding capital-case. In this view, the notation $y = f(x)$ is just another way to say $(x,y) \in F$.

For any relation $F$, we can define the inverse relation $F^{-1} \subseteq B \times A$ as transpose relation $F^{T} \subseteq B \times A$ as: $$ F^{T} := \{ (y,x) \,:\, (x,y) \in F \}. $$ (Edit: Per Qiaochu Yuan's suggestion, I have changed the term "inverse relation" to "transpose relation".) The nice thing about relations is that we get some notion of inverse for free. Of course, the transpose relation is not necessarily a function always. However, this is the case under the conditions posed in the question.

Assume that $f$ is a bijection. We define the transpose relation $G = F^{T}$ as above. It remains to verify that this relation $G$ actually defines a function with the desired properties.

  • $G$ defines a function: For any $y \in B$, there is at least one $x \in A$ such that $(x,y) \in F$. (Why?) Moreover, such an $x$ is unique. (Why?) That is, for each $y \in F$, there exists exactly one $x \in A$ such that $(y,x) \in G$. Hence, $G$ represents a function, call this $g$.

  • $g$ is surjective: Take $x \in A$ and define $y = f(x)$. Verify that this $y$ satisfies $(y,x) \in G$, which implies the claim.

  • $g$ is injective: Suppose $y_1, y_2 \in B$ are such that $g(y_1) = x$ and $g(y_2) = x$. Unrolling the definition, we get $(x,y_1) \in F$ and $(x,y_2) \in F$. Now, since $F$ represents the function, we must have $y_1 = y_2$.

  • $g$ is bijective. Follows from injectivity and surjectivity.

  • Left inverse: We now show that $gf$ is the identity function $1_A: A \to A$. Fix $x \in A$, and define $y \in B$ as $y = f(x)$. By definition of $F$, $(x,y) \in F$. Again, by definition of $G$, we have $(y,x) \in G$. Therefore, $x = g(y)$. Plugging in $y = f(x)$ in the final equation, we get $x = g(f(x))$, which is what we wanted to show.

  • Right inverse: Here we want to show that $fg$ is the identity function $1_B : B \to B$. This is very similar to the previous part; can you complete this proof?


Uniqueness. The hard of the proof is done. But we still want to show that $g$ is the unique left and right inverse of $f$.

  • Left inverse: Suppose $h : B \to A$ is some left inverse of $f$; i.e., $hf$ is the identity function $1_A : A \to A$. This is similar to Thomas's answer. Start from: $$ 1_A = hf. $$ The trick is to do a right-composition with $g$: $$ g = 1_A g = (hf)g = h(fg) = h1_B = h, $$ which shows that $h$ is the same as $g$.

  • Right inverse: This again is very similar to the previous part. I am sure you can complete this proof.


Am I missing something? You can precompose or postcompose with $\alpha^{-1}$. Thus $\alpha^{-1}\circ (\alpha\circ\beta)=\beta$, and $(\beta\circ\alpha)\circ\alpha^{-1}=\beta$ as well.