Matrix as a Linear Transformation

Category: Linear Algebra   Level: 301

A x = x1 (first column) + x2 (second column)

A 2 by 2 matrix moves every point of the plane. The columns tell you where the two basis vectors land, and the rest of the grid follows along.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Start with the grid and the basis vectors

The basis vectors e₁ and e₂ are one step along each axis. They outline the yellow unit square.

e1 = (1, 0), e2 = (0, 1)

Step 1: Start with the grid and the basis vectors

Step 2: Send e₁ to the first column

Read the first column of A: e₁ lands on (2, 0). The matrix stretches it to twice its length.

A e1 = (2, 0)

Step 2: Send e₁ to the first column

Step 3: Send e₂ to the second column

The second column says e₂ lands on (1, 1). It leans over to the right.

A e2 = (1, 1)

Step 3: Send e₂ to the second column

Step 4: Carry the whole grid along

Every grid line follows the basis vectors. Lines stay straight, parallel, and evenly spaced, and the origin stays put. The unit square becomes a parallelogram.

square → parallelogram with sides (2, 0) and (1, 1)

Step 4: Carry the whole grid along

Step 5: Transform any vector with the columns

The vector (1, 2) means one e₁ plus two e₂. After the map it is one first column plus two second columns. No grid paper needed.

A(1, 2) = 1(2, 0) + 2(1, 1) = (4, 2)

Step 5: Transform any vector with the columns

All steps at once

Storyboard

Generate it yourself

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

Source: svgmath/diagrams/linear_maps.py