Matrix Multiplication Formula

Matrix multiplication is multiplying matrices A (m × n) and B (n × p) by taking dot products of rows of A with columns of B to produce an m × p result.

The Formula

(AB)ij=∑k=1naik⋅bkj

When to use: Imagine each row of A as a question and each column of B as an answer key. You 'grade' each row against each column by multiplying corresponding entries and summing. This is why column count of A must match row count of B—the question and answer key must have the same length.

Quick Example

[1234][5678]=[1⋅5+2⋅71⋅6+2⋅83⋅5+4⋅73⋅6+4⋅8]=[19224350]

Notation

AB means multiply A by B (row-by-column). Dimensions: (m×n)(n×p)=(m×p). The inner dimensions must match.

What This Formula Means

Multiplying matrices A (m×n) and B (n×p) by taking dot products of rows of A with columns of B to produce an m×p result.

Imagine each row of A as a question and each column of B as an answer key. You 'grade' each row against each column by multiplying corresponding entries and summing. This is why column count of A must match row count of B—the question and answer key must have the same length.

Formal View

For A∈Rm×n, B∈Rn×p: (AB)ij=∑k=1naikbkj, yielding AB∈Rm×p. Matrix multiplication is associative (A(BC)=(AB)C) but not commutative (AB≠BA in general).

Worked Examples

Example 1

medium
Compute [1234][5678].

Answer

[19224350]

First step

1
Step 1: Entry (1,1): 1⋅5+2⋅7=5+14=19.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan — every worked solution, all subjects

Example 2

hard
Compute [20−1132][14−1].

Example 3

challenge
Use the Fibonacci matrix identity Fn=(Fn+1FnFnFn−1) and Fm+n=FmFn to derive an identity relating Fm+n to Fm,Fm−1,Fn,Fn+1.

Common Mistakes

  • Multiplying when inner dimensions disagree — (2×3)(2×2) is undefined; the inner numbers must match.
  • Assuming AB=BA — matrix multiplication is generally non-commutative, so order matters.
  • Multiplying entrywise — each result entry is a row-by-column SUM of products, not a single product.

Why This Formula Matters

It is the operation behind composing linear transformations, applying a system, and inverse matrices, and it is famously non-commutative — AB≠BA in general — which reshapes how students think about multiplication. Recognizing it by "Does the column count of A equal the row count of B, and am I dotting rows with columns?" — rather than by familiar numbers — is what lets a student tell it apart from matrix addition and scalar multiplication and dot product (vectors) in a mixed problem set.

Frequently Asked Questions

What is the Matrix Multiplication formula?

Multiplying matrices A (m×n) and B (n×p) by taking dot products of rows of A with columns of B to produce an m×p result.

How do you use the Matrix Multiplication formula?

Imagine each row of A as a question and each column of B as an answer key. You 'grade' each row against each column by multiplying corresponding entries and summing. This is why column count of A must match row count of B—the question and answer key must have the same length.

What do the symbols mean in the Matrix Multiplication formula?

AB means multiply A by B (row-by-column). Dimensions: (m×n)(n×p)=(m×p). The inner dimensions must match.

Why is the Matrix Multiplication formula important in Math?

It is the operation behind composing linear transformations, applying a system, and inverse matrices, and it is famously non-commutative — AB≠BA in general — which reshapes how students think about multiplication. Recognizing it by "Does the column count of A equal the row count of B, and am I dotting rows with columns?" — rather than by familiar numbers — is what lets a student tell it apart from matrix addition and scalar multiplication and dot product (vectors) in a mixed problem set.

What do students get wrong about Matrix Multiplication?

The procedure for matrix multiplication is the easy part; the trap is multiplying when inner dimensions disagree. Asking "Does the column count of A equal the row count of B, and am I dotting rows with columns?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

What should I learn before the Matrix Multiplication formula?

Before studying the Matrix Multiplication formula, you should understand: matrix operations, matrix definition.

Want the Full Guide?

This formula is covered in depth in our complete guide:

Solving Systems of Equations: Substitution, Elimination, and Matrices →