🧮 Algebra
🗂️Introduction to Matrices
Numbers arranged in a grid, added cell by cell, multiplied row times column — and at the end one matrix rotates an entire figure by 90 degrees.
Data lined up in rows and columns forms a matrix — a tidy table of numbers. The pixels on your screen, a league table, the score sheets of three classes: all relatives of matrices. Do not underestimate the table — it can do arithmetic on its own, and it can move an entire figure in one sweep.
Matrix addition and scalar multiplication
Adding two matrices of the same shape follows a rule too plain to memorize: add the entries at matching positions.
Scalar multiplication also goes cell by cell: . Matrices of different shapes cannot be added — the positions do not even line up.
Row times column: the main event
The coefficients of simultaneous equations arrange into a matrix as old partners; multiplication itself, though, refuses to work cell by cell. Its rule is row times column: the entry in row i, column j of the result comes from row i of the left matrix meeting column j of the right one — multiply pairwise, then add. Watch:
The top-left 5 comes from row meeting column : . The other three cells follow the same recipe.
Verify every cell yourself
Top-right 1: row meets column , . Bottom-left 2: row meets column , . Bottom-right 0: . All four check out.
Order matters
Among plain numbers ; matrices lose that freedom. Swap the order of the two matrices above:
Earlier the answer was ; now it comes out — swap the order and the whole answer changes. In the matrix world, generally fails.
Moving shapes with matrices
The strange row-times-column rule reveals its true meaning in geometry. In the coordinate plane, write the point as a column and let a matrix multiply it from the left:
The new point is — exactly a 90° counterclockwise rotation about the origin. Try two points: , pointing due east, turns to , due north; turns to .
Send (3, 1) flying
Substitute: the new x-coordinate , and the new y-coordinate , giving . One 2×2 matrix, one multiplication, and the point has turned 90° — a figure is built from thousands of points, and a single matrix turns them all at once.
A matrix plus the instruction "multiply by me" is a geometric command. Beyond rotation come reflections and stretches — the whole repertoire of Transformations is within a matrix's reach.
Check yourself
Quick quiz
1. What is [1,2,3,4] plus [5,6,7,8] (two rows, two columns, listed by rows)?
2. Does matrix multiplication satisfy AB = BA?
3. Using the rotation matrix, turn the point (2, 1) counterclockwise by 90°. What do you get?