Lesson 250: Matrix Multiplication and Composition

Introduction: Chaining Transformations

When you apply one transformation after another, the combined effect is also a linear transformation. Matrix multiplication is how we compute the matrix of the combined transformation. This is why matrix multiplication has its peculiar "row times column" rule.

The Matrix Multiplication Rule

If \(A\) is \(m \times n\) and \(B\) is \(n \times p\), then \(C = AB\) is \(m \times p\) with entries:

\[c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}\]

Each entry is the dot product of row \(i\) of \(A\) with column \(j\) of \(B\).

Key insight: \((AB)\vec{v} = A(B\vec{v})\)—applying \(B\) first, then \(A\).

Properties of Matrix Multiplication

Worked Examples

Example 1: Basic Multiplication

\[A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}\] \[AB = \begin{pmatrix} 1 \cdot 5 + 2 \cdot 7 & 1 \cdot 6 + 2 \cdot 8 \\ 3 \cdot 5 + 4 \cdot 7 & 3 \cdot 6 + 4 \cdot 8 \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}\]

Example 2: Non-Commutativity

Using the same \(A\) and \(B\):

\[BA = \begin{pmatrix} 5 \cdot 1 + 6 \cdot 3 & 5 \cdot 2 + 6 \cdot 4 \\ 7 \cdot 1 + 8 \cdot 3 & 7 \cdot 2 + 8 \cdot 4 \end{pmatrix} = \begin{pmatrix} 23 & 34 \\ 31 & 46 \end{pmatrix}\]

Clearly \(AB \neq BA\)!

Example 3: Composing Transformations

Rotate 90° then reflect across x-axis:

\[R = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}, \quad M = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\] \[MR = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}\]

This is reflection across the line \(y = -x\).

The Quantum Connection

The non-commutativity of matrix multiplication is the mathematical origin of the uncertainty principle. When \(\hat{A}\hat{B} \neq \hat{B}\hat{A}\), the observables cannot be simultaneously measured with arbitrary precision. The commutator \([\hat{A}, \hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A}\) quantifies this incompatibility.