Why Matrix Multiplication Works the Way It Does

Published 16 November 2026 · Math

Try it nowMatrix Multiplication Calculator →

Multiply matrices instantly with the matrix multiplication calculator.

Matrices are transformations

A matrix moves, rotates, stretches or shears vectors. Multiplying two matrices creates one matrix that does both transformations in sequence.

Why the sizes must match

An m×n matrix takes n-dimensional vectors to m dimensions. To apply A after B, B’s output size must match A’s input size.

Why order matters

Rotating then stretching gives a different result from stretching then rotating – so AB ≠ BA in general.

Where it is used

3D graphics, robotics, neural networks (every layer is a matrix multiply) and economics input–output models.

Keep reading