Matrix Operations
Multiplying two matrices means doing one transformation and then the other: is "apply , then ." That's why the order matters, and why each entry of comes from a row of dotted with a column of .
What the symbols mean
- Entry of the product
Row i of A times column j of B.
- Transpose
Rows become columns.
Explanation
A matrix product is simply two transformations done one after the other, packed into a single matrix. It's called "multiplication" because it follows a lot of the same rules as multiplying numbers, though not all of them. It's good for anything that happens in stages, like a robot arm with several joints or a 3D scene that gets moved, then viewed, then projected. The formula looks dense, but it's just this: take row of (one row of numbers), take column of (one column of numbers), multiply them in pairs and add. That's one entry, and you repeat it for every spot. Bear with the bookkeeping; the idea is simple.
Sizes must match. An times an gives : the inner sizes agree, the outer sizes survive. That makes sense once you see that a row of and a column of have to be the same length to be dotted together.
Columns view. You already know that sends a vector through the transformation . Column of is just times column of . So takes each column of and sends it through , which is why means "do first."
Order matters. and are usually different. Think about real moves: rotating a book and then sliding its top over isn't the same as sliding first and then rotating. There's an animation further down that shows exactly this with a rotation and a shear.
A common mistake. It's tempting to think matrices behave like numbers, so must mean or , and lets you cancel . Neither is true. A nonzero can flatten everything produces down to zero, and once information is flattened, you can't cancel your way back to it.
Identity. has 1s on the diagonal and 0s elsewhere. It's the "do nothing" transformation, so , the same way multiplying a number by 1 leaves it alone.
See it
Worked examples
Compute .
- 1
Dot each row of the first matrix with each column of the second. Row 1 gives , and row 2 gives .
Practice
Type your answer and check it. Solve them all to complete the lesson.
Compute , row by row.
Now compute , row by row.
A matrix times a matrix has what size? Give rows, columns.
Give the transpose of , row by row.
For , compute , row by row.
A market stall sells apples at \0.50$310468Q = \begin{bmatrix}10 & 4\ 6 & 8\end{bmatrix}\vec p = \binom{0.5}{3}Q\vec p$, the revenue each day.
The hardest one here. Get it, and you've got this lesson.
Find every matrix that commutes with (so ), and give the one with and , row by row.
Where it's used
A robot arm's pose is a product of joint matrices, and a 3D scene's vertices go through model, view and projection matrices multiplied together, in that order.