Matrix products
A matrix product contains the dot product of each left-hand row with each right-hand column.
On this page 7 sections
01For C=AB, the entry C_12 uses row 1 of A and column 2 of B#
For , the entry uses row 1 of A and column 2 of B. Here they are and .
For , row pairs with column . The matching products are and . Add them for row 1, column 2.
A has rows , ; B has rows , . For , compute .
Show answer and explanation
Row 2 dots column 1: .
02Each left row must have as many entries as each right column#
Each left row must have as many entries as each right column. Thus can multiply . Two left rows paired with four right columns give a output.
A is ; B is . A learner says AB is . Repair its shape.
Show answer and explanation
Three A rows and one B column give a result.
03A product entry uses a whole row and column, even when both matrices have the same shape#
A product entry uses a whole row and column, even when both matrices have the same shape. Multiplying only corresponding entries skips the other products. If the inner dimensions differ, these dot products are undefined.
A has score rows P , Q . B has observation columns U , V . Find score Q for observation V.
Show answer and explanation
Dot Q with V: .
For entry (i,j), dot row i of the left matrix with column j of the right matrix.
- Compute the entries of a compatible matrix product.
Sources & further reading
- [1]Goodfellow, Bengio and Courville: Deep Learning, 2.1–2.2 ↗Goodfellow, Bengio and Courville · Book
- [2]MIT 18.06SC: Lecture 3, Multiplication and Inverse Matrices ↗MIT 18.06SC · Book