Matrix Multiplication
The entry of is row of dotted with column of . Sizes must chain: an matrix times an matrix is — the inner sizes agree, the outer sizes survive. Order matters: in general, the biggest habit change from ordinary algebra.
Why rows meet columns: column of is applied to column of , and applied to a vector produces, in slot , row of dotted with that vector. So the rule is not a convention; it is what "apply , then " forces. The size rule is the same fact: can only act on vectors with as many entries as has columns. A times a is , while a times a is not defined at all.
The system , is the single equation with and . Solving the system, inverting , and asking whether is a combination of the columns of are one question in three dialects.
Read column by column: . Solving the system means finding the weights that combine the columns into ; here , so . Had the two columns pointed along the same line, their combinations would fill only that line, most would be out of reach, and would have no inverse — the three dialects fail together.
and are dependent exactly when one is a multiple of the other; the first two coordinates force the multiplier to be , so — dependence is a rigid, all-coordinates condition.
Test the reasoning on a near miss: and agree on the multiplier in the first two coordinates and disagree in the third (), so they are independent. A single mismatched coordinate is enough; two vectors are dependent only when one multiplier works in every coordinate at once.
An image is a matrix of pixels; a social network is an adjacency matrix; a dataset is a rows-by-features matrix; a 3D scene is transformed by matrices sixty times a second. Matrix multiplication being composition is why graphics pipelines can collapse a chain of transformations into one matrix and apply it to millions of points.
Let , the rotation by counterclockwise. Predict from the geometry, then confirm it by multiplying.
Show the answerHide the answer
Prediction: two quarter-turns make a half-turn, which sends every vector to ; so should be . Computation, row times column: entry is ; entry is ; entry is ; entry is . So , as predicted. One step further: — four quarter-turns bring every vector home. Thinking in maps first turns matrix arithmetic into geometry you can check at a glance.
The Row Picture and the Column Picture
For a system, the row picture draws each equation as a line, and the solution is the point where the lines cross. The column picture reads as a combination of the columns , and the solution is the pair of weights that lands on . Same numbers, two geometries.
The two pictures are the two ways of computing . Entry by entry, slot of is row dotted with , so setting it equal to gives one equation — one line. All at once, is the columns weighted by the entries of . The row picture tells you where the answer is; the column picture tells you whether an answer can exist: is solvable exactly when lies in the span of the columns.
Solve , . Row picture first: the lines are and . They meet where the heights agree, , so : and .
Column picture: the columns are and , and the solution claims . Check: ✓. The row picture located the point ; the column picture reads the same numbers as a recipe — two of the first column, one of the second. Because the columns are not parallel (the determinant is not ), every in the plane has exactly one such recipe.
Compute for and . By columns, the entries of are the weights:
Combine slot by slot:
Check by rows: row 1 gives , row 2 gives , row 3 gives ✓. The shapes carry information too: a matrix takes vectors with entries to vectors with , so its outputs — combinations of just two columns — fill at most a plane inside . Most right-hand sides in are out of its reach.
Is a combination of and ? What about ? Write the general combination: . The first two coordinates force the weights.
For : the first two coordinates force , , and the third must then be — it is, so and the system has the solution . For the same weights are forced, but the third coordinate comes out : no solution. Geometrically, every combination satisfies , so the columns span that plane; lies in it and sits one unit above it.
A common slip multiplies by pairing with the columns: . That is , not . Rows meet the vector: . The column picture catches the error at once: must equal .
The system with has the solution . What is ? Find it with the column picture, then check with rows.
Show the answerHide the answer
By columns, the solution's entries are the weights: . By rows: and ✓. Since the columns and are not parallel (), is the only pair of weights that reaches .
Inverses and Transposes
The inverse undoes : , where has ones on the diagonal and zeros elsewhere. Only a square matrix can have one. Products invert in reverse order, , and transposes reverse the same way, . To find , row reduce until the left half is ; the right half is then .
The reversal is the socks-and-shoes rule: socks go on first, so they come off last. applies first, so undoing it must undo first: . The Gauss–Jordan recipe works because each row operation is multiplication on the left by a simple invertible matrix. The operations that turn into therefore multiply to , and applying the same operations to writes that product down.
Show that is the inverse of , then use it to solve , . For square matrices one product suffices: if , then as well.
Row times column: entry is ; entry is ; entry is ; entry is . So ✓. The system is ; multiplying both sides on the left by isolates : . Check in the original equations: and ✓.
Invert . Set up and clear below the first pivot with : .
The second pivot is already , so clear above it: gives . The left half is , so the right half is the inverse: . Check:
The same march works at any size. Had a row of zeros appeared in the left half, there would be no pivot to scale to , and would have no inverse.
Let (stretch by ) and (shear), so stretches, then shears. Undo each piece by geometry: halves , and shears back.
The shear happened last, so it must be undone first:
Check:
The other order, , fails: sends to , and sends to instead of back to .
is not . Take : , while — off by a factor of . And fails whenever and do not commute, as the stretch-and-shear example showed. The inverse of a product is the product of the inverses in reverse order; for a sum there is no rule at all.
Invert by Gauss–Jordan, and check your answer.
Show the answerHide the answer
Start from . is already upper triangular with every pivot equal to , so only upward clearing is needed, working from the last pivot up. removes the above the third pivot: row 2 becomes . Then removes the above the second pivot: row 1 becomes . Row 3 stays . So . Check row 1 of : against the three columns gives ✓, and rows 2 and 3 work the same way. The alternating signs have a reason: undoing "add the next coordinate" means subtracting it, then adding back what that subtraction took away.
Proofs & Why It Matters
Let and be the maps and . Column of is — feed the th basis vector through , then through .
But a linear map is determined by where it sends basis vectors, so the matrix whose columns are Is the matrix of . The row-times-column rule is just this computed entry by entry — and composition of maps is famously order-sensitive, which is why .
Each operation is reversible: swapping rows swaps back; scaling by undoes by ; adding (row ) to row undoes by subtracting. A solution of the old system satisfies every new equation (each new row is a combination of old rows), and reversibility gives the converse. So the solution set never changes on the way to echelon form.
Going Deeper: Explanations & Worked Problems
Everything about is visible in two special inputs. Feed in : out comes the first column of . Feed in : the second column.
Any other input is a combination , and linearity forces — matrix-times-vector is a weighted sum of columns. Example: sends the unit square spanned by to the parallelogram spanned by and : the plane is stretched, sheared, and every area is multiplied by . This picture explains the multiplication rule too: the columns of are applied to the columns of — do first, then — which is why and genuinely differ: shear-then-rotate is not rotate-then-shear.
Compute for , . Entry : row of dot column of : . Entry : row dot column : . Entry : row dot column : .
Entry : . So . Now the other order: — completely different, as composition order predicts. One determinant check seals both: , and ✓.
Solve , three compatible ways.
Way 1 — elimination: add the equations to kill : , so , then .
Way 2 — inverse matrix: has , so , and .
Way 3 — column picture: find weights making ; the weights and work. Three languages, one answer — and fluency means moving between them at will.