Matrix Multiplication

Master the Art of Row Γ— Column

β‘  Problem 1
Very Easy
πŸ’‘ Memory Key: "Row Γ— Column Game" In matrix multiplication, take each row from the first matrix and multiply it by each column from the second matrix. That's it!
Basic 2Γ—2 Multiplication
Multiply the following matrices:
A = [ 1 2 3 4 ]
Γ—
B = [ 2 0 1 3 ]
🎯 Quick Tip: Use the "Dot Product" For position (1,1): Take row 1 of A and column 1 of B, then multiply and add: (1Γ—2) + (2Γ—1) = 4
Understanding: Why do we multiply row by column? Because each element in the result tells you "how much" the first matrix's direction combines with the second matrix's direction. It's measuring the overlap.
1 Position (1,1): Row 1 of A Γ— Column 1 of B = (1Γ—2) + (2Γ—1) = 4
2 Position (1,2): Row 1 of A Γ— Column 2 of B = (1Γ—0) + (2Γ—3) = 6
3 Position (2,1): Row 2 of A Γ— Column 1 of B = (3Γ—2) + (4Γ—1) = 10
4 Position (2,2): Row 2 of A Γ— Column 2 of B = (3Γ—0) + (4Γ—3) = 12

Answer:

Try calculating on your own first. Hint: A 2Γ—2 times a 2Γ—2 gives a 2Γ—2 result!

β‘‘ Problem 2
Very Easy
πŸ’‘ Key Insight: "Columns of First = Rows of Second" An m Γ— n matrix can only multiply with an n Γ— k matrix. The inner numbers MUST match!
Recognizing Multiplicability
Can you multiply these matrices? If yes, what will be the size of the result?
C = [ 1 0 2 3 1 4 ] (2Γ—3)
Γ—
D = [ 5 1 2 3 0 4 ] (3Γ—2)
(m Γ— n) Γ— (n Γ— k) = (m Γ— k) βœ“ Possible!
Why This Matters: The Rule: The number of columns in the first matrix must equal the number of rows in the second matrix. If they don't match, multiplication is impossible. Here: First has 3 columns, second has 3 rows. βœ“ Perfect match!
1 Check: Does "3 columns of C" = "3 rows of D"? Yes! βœ“
2 Result size: Keep outer dimensions = 2 Γ— 2

Question: What is the shape of C Γ— D?

Remember: result takes rows from first matrix and columns from second matrix!

β‘’ Problem 3
Very Easy
πŸ’‘ The "Order Matters" Trap! A Γ— B β‰  B Γ— A usually. Matrix multiplication is NOT commutative. Don't assume they're the same!
Why Order Matters (Non-Commutativity)
Calculate A Γ— B and B Γ— A separately. Are they equal?
A = [ 1 0 0 2 ]

B = [ 3 1 2 4 ]
The BIG Insight: Matrix multiplication does NOT commute! This is a huge difference from regular number multiplication (where 3Γ—5 = 5Γ—3). Think of it like directions: "walk right then up" is different from "walk up then right". They land you in different spots!
1 A Γ— B: Use rows of A with columns of B
2 B Γ— A: Use rows of B with columns of A
3 Compare: Are they the same? (Probably not!)

Task: Calculate both products and show they're different.

This proves the order ALWAYS matters in matrix multiplication!

β‘£ Problem 4
Very Easy
πŸ’‘ Multiplying by Identity Matrix The Identity Matrix I is like "1" in regular multiplication: A Γ— I = A. It doesn't change anything!
The Magic of Identity Matrix
Multiply this matrix by the identity matrix:
A = [ 5 7 2 9 ]
Γ—
I = [ 1 0 0 1 ]
Why This Works: Identity Matrix secret: It has 1's on the diagonal and 0's everywhere else. When you multiply any matrix by I, you get the original matrix back. The zeros "kill" unwanted terms, and the ones "keep" what matters!
1 Row 1 of A Γ— Column 1 of I: (5Γ—1) + (7Γ—0) = 5
2 Row 1 of A Γ— Column 2 of I: (5Γ—0) + (7Γ—1) = 7
3 Do the same for row 2 and you'll see: A Γ— I = A

