To multiply matrices, the number of columns in the first matrix must equal the number of rows in the second. If that condition is true, each entry in the product comes from one row of the first matrix and one column of the second.
That gives you the two checks students usually need right away: whether the product is defined and what size the answer will be.
How to multiply matrices in 3 steps
- Check the inner dimensions. If they do not match, the product is not defined.
- Use the outer dimensions to get the size of the answer.
- For each entry, multiply matching row and column entries, then add those products.
The dimension rule
If
then is defined, and the result has size
The inner dimensions must match. The outer dimensions tell you the size of the answer.
For example, a matrix can multiply a matrix, and the result will be . But a matrix cannot multiply a matrix in that order, because the inner dimensions do not match.
What row by column really means
To find one entry of , take one row from and one column from .
If the row is
and the column is
then the corresponding entry in the product is
So standard matrix multiplication is not entry-by-entry multiplication. It is a sum of products built from one row-column pair.
Worked example
Multiply
First check the sizes. is , and is , so the product is defined. The answer will be a matrix.
Now compute each entry.
The top-left entry uses row 1 of and column 1 of :
The top-right entry uses row 1 of and column 2 of :
The bottom-left entry uses row 2 of and column 1 of :
The bottom-right entry uses row 2 of and column 2 of :
So
That single example shows the full pattern. Each position in the answer comes from one row-column pairing.
Why order matters
In ordinary arithmetic, . For matrices, that is not generally true.
Even when both products exist, and can be different. In some cases, one product is defined and the other is not. So the order is part of the problem, not a cosmetic detail.
Common mistakes
Skipping the dimension check
Many errors happen before any arithmetic starts. If the inner dimensions do not match, the product is not defined.
Multiplying matching positions directly
If you multiply the top-left entries together, then the next matching pair, you are doing a different operation. Standard matrix multiplication uses row-by-column sums.
Mixing up rows and columns
Each entry needs one specific row from the first matrix and one specific column from the second. Reusing the wrong column is a very common bookkeeping error.
Assuming the reverse order gives the same answer
You should not expect . Matrix multiplication is generally not commutative.
When matrix multiplication is used
Matrix multiplication is used when one linear process is followed by another. In an introductory course, that often appears in systems of equations or geometric transformations. In applications, the same idea shows up in computer graphics, data models, and scientific computing.
The useful intuition is simple: one matrix acts first, and the next matrix acts on that result. That is why the order matters.
Try your own version
Try multiplying
Predict the size of the answer before you calculate any entries. If you want to check your setup after doing it by hand, try your own version in GPAI Solver.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →