Bijection iff Left and Right Inverse

Theorem
Let $f: S \to T$ be a mapping.

$f$ is a bijection iff:


 * $\exists g_1: T \to S: g_1 \circ f = I_S$
 * $\exists g_2: T \to S: f \circ g_2 = I_T$

where both $g_1$ and $g_2$ are mappings.

It also follows that it is necessarily the case that $g_1 = g_2$ for such to be possible.

Corollary
Let $f: S \to T$ and $g: T \to S$ be mappings such that:


 * $g \circ f = I_S$
 * $f \circ g = I_T$

Then both $f$ and $g$ are bijections.

Also see

 * Two-Sided Inverse