Read this lesson as text
Matrix Multiplication
Linear Algebra for Machine Learning · Axiom Academy
Complete Worked Example with Questions Matrix multiplication is more complex than addition. For two matrices A (m×p) and B (p×n), the product AB is an m×n matrix. Worked Example: 2×3 × 3×2 Multiplication We'll multiply a 2×3 matrix by a 3×2 matrix, which gives a 2×2 result: Step 2: Calculate entry (AB)₁₁ Multiply row 1 of A with column 1 of B: Step 3: Calculate entry (AB)₁₂ Multiply row 1 of A with column 2 of B: Step 4: Calculate entry (AB)₂₁ Multiply row 2 of A with column 1 of B: Step 5: Calculate entry (AB)₂₂ Multiply row 2 of A with column 2 of B: Question 1: What is the dimension of the product when multiplying a 3×4 matrix by a 4×2 matrix? Question 2: Is matrix multiplication commutative? (Does AB = BA always?) Question 3: For the example above, what is (AB)₁₂? Key Properties of Matrix Multiplication Distributive: A(B+C) = AB + AC Not commutative: AB ≠ BA (in general)
This is the written version of the interactive lesson above. See the full Linear Algebra for Machine Learning course.