Relative Matrix of Composition of Linear Transformations

Theorem
Let $R$ be a ring with unity.

Let $M, N, P$ be free $R$-modules of finite dimension $m, n, p > 0$ respectively.

Let $\mathcal A,\mathcal B,\mathcal C$ be ordered bases of $M, N, P$.

Let $f: M \to N$ and $g : N \to P$ be linear transformations, and $g \circ f$ be their composition.

Let $\mathbf M_{f, \mathcal B, \mathcal A}$ and $\mathbf M_{g, \mathcal C, \mathcal B}$ be their matrices relative to $\mathcal A, \mathcal B$ and $\mathcal B, \mathcal C$ respectively.

Then the matrix of $g \circ f$ relative to $\mathcal A$ and $\mathcal C$ is:
 * $\mathbf M_{g \mathop \circ f, \mathcal C, \mathcal A} = \mathbf M_{g, \mathcal C, \mathcal B}\cdot \mathbf M_{f, \mathcal B, \mathcal A}$

Also see

 * Product of Change of Basis Matrices, an analogous result for change of basis
 * Composition of Linear Transformations is Linear Transformation