Step-by-Step Calculation
Matrix multiplication (row × column):
- Confirm the columns of the first matrix match the rows of the second — otherwise multiplication is undefined.
- For each result cell, take a row from the first matrix and a column from the second.
- Multiply corresponding entries together and sum them.
Worked Example
Multiply [[1,2],[3,4]] × [[5,6],[7,8]]:
Top-left: (1×5)+(2×7) = 19. Top-right: (1×6)+(2×8) = 22.
Bottom-left: (3×5)+(4×7) = 43. Bottom-right: (3×6)+(4×8) = 50.
Result: [[19,22],[43,50]]
Frequently Asked Questions
Is matrix multiplication commutative?
No — A×B usually does not equal B×A, unlike regular number multiplication. Order matters and changing it produces a different result.
What size matrices can I multiply?
Any m×n matrix can be multiplied by an n×p matrix — the inner dimensions must match, and the result is always an m×p matrix, regardless of how large or small the original matrices are.