Matrix Multiplication: Column Picture

Category: Linear Algebra   Level: 301

column j of AB = A (column j of B) = b1j a1 + b2j a2 + b3j a3

Each column of AB is a mix of the columns of A. The matching column of B says how much of each to use.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Draw the columns of A

A has three columns, and each one is an arrow in the plane. Every column of the product is built from these three.

a1 = (1, 1), a2 = (0, 1), a3 = (2, -1)

Step 1: Draw the columns of A

Step 2: Mix them with column 1 of B

Column 1 of B is (2, 1, 1). Take two of a₁, then one of a₂, then one of a₃, tip to tail. The trip ends at (4, 2), the first column of AB.

2a1 + 1a2 + 1a3 = (4, 2)

Step 2: Mix them with column 1 of B

Step 3: Mix them with column 2 of B

Column 2 of B is (1, 0, 2). Take one of a₁, skip a₂ since its weight is 0, then two of a₃. The trip ends at (5, −1).

1a1 + 0a2 + 2a3 = (5, -1)

Step 3: Mix them with column 2 of B

Step 4: Stack the results as columns

The two landing points are the two columns of AB. Row times column gives the same numbers, one entry at a time.

AB = [[4, 5], [2, -1]]

Step 4: Stack the results as columns

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render matrix-multiplication-columns --out /tmp/matrix-multiplication-columns

Source: svgmath/diagrams/matrix_ops.py