Inverse of Product

Theorem
Let $$\left({S, \circ}\right)$$ be a monoid whose identity is $$e$$.

Let $$x, y \in S$$ be invertible for $$\circ$$, with inverses $$x^{-1}, y^{-1}$$.

Then $$x \circ y$$ is invertible for $$\circ$$, and $$\left({x \circ y}\right)^{-1} = y^{-1} \circ x^{-1}$$.

Generalized Result
Let $$\left({S, \circ}\right)$$ be a monoid whose identity is $$e$$.

Let $$a_1, a_2, \ldots, a_n \in S$$ be invertible for $$\circ$$, with inverses $$a_1^{-1}, a_2^{-1}, \ldots, a_n^{-1}$$.

Then $$\left({a_1 \circ a_2 \circ \cdots \circ a_n}\right)^{-1} = a_n^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$$.

Proof
Similarly for $$\left({y^{-1} \circ x^{-1}}\right) \circ \left({x \circ y}\right)$$.

Generalized Result
Proof by induction:

We have, from above, $$\left({a_1 \circ a_2}\right)^{-1} = a_2^{-1} \circ a_1^{-1}$$, and (trivially) $$\left({a_1}\right)^{-1} = a_1^{-1}$$.

Assume that $$\left({a_1 \circ a_2 \circ \cdots \circ a_k}\right)^{-1} = a_k^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$$.

Then:

So the assumption being true for $$n = k$$ implies that it is also true for $$n = k + 1$$. It is also true for ($$n = 1$$ and) $$n = 2$$, so by the Principle of Mathematical Induction it is true for all $$n \in \mathbb{N}^*$$.