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.

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.

Proof

 * From Left Inverse Mapping, $$f$$ is an injection iff $$\exists g_1: T \to S: g_1 \circ f = I_S$$.


 * From Right Inverse Mapping $$f$$ is a surjection iff $$\exists g_2: T \to S: f \circ g_2 = I_T$$


 * If $$f$$ is a bijection, then it is both an injection and a surjection, thus both the described $$g_1$$ and $$g_2$$ must exist from Left Inverse Mapping and Right Inverse Mapping.

If both the described $$g_1$$ and $$g_2$$ exist, then it follows that $$f$$ is both an injection and a surjection, and therefore a bijection.

Proof of Corollary
Suppose we have such mappings $$f$$ and $$g$$ with the given properties.

From the main result, we have that $$f$$ is a bijection, by considering $$g = g_1$$ and $$g = g_2$$.

It directly follows that by setting $$g = f, f = g_1, f = g_2$$, the same result can be used the other way about.