Skip to content

Matrix Multiplication

Mathematics Algebra Difficulty 2/5

Beginning of the lesson

1. Why This Definition? — Composition of Linear Substitutions

Key Insight: Matrix multiplication is not defined by multiplying corresponding entries. Its definition is forced on us by the requirement that multiplying matrices must correspond to composing the linear transformations they represent.

1.1 A Motivating Scenario — Two Chained Changes of Variables

Suppose we have two successive linear substitutions (changes of variables):

Step 1. Express variables $y_1, y_2$ in terms of $x_1, x_2, x_3$:

$$ y_1 = 2x_1 + 3x_2 - x_3, \qquad y_2 = x_1 - 4x_2 + 5x_3 $$

In matrix form, with $A = \begin{pmatrix} 2 & 3 & -1 \\ 1 & -4 & 5 \end{pmatrix}$ and $\mathbf{x} = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}$, this is $\mathbf{y} = A\mathbf{x}$.

Step 2. Express a variable $z_1$ in terms of $y_1, y_2$:

$$ z_1 = 4y_1 + 7y_2 $$

In matrix form, with $B = \begin{pmatrix} 4 & 7 \end{pmatrix}$ (a $1 \times 2$ matrix), this is $\mathbf{z} = B\mathbf{y}$.

Composition. Substituting Step 1 into Step 2:

$$ z_1 = 4(2x_1 + 3x_2 - x_3) + 7(x_1 - 4x_2 + 5x_3) $$ $$ z_1 = 8x_1 + 12x_2 - 4x_3 + 7x_1 - 28x_2 + 35x_3 $$ $$ z_1 = 15x_1 - 16x_2 + 31x_3 $$

The composite substitution $\mathbf{z} = C\mathbf{x}$ has $C = \begin{pmatrix} 15 & -16 & 31 \end{pmatrix}$.

The Punchline: Look at how each entry of $C$ was computed. For instance, $c_{11} = 4 \cdot 2 + 7 \cdot 1 = 15$. That is the dot product of the row of $B$ with the first column of $A$. The row-by-column rule is the only rule that makes $BA$ equal the matrix of the composed transformation $B \circ A$.

1.2 The General Principle

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 15
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers