Linear Algebra Learning Studio · Module 02

Matrix Multiplication

Learn dimension compatibility, row-column dot products, transformation composition, and the structural properties of matrix products.

Offline browser lab Interactive mathematics Student practice environment
Module 02 · Matrix products

Understand multiplication as dot products and composition

Matrix multiplication is not entrywise multiplication. It is designed so that matrices representing linear transformations compose correctly. The (i,j) entry of AB is the dot product of row i of A with column j of B.

Check inner dimensionsCompute row-column productsUse column combinationsInterpret composition orderExplain noncommutativity
01

The dimension rule

Determine whether a product exists before touching the entries

A is m×n, B is n×p   ⇒   AB is m×p

The number of columns of the left matrix must equal the number of rows of the right matrix. These matching values are the inner dimensions; the remaining outer dimensions become the shape of the product.

2×3

A shape

Two output rows and three input coordinates.

3×4

B shape

Three rows match A’s three columns.

2×4

AB shape

The product retains A’s row count and B’s column count.

02

Row-by-column computation

Build each output entry as a dot product

cᵢⱼ = Σₖ aᵢₖbₖⱼ
Worked example

Multiply a 2×3 matrix by a 3×2 matrix

12−1
034
·
21
−13
40
=
−47
139

For example, c₁₂=(1)(1)+(2)(3)+(−1)(0)=7. Each output entry consumes one complete row from A and one complete column from B.

03

Three complementary interpretations

Move beyond the mechanical algorithm

Row-column dot products

Best for hand computation. Entry cᵢⱼ measures how row i of A interacts with column j of B.

Columns of AB

Column j of AB is A times column j of B. Therefore each output column is a linear combination of the columns of A.

Composition of maps

If B acts first and A acts second, then the combined transformation is AB. The rightmost matrix acts first.

AB and BA are different questions

Even when both products exist, AB generally differs from BA because the transformations occur in opposite orders. In many rectangular cases, one order exists while the other does not.

04

Interactive multiplication laboratory

Change the dimensions and inspect every dot product

Variable-size matrix multiplier

Choose m, n, and p for (m×n)(n×p). The calculator displays the complete row-by-column expansion.

1–4 dimensions
A
×
B
05

Properties and limits

Know which familiar scalar rules survive

PropertyStatusMeaning
A(BC)=(AB)CAlways valid when dimensions fitAssociativity permits regrouping without changing order.
A(B+C)=AB+ACValidMultiplication distributes over addition.
AB=BAGenerally falseMatrix multiplication is noncommutative.
AB=0 ⇒ A=0 or B=0FalseNonzero matrices can multiply to the zero matrix.
(AB)ᵀ=BᵀAᵀValidTranspose reverses composition order.
(AB)⁻¹=B⁻¹A⁻¹Valid when both are invertibleThe last-applied transformation must be undone first.
06

Review questions

Test dimensions, computation, and interpretation

Knowledge check

If A is 4×3 and B is 3×6, what is the size of AB?

Knowledge check

If A is 2×5 and B is 3×2, which statement is correct?

Knowledge check

What is column j of AB?

Knowledge check

For transformations represented by A and B, what does AB mean?

Knowledge check

Which identity is always correct when dimensions are compatible?