Course contentsShow
← Mathematics
Lesson 2100 of 3,12144. Linear Algebra — Matrices and SystemsFree lesson

Matrix Multiplication: Definition

Learn the row-column rule for multiplying matrices and understand when matrix multiplication is defined.

Matrix Multiplication: Definition

You'll learn the row-column rule for multiplying two matrices and when this operation is even possible.

The Core Idea

Matrix multiplication is not done entry-by-entry like addition or scalar multiplication. Instead, you combine entire rows from the first matrix with columns from the second matrix using a dot-product-like process.

To multiply matrix A by matrix B (written AB):

  1. The inner dimensions must match: If A is m × n and B is p × q, then you need n = p. Otherwise, multiplication is undefined.
  2. The result has outer dimensions: AB will be m × q.
  3. Each entry is a row-column product: The entry in row i, column j of AB equals the sum of products of corresponding entries from row i of A and column j of B.

Formula

If A is m × n and B is n × p, then:

(AB)ᵢⱼ = aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ + ... + aᵢₙbₙⱼ

You're taking the i-th row of A, the j-th column of B, multiplying corresponding entries, and summing.

When Is It Defined?

  • (3×2) × (2×4) → ✅ Result is 3×4
  • (2×3) × (2×4) → ❌ Inner dimensions don't match (3 ≠ 2)
  • (4×1) × (1×5) → ✅ Result is 4×5

Analogy

Think of each row of A as a "question" and each column of B as an "answer." The multiplication pairs them up one-by-one, multiplies, and totals the result—like scoring how well question i aligns with answer j.

Key Takeaway: Matrix multiplication requires matching inner dimensions (n) and produces a matrix whose size combines the outer dimensions; each entry is computed as the sum of products from a row and a column.