TactivergeLite

Lite / Independent Engineering Research / Week 3

Rotation, shear, stretch and projection

Every 2×2 matrix is a picture. Can you guess what [[1, 1], [0, 1]] does to a square before you calculate anything?

About 40 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Robots rotate frames, cameras project 3D onto 2D, materials shear under load. Recognising these maps by their matrices lets you debug a transform at a glance.

Predict

Where does [[1, 1], [0, 1]] send the point (0, 1)?

  1. (0, 1)
  2. (1, 1)
  3. (1, 0)
Guess first, then reveal

The second column (1, 1) is where ĵ = (0, 1) lands. Points slide sideways by an amount equal to their height: a horizontal shear.

Discover

Load each preset in turn (rotate, shear, stretch, reflect, project). Before you look, predict where î and ĵ land from the matrix columns. Then drag a₂₂ towards 0 and watch the grid collapse.

What the interactive shows (text version)

The grid diagram draws the image of a square grid and the unit square under the chosen matrix, with î and ĵ as labelled arrows. Sliders set each entry; presets load rotation, shear, stretch, reflection and projection. Text reports the determinant and whether orientation flips or the plane collapses.

You can also open the interactive on the full site when you have a faster connection.

Watch (optional)

Watch for: The key move: a matrix is completely determined by where it sends the basis vectors.

Shows a matrix as a description of where the basis vectors land, so you can read a transformation straight off its columns.

“Linear transformations and matrices | Chapter 3, Essence of linear algebra” by 3Blue1Brown (opens YouTube; streaming video uses a lot of data)

The video is optional. Everything you need is in this lesson's text.

Understand

Columns are images of the basis

A·(x, y) = x·A(î) + y·A(ĵ). So column 1 is A(î) and column 2 is A(ĵ). Linear maps keep the origin fixed, keep lines straight and keep evenly spaced grid lines evenly spaced.

A catalogue

Rotation by θ: [[cos θ, −sin θ], [sin θ, cos θ]], det 1. Shear: [[1, k], [0, 1]], det 1. Stretch: [[s₁, 0], [0, s₂]], det s₁s₂. Reflection in the x-axis: [[1, 0], [0, −1]], det −1. Projection onto the x-axis: [[1, 0], [0, 0]], det 0.

Projections

A projection P drops each vector onto a subspace. Doing it twice changes nothing more, so P² = P. It squashes a direction to zero, so det P = 0 and there is no inverse: from the shadow you cannot recover the object. Projection onto a unit vector u is P = uuᵀ, which reappears in least squares.

Explain it another way

Intuitive

Draw the unit square. Move its two edges from the origin to the matrix columns. The square becomes a parallelogram, and every other shape follows the grid.

Technical

A rotation matrix is orthogonal: RᵀR = I, so R⁻¹ = Rᵀ and lengths and angles are preserved.

Applied

A camera's projection from 3D points to the image plane (after dividing by depth) is the reason one photo cannot give you depth: a whole line of points maps to one pixel.

Worked example 1

Write the matrix that rotates by 90° anticlockwise and check it sends (1, 0) to (0, 1).

θ = 90°: [[0, −1], [1, 0]]. First column (0, 1) is where î lands. ✓ Second column (−1, 0): ĵ goes to −î, also correct.

Worked example 2

Find the matrix projecting onto the line through u = (1, 1)/√2.

P = uuᵀ = ½[[1, 1], [1, 1]]. Check P² = ¼[[2, 2], [2, 2]] = P. ✓ P(1, 0) = (0.5, 0.5), the foot of the perpendicular.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. A sends î to (2, 0) and ĵ to (0, 3). What is A?
Practice 2. [[1, 0], [0, −1]] is a…

Practice 4. P projects onto a line. What is P³?

Apply it

Find a matrix that rotates by 45° and then stretches by 2 along x. Predict its columns by reasoning, then check with the transformation grid.

Reflect

Which of the five maps would you find hardest to recognise from its numbers alone?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Inverses: undoing a linear mapThe determinant as area scaling →