Matrix Multiplication Examples- Practice Problems
Matrix Multiplication Examples That Actually Make Sense
Most textbooks turn a simple concept into a nightmare. Here's the truth: matrix multiplication is just systematic multiplication and addition. Once you see the pattern, you'll wonder why anyone made it seem complicated.
What You Need Before Multiplying
Two matrices can multiply only if the columns of the first matrix equal the rows of the second matrix.
Say you have a 2Ć3 matrix and a 3Ć4 matrix. The inner numbers match (both are 3), so multiplication works. The result will be a 2Ć4 matrix.
If those numbers don't match, stop. There's no point trying to multiply.
How to Multiply Two Matrices
Here's the process:
- Take each row of the first matrix
- Multiply it element-by-element with each column of the second matrix
- Add up those products
- That sum becomes one entry in your result matrix
That's it. Every single entry comes from one row times one column.
Example 1: Simple 2Ć2 Multiplication
Multiply:
A = [2, 3]
ćć[1, 4]
B = [5, 1]
ćć[2, 6]
Step 1: Find entry (1,1)
Row 1 of A = [2, 3]
Column 1 of B = [5, 2]
2Ć5 + 3Ć2 = 10 + 6 = 16
Step 2: Find entry (1,2)
Row 1 of A = [2, 3]
Column 2 of B = [1, 6]
2Ć1 + 3Ć6 = 2 + 18 = 20
Step 3: Find entry (2,1)
Row 2 of A = [1, 4]
Column 1 of B = [5, 2]
1Ć5 + 4Ć2 = 5 + 8 = 13
Step 4: Find entry (2,2)
Row 2 of A = [1, 4]
Column 2 of B = [1, 6]
1Ć1 + 4Ć6 = 1 + 24 = 25
Result:
[16, 20]
[13, 25]
Example 2: Different Dimensions
Multiply:
A = [1, 2, 3]
ćć[4, 5, 6]ććThis is a 2Ć3 matrix
B = [7, 8]
ćć[9, 10]
ćć[11, 12]ććThis is a 3Ć2 matrix
The result will be 2Ć2.
Entry (1,1): Row 1 Ć Column 1
(1Ć7) + (2Ć9) + (3Ć11) = 7 + 18 + 33 = 58
Entry (1,2): Row 1 Ć Column 2
(1Ć8) + (2Ć10) + (3Ć12) = 8 + 20 + 36 = 64
Entry (2,1): Row 2 Ć Column 1
(4Ć7) + (5Ć9) + (6Ć11) = 28 + 45 + 66 = 139
Entry (2,2): Row 2 Ć Column 2
(4Ć8) + (5Ć10) + (6Ć12) = 32 + 50 + 72 = 154
Result:
[58, 64]
[139, 154]
Example 3: Real-World Style Problem
A store sells 3 products. Matrix P shows units sold this week:
P = [20, 15, 8]ćProduct A, B, C
Matrix C shows prices and weights:
C = [25, 2]
ćć[40, 3]
ćć[15, 1]
Column 1 = price per unit, Column 2 = weight per unit
What does P Ć C give you?
Since P is 1Ć3 and C is 3Ć2, result is 1Ć2.
Entry (1,1): Total revenue
(20Ć25) + (15Ć40) + (8Ć15) = 500 + 600 + 120 = $1,220
Entry (1,2): Total weight
(20Ć2) + (15Ć3) + (8Ć1) = 40 + 45 + 8 = 93 units
One multiplication, two answers. That's the power of matrix math.
Practice Problems
Problem 1
Multiply:
[3, 1] Ć [2, 5]
ććć[4, 6]
Problem 2
Multiply:
[1, 0, 2] Ć [3, 1]
ćććććć[2, 4]
ćććććć[1, 0]
Problem 3
If A = [2, 1] and B = [3], find A Ć B.
ććććć[1, 3]ććć[1]
ććććććććććć [2]
Problem 4
Multiply these 3Ć3 matrices:
[1, 2, 3] Ć [1, 0, 0]
[4, 5, 6]ć[0, 1, 0]
[7, 8, 9]ć[0, 0, 1]
Solutions
Solution 1
[3, 1] Ć [2, 5] = [(3Ć2 + 1Ć4), (3Ć5 + 1Ć6)] = [10, 21]
ććć[4, 6]
Solution 2
[1, 0, 2] Ć [3, 1] = [5, 1]
ćććććć[2, 4]
ćććććć[1, 0]
Check: (1Ć3 + 0Ć2 + 2Ć1) = 5
(1Ć1 + 0Ć4 + 2Ć0) = 1
Solution 3
[2, 1] Ć [3] = [7, 5]
[1, 3]ć[1]ć[6, 6]
ćććć [2]
Entry (1,1): 2Ć3 + 1Ć1 = 7
Entry (1,2): 2Ć1 + 1Ć3 = 5
Entry (2,1): 1Ć3 + 3Ć1 = 6
Entry (2,2): 1Ć1 + 3Ć3 = 10
Solution 4
This is multiplication by the identity matrix. The result equals the original matrix:
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
Common Mistakes
| Mistake | What Actually Happens |
|---|---|
| Multiplying in wrong order | AĆB ā BĆA in most cases. Order matters. |
| Forgetting to check dimensions | If columns of A ā rows of B, multiplication fails |
| Multiplying corresponding positions only | That's element-wise multiplication, not matrix multiplication |
| Skipping the addition step | Each entry is a sum of products, not just one product |
When You'll Actually Use This
Computer graphics use matrix multiplication to rotate, scale, and move objects. Neural networks multiply huge matrices of weights and inputs. Game physics engines do it thousands of times per second.
The examples above are tiny. Real applications involve matrices with hundreds of rows and columns. But the process is identical. You now have the foundation.