Lite / Intelligent Robotic Systems / Week 13
A matrix is a machine that moves vectors
Four numbers in a box can rotate, stretch, shear or flip an entire plane at once. How do they know where everything goes?
Why should I care?
Robots move thousands of points (sensor returns, mesh vertices, link positions) the same way at the same time. A matrix packages that 'same way' into a few numbers, and multiplying by it moves every point in one go. Graphics cards, robot kinematics and navigation filters are, underneath, very fast matrix multipliers.
- Multiply a 2×2 matrix by a vector.
- Read a matrix's columns as the images of the basis vectors (1, 0) and (0, 1).
- Interpret the determinant as an area scale factor.
Predict
M = [2 0; 0 1] (rows separated by ;). What does it do to the plane?
- Rotates it
- Stretches it to twice as wide, same height
- Doubles everything
- Flips it
Guess first, then reveal
It doubles every x coordinate and leaves y alone: (x, y) → (2x, y). The unit square becomes a 2 × 1 rectangle, so areas double (det = 2).
Discover
Try each preset and describe it in words. Then choose Custom and build: (a) a matrix that triples heights only, (b) one that swaps x and y, (c) one that squashes the plane onto a line. For each, watch where the orange (1, 0) and green (0, 1) arrows land, and the determinant.
What the interactive shows (text version)
The matrix grid shows the plane before (fine grid) and after (blue grid) applying the matrix. An orange arrow shows where (1, 0) lands, a green arrow where (0, 1) lands, and a purple patch shows the transformed unit square. A test point (1.5, 1) and its image P′ are joined by a dashed arrow. The readout lists the matrix, both columns, P′ and the determinant.
Watch (optional)
Watch for: Watch for every vector being 'so much of (1, 0) plus so much of (0, 1)'. That's why knowing where the two basis arrows go tells you where everything goes.
Shows every 2D vector as a mix of two basis arrows, which is exactly why a matrix's columns tell you where those arrows land.
“Linear combinations, span, and basis vectors | Chapter 2, 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
The recipe
For M = [a b; c d] and v = (x, y): M·v = (a·x + b·y, c·x + d·y). Each output component is one row of M dotted with v. A 2×2 matrix takes a 2D vector to another 2D vector.
Columns are where the axes land
M·(1, 0) = (a, c), the first column. M·(0, 1) = (b, d), the second column. Any vector (x, y) = x·(1, 0) + y·(0, 1), so M·v = x·(column 1) + y·(column 2). To design a matrix, decide where (1, 0) and (0, 1) should go and write those as columns. Grid lines stay straight, parallel and evenly spaced: that's what 'linear' means.
The determinant
det M = ad − bc is the factor by which areas change. det = 1: areas kept (rotations). det = 2: doubled. Negative: the plane is flipped over (a mirror image). det = 0: the plane is squashed onto a line or a point, information is lost, and the matrix cannot be undone.
Explain it another way
Intuitive
A matrix is a recipe card: 'send east to here, send north to there'. Every other direction is a mix of east and north, so it follows along. The whole grid moves like a stretchy sheet that keeps its lines straight.
Technical
A 2×2 real matrix represents a linear map ℝ² → ℝ² in the standard basis. Linearity: M(αu + βv) = αMu + βMv. The determinant is the signed area of the image of the unit square; M is invertible exactly when det M ≠ 0.
Mathematical
M = [1 1; 0 1] (shear), v = (1.5, 1): M·v = (1.5 + 1, 1) = (2.5, 1). det = 1 × 1 − 1 × 0 = 1: the square becomes a slanted parallelogram of the same area.
Applied
Image processing scales and shears photos with 2×2 matrices; a robot's camera calibration contains a small matrix that turns pixel offsets into directions.
Worked example 1
Find [2 −1; 1 3]·(4, −2).
Row 1: 2×4 + (−1)×(−2) = 8 + 2 = 10. Row 2: 1×4 + 3×(−2) = 4 − 6 = −2. Answer (10, −2).
Common mix-ups
The rows of a matrix tell you where the axes go.
✓ The columns do: column 1 is where (1, 0) lands, column 2 where (0, 1) lands.A negative determinant means the matrix shrinks things.
✓ The size of det is the area factor; the minus sign means a flip (mirror image).
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Design a matrix that makes a 'italic' slant to the right by 0.3 per unit of height and also squashes heights to 80%. Test it in Custom mode on the grid and give its determinant.
Reflect
Why can't a matrix move the origin? What does that suggest we'll need for moving robot frames around?
Write your answer on paper or in your own notes. Lite never stores what you write.
Go further
- Linear map (Wikipedia)
The general idea behind matrices as transformations.