Let \(\mathcal{P}\) be the proposition that \(f\) is invertible, and let \(\mathcal{Q}\) be the proposition that \(f\) is bijective. We prove the equivalence \(\mathcal{P}\iff \mathcal{Q}\) by proving the two implications \(\mathcal{P}\implies \mathcal{Q}\) and \(\mathcal{Q}\implies\mathcal{P}\text{.}\)
Proof of \(\mathcal{P}\implies \mathcal{Q}\).
We must show that if \(f\) is invertible, then \(f\) is bijective. Assume \(f\) is invertible. Then \(f\) has an inverse \(f^{-1}\text{.}\) We show separately that \(f\) is injective and surjective, hence bijective.
\(f\) is injective.
We show \(f(x)=f(x')\implies x=x'\) via a chain of implications:
\begin{align*}
f(x)=f(x') \amp \implies f^{-1}(f(x))=f^{-1}(f(x'))\\
\amp\implies x=x' \amp (f^{-1}\circ f=\id_X) \text{.}
\end{align*}
\(f\) is surjective.
Let \(b\) be an element of \(Y\text{.}\) We must show that there is an \(x\in X\) such that \(f(x)=y\text{.}\) Letting \(x=f^{-1}(y)\text{,}\) we have
\begin{align*}
f(x) \amp = f(f^{-1}(y))\\
\amp = y \amp (f\circ f^{-1}=\id_Y)\text{.}
\end{align*}
Proof of \(\mathcal{Q}\implies\mathcal{P}\).
We must show that if \(f\) is bijective, then \(f\) is invertible. Assume \(f\) is bijective. First we define a function \(g\colon Y\rightarrow X\) as follows: for all \(y\in Y\text{,}\) let \(g(y)\) be the unique element \(x\in X\) such that \(f(x)=y\text{.}\) Note that our definition of \(g\) uses both that \(f\) is surjective (there is some element \(x\) such that \(f(x)=y\))) and injective (there is exactly one element \(x\) such that \(f(x)=y\)).
We now prove that \(g\) is the inverse of \(f\text{,}\) showing \(g\circ f=\id_X\) and \(f\circ g=\id_Y\) separately.
\(g\circ f=\id_X\).
Take any \(x\in X\) and let \(y=f(x)\text{.}\) By definition of \(g\text{,}\) we have \(g(y)=x\) and hence \(g(f(x))=g(y)=x\text{.}\) This proves \(g\circ f=\id_X\text{.}\)
\(f\circ g=\id_Y\).
Take any \(y\in Y\text{.}\) By definition of \(g\text{,}\) \(g(y)\) is the unique \(x\in X\) such that \(f(x)=y\text{.}\) Thus \(f(g(y))=f(x)=y\text{.}\) This proves \(f\circ g=\id_Y\text{.}\)