techtree / Linear algebra / ← prev 7 of 26 next →
Matrix times matrix
Multiply a matrix by many vectors at once.
Transcript
A matrix times a vector gives a vector. Now set several vectors side by side, as the columns of a second matrix.
Multiply by the first column, and you get the first column of the answer: four, thirteen.
Multiply by the second column, and you get the second column: seven, seventeen.
So each entry of the answer is one row of the left matrix, dotted with one column of the right. Zero times zero, plus three times one, plus seven times two: seventeen.
For this to work, each row on the left must be as long as each column on the right. Three, and three. Two by three, times three by two, gives two by two.
Order matters. Swap the two, and you get a different answer. Here it is not even the same size.
A matrix times a matrix is many matrix-vector products, done at once.
Needs
- Matrix times vector video
Each output entry is a dot product of one row with the vector.
Everything this builds on (5 topics, in order)
Leads to
This is the top of the tree.