Linear Algebra

Why Matrix Multiplication Matters

Why Matrix Multiplication Matters

You might ask: "Why do we multiply rows by columns? Why is it so weird?" It's not arbitrary. Matrix multiplication is fundamentally about combining transformations.

If Matrix A rotates a point 90 degrees, and Matrix B scales it by 2x, multiplying A times B gives you a single matrix that does both at once. It is the command center of linear algebra. Once you see matrices as actions rather than grids of numbers, the strange multiplication rule suddenly makes perfect sense: each entry of the product answers the question "how much does this input direction contribute to this output direction?"

How to Do It (Row x Column)

To find the entry in the 1st Row and 1st Column of the result, you take the entire 1st Row of the left matrix and dot-product it with the 1st Column of the right matrix.

[ 1 2 ] [ 5 6 ] [ (1·5 + 2·7) ... ]
[ 3 4 ] x [ 7 8 ] = [ ... ... ]

One more rule before you start: the inner dimensions must match. A matrix with size m×n can only multiply a matrix of size n×p, and the result is m×p. If the inner numbers disagree, the product simply doesn't exist.

Open Matrix Calculator

Worked Example: The Full 2x2 Product

Let's finish the multiplication above completely, entry by entry.

  1. Row 1 × Column 1: (1·5) + (2·7) = 5 + 14 = 19
  2. Row 1 × Column 2: (1·6) + (2·8) = 6 + 16 = 22
  3. Row 2 × Column 1: (3·5) + (4·7) = 15 + 28 = 43
  4. Row 2 × Column 2: (3·6) + (4·8) = 18 + 32 = 50
[ 1 2 ] [ 5 6 ] [ 19 22 ]
[ 3 4 ] x [ 7 8 ] = [ 43 50 ]

Now try it in the reverse order. Multiplying B × A instead gives a completely different matrix — the top-left entry becomes (5·1) + (6·3) = 23, not 19. This is concrete proof of the most important warning in linear algebra: order matters.

Real World Magic

Pro Tip: Matrix multiplication is NOT commutative. A x B is usually NOT the same as B x A. Order matters!

Common Mistakes to Avoid

Frequently Asked Questions

Why is matrix multiplication defined this strange way?

Because it makes composition of linear transformations work. If A and B each represent a transformation, the product AB is defined precisely so that applying AB to a vector gives the same result as applying B first, then A. The row-times-column rule is what falls out of that requirement.

Is there any case where AB equals BA?

Yes, occasionally — for example, when one matrix is the identity matrix, when both are powers of the same matrix, or when both are diagonal. Such matrices are said to "commute." But it's the exception, not the rule, so never assume it.

How do computers multiply huge matrices so fast?

GPUs perform thousands of row-column dot products in parallel, and clever algorithms (like Strassen's method) reduce the number of multiplications needed. This hardware-level parallelism is exactly why modern AI runs on graphics cards.

Written by Omkar

CS Graduate & Full-Stack Developer at Oniqutes Digital Solutions. Builder of the Solvr Math Suite. More about the author →

Share this guide

Request a Calculator

Missing a tool? Let us know what you need!