How do I calculate one entry of a matrix product without losing track of rows and columns?
Quick answer
To find entry (i, j) of AB, take row i of A and column j of B. Multiply their entries in matching positions, then add those products. Keep the row and column labels visible until the sum is finished. For the complete product, repeat this for each output position; the number of columns in A must equal the number of rows in B.
The question, the details, the next step.
A practical checklist
Confirm that A’s number of columns equals B’s number of rows.
Label the output position (row, column) before selecting entries.
Copy that row from A and that column from B in order.
Multiply entries in matching positions, then add the signed products.
Place the sum in the labeled output position and check the final shape.
A few more useful answers
Why does the product have the same row count as A and column count as B?
Each output row is associated with a row of A, and each output column with a column of B. In the example, A is 2 × 3 and B is 3 × 2, so AB is 2 × 2.
Do I multiply entries across a row of A by entries across a row of B?
No. For AB, choose a row of A and a column of B. Pair their entries in order, multiply each pair, and add the results.
What if the number of columns in A does not match the number of rows in B?
Then the row and column entries cannot be paired all the way across, so AB is not defined. Check the dimensions before calculating.
Sources
References used for this guide.
- [S1] OpenStax Algebra and Trigonometry: Computing Product Entries Row by Column openstax.org · Checked
