Thinking About Functions Geometrically

A **linear transformation** is a function that takes vectors as input and outputs vectors. But here's the key insight: instead of thinking about transforming individual vectors, think about **transforming the entire space**.

Imagine the 2D plane as an infinite grid. A linear transformation moves every point in this grid to a new location. The magic is that **grid lines remain parallel and evenly spaced**, and the origin never moves.

Definition: A transformation \(T\) is **linear** if:
$$ T(\vec{v} + \vec{w}) = T(\vec{v}) + T(\vec{w}) $$ $$ T(c\vec{v}) = c \cdot T(\vec{v}) $$

Interactive Transformation Playground

Click on different transformations below to see how they transform the grid and basis vectors. The red lines show where the original \(\hat{i}\) and \(\hat{j}\) vectors land.

Identity
[ 1 0 ]
[ 0 1 ]

Does nothing

90° Rotation
[ 0 -1 ]
[ 1 0 ]

Rotate counterclockwise

Shear
[ 1 1 ]
[ 0 1 ]

Slant to the right

Scale 2x
[ 2 0 ]
[ 0 2 ]

Expand uniformly

Reflect Y-axis
[-1 0 ]
[ 0 1 ]

Mirror flip

Projection
[ 1 0 ]
[ 0 0 ]

Squash to line

det(A) = 1.00
î ĵ
What you're seeing: The grid represents our coordinate system. The basis vectors \(\hat{i}\) (blue) and \(\hat{j}\) (orange) define where the x and y axes point. When we apply a transformation matrix, we're essentially telling the space where these basis vectors should land.

Matrices: Where Do Basis Vectors Land?

Here's the beautiful insight: **a matrix is just a compact way to describe where \(\hat{i}\) and \(\hat{j}\) land after the transformation**.

$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} $$

This means:

  • \(\hat{i} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}\) lands at \(\begin{bmatrix} a \\ c \end{bmatrix}\)
  • \(\hat{j} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}\) lands at \(\begin{bmatrix} b \\ d \end{bmatrix}\)
Example: The matrix \(\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}\)
  • Sends \(\hat{i}\) to \(\begin{bmatrix} 2 \\ 0 \end{bmatrix}\) → stretches x-axis by 2
  • Sends \(\hat{j}\) to \(\begin{bmatrix} 0 \\ 3 \end{bmatrix}\) → stretches y-axis by 3

Gallery of Common Transformations

Rotation by θ

$$ R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} $$

Rotates the entire plane counterclockwise by angle θ. Preserves distances and angles.

Shear

$$ S = \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix} $$

Keeps \(\hat{i}\) fixed, but slides \(\hat{j}\) to the right by \(k\hat{i}\). Creates a slanting effect.

Scaling

$$ S = \begin{bmatrix} s_x & 0 \\ 0 & s_y \end{bmatrix} $$

Stretches space by \(s_x\) in x-direction and \(s_y\) in y-direction.

Projection onto x-axis

$$ P = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} $$

Collapses the y-dimension. Every point lands on the x-axis. **Not invertible.**

The Determinant: How Much Does Area Change?

The **determinant** of a matrix tells you how much the transformation scales areas. A unit square (area = 1) becomes a parallelogram with area = |det(A)|.

Key Facts:
  • det(A) = 1: Transformation preserves area (e.g., rotation)
  • det(A) = 0: Transformation squashes space to a lower dimension (not invertible)
  • det(A) < 0: Transformation flips orientation (like a mirror)
  • det(A) = 2: Every area doubles
$$ \det\begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc $$

Composition: Doing Multiple Transformations

What if we want to rotate **then** shear? We compose transformations by **multiplying matrices**. But there's a twist: **order matters**.

Matrix Multiplication = Composition of Transformations

If you apply transformation \(M_1\) followed by \(M_2\), the combined effect is:
$$ M_2 \cdot M_1 $$
Notice we read **right to left**: \(M_1\) happens first!
Example: Rotate 90° then scale by 2
$$ \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -2 \\ 2 & 0 \end{bmatrix} $$

The Inverse: Undoing a Transformation

If a transformation is invertible (det ≠ 0), you can "undo" it. The **inverse matrix** \(A^{-1}\) reverses the transformation.

$$ A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} $$
Geometric Meaning: If \(A\) rotates 90° clockwise, then \(A^{-1}\) rotates 90° counterclockwise. If \(A\) scales by 3, then \(A^{-1}\) scales by 1/3.

Why This View Matters

Thinking of matrices as **transformations of space** rather than grids of numbers changes everything:

  • Matrix multiplication becomes "do one transformation, then another"
  • Determinant becomes "how much does this stretch/shrink area?"
  • Eigenvalues become "which vectors just get scaled, not rotated?"
  • Column space becomes "where does the space get squashed into?"

This geometric intuition is the foundation for understanding **all of linear algebra**.

← Back to Blog