A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

Matrix Multiplication

College Depth 89 in the knowledge graph ☐ I know this ☆ Set as goal
5,837topics build on this
363prerequisites beneath it
See this on the map →
Matrices: Definition, Notation, and Special TypesDot Product (Inner Product in R^n)+1 more→→Attention MechanismsConvex Optimization Fundamentals+9 more
matrices multiplication operations

Core Idea

If A is m × n and B is n × p, their product AB is m × p where (AB)_ij = Σ_k a_ik b_kj. Matrix multiplication is associative and distributes over addition but is NOT commutative. It represents function composition for linear transformations. Multiplication is possible only when inner dimensions match.

How It's Best Learned

Compute one pair both ways. With A = [[1, 2], [3, 4]] and the swap matrix B = [[0, 1], [1, 0]], AB = [[2, 1], [4, 3]] swaps the columns of A, while BA = [[3, 4], [1, 2]] swaps its rows. Then recompute AB column by column, as A times each column of B, to see the row-column rule and the composition view agree.

Common Misconceptions

Explainer

Think of matrix multiplication as a machine that transforms input vectors step by step. When you compute AB, you are asking: "first apply transformation B, then apply transformation A." The result AB is a single matrix encoding the composition of both transformations — just as composing two functions f(g(x)) gives a single combined function. This is the deepest reason matrix multiplication exists: it is function composition made computational.

The row-column rule — (AB)ᵢⱼ equals the dot product of row i of A with column j of B — follows directly from this composition logic. Each column of B tells you where a basis vector lands after B's transformation. Multiplying A into that column then applies A's transformation to the result. The inner dimensions must match because B's output must be a valid input for A: if B produces n-dimensional vectors, A must accept n-dimensional inputs, which means A must have n columns.

Non-commutativity is the most striking property. For numbers, ab = ba always. For matrices, AB and BA are often not equal — and often one doesn't even have defined dimensions while the other does. The geometric reason: rotating then reflecting a shape generally gives a different result than reflecting then rotating. Order matters with transformations, so order matters with matrix multiplication.

Associativity, by contrast, holds: (AB)C = A(BC). This corresponds to the fact that when you compose three transformations, it doesn't matter whether you first combine the first two or the last two — you get the same overall transformation either way. This makes long chains of matrix products unambiguous without parentheses. Combined with the dimension-matching requirement, it means you can think of a sequence of matrix multiplications as a pipeline: each matrix passes its output as input to the next, and the final product encodes the full pipeline as a single matrix.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Multiplying Binomials (FOIL) → Factoring Trinomials → Factoring Completely → Introduction to Rational Expressions → Simplifying Radical Expressions → Segments and Distance → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Similar Right Triangles and the Geometric Mean → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Special Right Triangles: 30-60-90 → Trigonometric Ratios Review → Vectors in Two Dimensions → Vectors in R^n → Scalar Multiplication of Vectors → Dot Product (Inner Product in R^n) → Matrix Multiplication

Longest path: 90 steps · 363 total prerequisite topics

Prerequisites (3)

Leads To (11)