Left and Right Inverse Mappings Implies Bijection

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

Let $f$ be such that:


 * $\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.

Then $f$ is a bijection.