TOPIC

Matrix multiplication

MY PROGRESS

Pug Score

0%

Best Streak

0 in a row

Study Points

+0

Overview

Practice

Watch

Read

Quiz

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Best Practice

No score

Read

Not viewed

Best Quiz

No attempts


Best Streak

0 in a row

Study Points

+0

Read

Matrix Multiplication

Matrix multiplication combines two matrices using a row-by-column rule: pair each row of the first matrix with each column of the second, multiply matching numbers, and add. Learn when multiplication is defined (inner dimensions must match), why order matters, and how to read a worked 2x2 example.

What matrix multiplication is

Matrix multiplication combines two matrices into a new matrix using a row-by-column rule. Unlike adding matrices, you do not multiply entry by entry. Instead, each entry of the product comes from pairing a row of the first matrix with a column of the second, multiplying matching numbers, and adding the results. It helps to be comfortable with the notation of matrices first.

Row-by-column rule for matrix multiplication Two 2 by 2 matrices are multiplied. The first row of matrix A, 1 and 2, is combined with the first column of matrix B, 5 and 7. Multiply pairs and add: 1 times 5 plus 2 times 7 equals 19, which is the top-left entry of the product. 12 34 × 56 78 = 1922 4350 row 1 · column 1 (1×5) + (2×7) = 19 Multiply each row into each column, then add.
Each product entry is a row of the first matrix combined with a column of the second.

The row-by-column rule

To find the entry in row i, column j of the product, take row i of the first matrix and column j of the second, multiply the paired numbers, and add. In the example above, row 1 is (1, 2) and column 1 is (5, 7), so the top-left entry is (1×5) + (2×7) = 19. Repeat for every row-column pairing to fill the product.

When multiplication is defined

You can only multiply two matrices when their inner dimensions match: an m×n matrix times an n×p matrix. The shared n is what lets each row line up with each column, and the product has size m×p.

The dimension rule for matrix multiplication An m by n matrix times an n by p matrix. The two inner numbers n must be equal for the product to exist. The product has size m by p, taken from the two outer numbers. (m × n) × (n × p) = (m × p) inner numbers must match outer numbers give the product size
The inner dimensions must match; the outer dimensions give the product size.

Order matters

Matrix multiplication is not commutative: in general, AB is not equal to BA, and one order may be defined while the other is not. This is different from multiplying a matrix by a scalar, where order makes no difference. Multiplication is the engine behind more advanced work such as the inverse of 3×3 matrices with row operations.

Related lessons