Algebra 2

Matrices: Grids of Numbers

A matrix is just a rectangular grid of numbers. But these grids can do some amazing things — they can rotate shapes, stretch them, flip them, and even describe systems of equations. Let’s start simple and build up.

Part 1: What Is a Matrix?

A matrix is written inside brackets. Here’s a 2x2 matrix (2 rows, 2 columns):

\begin0 a & b \\ c & d \end0

Each number in the grid is called an entry. The entries in a 2x2 matrix can transform points on a plane — that’s where things get really interesting.


Part 2: Matrix Transformations

A 2x2 matrix can transform the point (x, y) into a new point (x’, y’) using this rule:

\begin0 x' \\ y' \end0 = \begin0 a & b \\ c & d \end0 \begin0 x \\ y \end0 = \begin0 ax + by \\ cx + dy \end0

Let’s see this in action. Use the sliders to set the four entries of a 2x2 matrix, and we’ll watch how it transforms the point (1, 0) and (0, 1):

a (top-left)1
-33
b (top-right)0
-33
c (bottom-left)0
-33
d (bottom-right)1
-33
\begin0 1 & 0 \\ 0 & 1 \end0

The matrix maps the basis vectors to new positions. Let’s plot what happens to the line y = x under this transformation. The matrix maps each point (t, t) to a new location:

-5-4-3-2-112345-5-4-3-2-112345Original y = xTransformed
Try This

Try these famous transformations:

  • Identity: a=1, b=0, c=0, d=1 — nothing changes!
  • Scale by 2: a=2, b=0, c=0, d=2 — everything doubles
  • Reflect over x-axis: a=1, b=0, c=0, d=-1
  • Rotate 90 degrees: a=0, b=-1, c=1, d=0
  • Shear: a=1, b=1, c=0, d=1 — slants everything sideways

Part 3: Scaling

When the matrix is diagonal (b = 0 and c = 0), it simply scales:

\begin0 s_x & 0 \\ 0 & s_y \end0
Scale X1
-33
Scale Y1
-33
-5-4-3-2-112345-5-4-3-2-112345y = x (original)Scaled
Connection

The identity matrix is the scaling matrix with both scales = 1. It’s the matrix equivalent of multiplying by 1 — it does nothing. Every matrix has this “do nothing” partner.


Part 4: Rotation

A rotation by angle theta uses this matrix:

\begin0 \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end0
Angle (radians)0
06.28
-5-4-3-2-112345-5-4-3-2-112345OriginalRotated
Try This

Watch the rotation:

  • At theta = 0, the line doesn’t move
  • At theta = pi/4 (about 0.785), the line becomes vertical
  • At theta = pi/2 (about 1.571), y = x maps to y = -x
  • At theta = pi (about 3.14), everything rotates 180 degrees

Part 5: The Determinant — Does the Matrix Squish or Stretch?

The determinant of a 2x2 matrix tells you how much the matrix changes areas:

\det \begin0 a & b \\ c & d \end0 = ad - bc
det=1×10×0\det = 1 \times 1 - 0 \times 0
Challenge

Challenge: Go back to the transformation sliders and set:

  1. a=2, b=0, c=0, d=3. What’s the determinant? (6 — areas get 6x bigger)
  2. a=1, b=2, c=2, d=4. What’s the determinant? (0 — the matrix is singular!)
  3. Can you find settings where the determinant equals exactly 1?

Wrapping Up

ConceptWhat It Means
MatrixA rectangular grid of numbers
2x2 transformationMaps (x, y) to (ax+by, cx+dy)
Identity matrixDoes nothing — the “1” of matrices
DeterminantHow much areas change; 0 means not invertible
Rotation matrixUses cos and sin to rotate points

Matrices are one of the most powerful tools in mathematics. They’re used in computer graphics (every 3D game uses matrices!), physics, engineering, machine learning, and much more. This is just the beginning.

Take the Quiz