CoursesAIMathCodePhysicsAbout and FAQ

TwiddleLab / Math / Vectors and Matrices

Read a Matrix by Its Columns

Lesson 8 of 12 · 7 min · Free, no account needed

What you will learn

  • A linear move is decided by where i hat = (1, 0) and j hat = (0, 1) land.
  • Write those two landing spots as the columns of a 2 by 2 matrix.
  • Any vector follows the same recipe: M(x, y) = x · column 1 + y · column 2.

Start the lesson

How the lesson goes

  1. Four numbers in a box can describe any stretch, skew or turn of the whole plane. Which four?

  2. Steer the whole grid with two arrows.

    Drag the heads of the orange arrow (i hat) and the violet arrow (j hat) to match each dashed grid.

  3. This matrix moved the grid. Where does (2, 1) land?

    Drag the blue marker, then Check.

    M(2, 1) = 2 · (2, 1) + 1 · (-1, 1) = (3, 3).

  4. Those four numbers are a matrix.

    A matrix is a box of numbers. A 2 by 2 matrix moves the plane.

    Its columns are where i hat (orange) and j hat (violet) land.

    Any vector follows the recipe: M(x, y) = x · column 1 + y · column 2.

  5. Write the matrix for each grid.

    Orange column first, then violet. Two rounds.

    A quarter turn left sends (1, 0) to (0, 1) and (0, 1) to (-1, 0). Those are the columns.

  6. Design your own matrix.

    Put the two heads anywhere you like.

  7. Game: target practice. No grid to help you.

    Only the numbers of the matrix. Work out where each vector lands and fire.

  8. A layer of a neural network is a matrix: h = W x.

    W = [[2, 1], [1, 3]] and x = (1, 2). What is h₁, the first number of h?

    W x = 1 · (2, 1) + 2 · (1, 3) = (4, 7), so h₁ = 4.

  9. Make the grid move by this matrix: [[0, -1], [2, 0]].

    Drag the orange and violet heads.

    The first column (0, 2) is where i hat goes, the second (-1, 0) is where j hat goes.

  10. A matrix is where i hat and j hat land, written as columns.

    Apply your matrix to the logo. Then apply it again.

Previous lesson: A Matrix Moves the Grid · Next lesson: Two Moves in a Row · Part of the course: Vectors and Matrices

Lessons are interactive and need JavaScript. Turn it on to play them.

Loading TwiddleLab