Mathematical Guide
⏱️ 2 min read (297 words)
How to Multiply Matrices Step-by-Step
C
By CalcSolver Editorial Team
Quick Answer: Matrix Multiplication in 3 Steps
1
Step 1: Check that columns of A = rows of B (otherwise multiplication is undefined)
2
Step 2: For each entry C[i][j], take the dot product of row i of A and column j of B
3
Step 3: Repeat for every row-column pair until the result matrix C (size m x p) is complete
Compatibility Rule Cheat Sheet
1
A (m x n) times B (n x p) is valid only when inner dimensions match (n = n)
2
Result matrix C has dimensions m x p (outer dimensions)
3
Matrix multiplication is NOT commutative: A x B ≠ B x A in general
4
Matrix multiplication IS associative: (A x B) x C = A x (B x C)
5
Matrix multiplication distributes over addition: A x (B + C) = A x B + A x C
Copyable Steps for the 2x2 Example
1
A = [[1, 2], [3, 4]]
2
B = [[5, 6], [7, 8]]
3
C[1][1] = (1×5)+(2×7) = 19
4
C[1][2] = (1×6)+(2×8) = 22
5
C[2][1] = (3×5)+(4×7) = 43
6
C[2][2] = (3×6)+(4×8) = 50
7
Result: C = [[19, 22], [43, 50]]
Q1Can you multiply a 3x3 matrix by a 3x1 matrix?
Yes. A 3x3 matrix times a 3x1 matrix (a column vector) produces a 3x1 result, since the inner dimensions (3 and 3) match.
Q2Is matrix multiplication commutative?
No. In general, A x B does not equal B x A. Order matters, and in many cases one order isn't even defined due to dimension mismatches.
Q3What is the identity matrix's role in multiplication?
The identity matrix I acts like the number 1 in scalar multiplication: for any compatible matrix A, A x I = A and I x A = A.
Q4What happens if the dimensions don't match?
The multiplication is undefined and cannot be performed. Always verify that the number of columns in the first matrix equals the number of rows in the second before starting.