Linear Transformations

Watch the entire coordinate grid warp and stretch. See how matrices transform all of space at once.

Matrices Transform Space

Here's the key insight: a matrix isn't just a grid of numbers—it's an action. Every matrix takes the entire coordinate grid and transforms it in one smooth motion: stretching, rotating, shearing, reflecting.

The columns of a matrix tell you exactly where the basis vectors land. Once you know that, you know everything about the transformation.

The Big Idea

A 2×2 matrix M transforms a vector v by sending it to Mv. The first column is where î lands, the second column is where ĵ lands. That's it—the entire transformation is encoded in just four numbers.

Demo 1: Watch the Grid Transform

Select different transformations and watch the entire coordinate grid respond. Notice how grid lines stay straight and parallel lines stay parallel.

Matrix:
[1.00, 0.00]
[0.00, 1.00]
Basis vectors:
î → (1.00, 0.00)
ĵ → (0.00, 1.00)

A matrix transformation is completely determined by where it sends the basis vectors î and ĵ. Watch how the entire grid follows along.

Demo 2: Transformation Gallery

Different matrices produce different effects. Compare rotations, scalings, shears, reflections, and projections side by side.

Identity (Original)
No transformation

rotation

Rotate 45°
Counterclockwise rotation by 45 degrees
Rotate 90°
Counterclockwise rotation by 90 degrees

scaling

Scale 2x
Uniform scaling by factor of 2
Scale 0.5x
Uniform scaling by factor of 0.5
Stretch X
Scale x by 2, keep y
Stretch Y
Scale y by 2, keep x

shear

Shear Right
Horizontal shear
Shear Up
Vertical shear

reflection

Reflect X-axis
Flip across horizontal axis
Reflect Y-axis
Flip across vertical axis
Reflect Origin
Point reflection through origin
Reflect y=x
Flip across diagonal

projection

Project X
Collapse onto x-axis
Project Y
Collapse onto y-axis

Each 2×2 matrix produces a different transformation. The yellow square shows how the unit square transforms. Notice how some operations preserve area (rotations) while others change it (scaling).

Demo 3: Build Your Own Transformation

Edit the matrix entries directly and see instant results. Experiment! What happens when you make the determinant zero?

Edit Matrix Entries:
[
]
Determinant:1.00

The first column is where î (red) lands. The second column is where ĵ (green) lands. Try making the determinant zero—what happens to the grid?

Demo 4: Transformations in 3D

Everything extends to three dimensions. A 3×3 matrix transforms space by specifying where î, ĵ, and k̂ land.

The amber cube shows the transformed unit cube. Watch how the three basis vectors (red î, green ĵ, blue k̂) move—they completely determine the transformation.

Key Takeaways

  • Matrices are transformations—they act on all of space at once
  • Columns = basis images—where î and ĵ land determines everything
  • Grid lines stay straight—this is what makes it "linear"
  • Parallel lines stay parallel—another defining property
  • Same ideas in 3D—just more numbers, same intuition

Next: What happens when we apply one transformation after another?