Prediction: What will A Γ— I equal?

Spoiler: It's the same as A! The identity doesn't change anything.

β‘€ Problem 5
Very Easy
πŸ’‘ The Zero Matrix Trick When you multiply ANY matrix by a zero matrix (all 0's), you always get a zero matrix. It's like multiplying by 0!
What Happens with Zero Matrix?
Calculate this product:
P = [ 10 20 30 40 50 60 ]
Γ—
O = [ 0 0 0 0 0 0 0 0 0 ]
The Pattern: Anything Γ— 0 = 0. When every entry in the second matrix is 0, then every calculation becomes: (something Γ— 0) + (something Γ— 0) + ... = 0 + 0 + ... = 0. Every position in the result is 0!
1 Row 1, Column 1: (10Γ—0) + (20Γ—0) + (30Γ—0) = 0
2 Every other position: Same logic = 0

Final Answer: What does P Γ— O equal?

Spoiler: It's a 2Γ—3 zero matrix. Matrix multiplication by zero always gives zero!

β‘₯ Problem 6
Very Easy
πŸ’‘ Three Matrices in a Row: Associativity (A Γ— B) Γ— C = A Γ— (B Γ— C) β€” You can group them differently, but you still must keep the order!
Associative Property: Different Grouping, Same Result
Given three matrices, you can multiply left to right OR smart grouping. Show that the order of matrices matters, but how you group them doesn't.
A = [ 1 2 ] (1Γ—2)
B = [ 3 4 ] (2Γ—1)
Key Difference: Commutative? NO: A Γ— B β‰  B Γ— A (different sizes!)
Associative? YES: (A Γ— B) Γ— C = A Γ— (B Γ— C) (same result!)
1 A Γ— B: (1Γ—2) Γ— (2Γ—1) = (1Γ—1) result. Calculate: (1Γ—3) + (2Γ—4) = 11
2 Result is a 1Γ—1 matrix (just one number!): [11]

Insight: A 1Γ—2 times a 2Γ—1 gives a 1Γ—1. That's a scalar (just a number)!

This is actually the definition of the dot product in linear algebra!

⑦ Problem 7
Very Easy
πŸ’‘ Multiplying by a Column Vector A column vector is just a matrix with 1 column. This is super common in computer graphics and AI!
Matrix Γ— Column Vector (Real-World Application)
In computer graphics, you transform a point using matrix multiplication. Calculate:
Transform = [ 2 1 0 3 ]
Γ—
Point = [ 4 5 ]
Why This Matters (Real World): Graphics transformation: In video games, you rotate, scale, or move objects using matrix multiplication. The matrix "transforms" the position vector to a new location. Pretty cool, right?
1 Row 1: (2Γ—4) + (1Γ—5) = 8 + 5 = 13
2 Row 2: (0Γ—4) + (3Γ—5) = 0 + 15 = 15
3 New point: [13, 15] ← The transformed position!

Result: Where does the point move to?

This type of calculation powers video games, 3D movies, and computer vision!

β‘§ Problem 8
Very Easy
πŸ’‘ The Transpose Trick If you multiply A Γ— B and get stuck, flip B upside-down (transpose it) to change rows ↔ columns!
Understanding Row Vector vs Column Vector
A row vector is [1 2 3], a column vector is the same thing flipped. Notice the difference:
Row Vector: [1 2 3]
Column Vector: [ 1 2 3 ]
Now multiply: Row Vector Γ— Column Vector
[1 2 3] Γ— [ 1 2 3 ] = ?
The Magic: (1Γ—3) Γ— (3Γ—1) = (1Γ—1) β€” One row Γ— three columns = one result. This is the dot product! (1Γ—1) + (2Γ—2) + (3Γ—3) = 1 + 4 + 9 = 14
1 Size check: (1Γ—3) Γ— (3Γ—1) βœ“ Can multiply!
2 Calculation: Multiply each pair and add: (1Γ—1) + (2Γ—2) + (3Γ—3)

Result: What's the dot product of [1 2 3] and [1 2 3]α΅€?

This is fundamental to machine learning and AI. Remember this!

⑨ Problem 9
Very Easy
πŸ’‘ Multiplying Different Sizes: The Challenge A (m Γ— n) Γ— B (n Γ— k) = Result (m Γ— k). This is where mistakes happen most!
A 2Γ—3 Times a 3Γ—2: Careful Calculation
Calculate:
X = [ 1 2 3 4 5 6 ]
Γ—
Y = [ 7 8 9 10 11 12 ]
Size Check: (2Γ—3) Γ— (3Γ—2) = (2Γ—2) result. Columns of X (3) = Rows of Y (3) βœ“
The result will be 2 rows (from X) and 2 columns (from Y).
1 Position (1,1): Row 1 of X Γ— Column 1 of Y = (1Γ—7) + (2Γ—9) + (3Γ—11) = 7 + 18 + 33 = 58
2 Position (1,2): Row 1 of X Γ— Column 2 of Y = (1Γ—8) + (2Γ—10) + (3Γ—12) = 8 + 20 + 36 = 64
3 Position (2,1): Row 2 of X Γ— Column 1 of Y = (4Γ—7) + (5Γ—9) + (6Γ—11) = 28 + 45 + 66 = 139
4 Position (2,2): Row 2 of X Γ— Column 2 of Y = (4Γ—8) + (5Γ—10) + (6Γ—12) = 32 + 50 + 72 = 154

Challenge: Calculate all four positions step-by-step.

This is the TYPE of problem that appears on exams. Practice it carefully!

β‘© Problem 10
Very Easy
πŸ’‘ The MOST COMMON MISTAKE: Forgetting to Compute 3 Terms When multiplying a (3Γ—2) by a (2Γ—3), EVERY position requires summing 2 products. Don't forget any!
The Trap: Multi-Step Products (Most Students Mess This Up!)
This is the problem type that appears on exams and trips people up. Calculate carefully:
M = [ 2 3 1 4 5 0 ] (3Γ—2)
Γ—
N = [ 1 6 2 3 1 4 ] (2Γ—3)
The Danger Zone: EVERY POSITION = SUM OF 2 PRODUCTS. If you forget to add them, you get 0 by accident. For example: (2Γ—1) + (3Γ—3) = 2 + 9 = 11. Don't write 2 or 9 aloneβ€”ALWAYS ADD!
1 Result size: (3Γ—2) Γ— (2Γ—3) = 3Γ—3
2 Position (1,1): (2Γ—1) + (3Γ—3) = 2 + 9 = 11 ← Add both!
3 Position (1,2): (2Γ—6) + (3Γ—1) = 12 + 3 = 15 ← Add both!
4 Continue this for all 9 positions... Don't skip the addition step!

CRITICAL REMINDER:

βœ“ Count how many products you need to add for EACH position
βœ“ Never forget the addition step
βœ“ Double-check your arithmetic

Students often write just one product and forget the rest. This is exam suicide! Always sum all products!

Master Summary

The 5 Rules to Remember:

  1. Row Γ— Column: Each answer position = row of first Γ— column of second, then add products
  2. Size Check: (mΓ—n) Γ— (nΓ—k) βœ“ = (mΓ—k) result
  3. Order Matters: A Γ— B β‰  B Γ— A (not commutative)
  4. Identity: A Γ— I = A (identity matrix changes nothing)
  5. Zero: A Γ— O = O (zero matrix produces zero)

🎯 Exam Strategy:

  • FIRST: Always verify sizes before calculating
  • SECOND: Write down each row Γ— column operation
  • THIRD: Calculate all products and SUM them
  • FOURTH: Check your answer makes sense (correct size!)