To multiply matrices, the number of columns in the first matrix must equal the number of rows in the second. When that holds, each entry in the product is built from one row of the first matrix and one column of the second. That gives you the two checks you usually need right away: whether the product is defined, and what size the answer will be.
The Dimension Rule and Its Symbols
If
then is defined and the result has size
The inner dimensions (the two 's) must match; the outer dimensions ( and ) give the size of the answer. For example, a matrix can multiply a matrix, with a result. But a matrix cannot multiply a matrix in that order, because the inner dimensions do not match.
Why It Is Row by Column, Not Entry by Entry
To find one entry of , take one row from and one column from . If the row is
and the column is
then the corresponding product entry is
So matrix multiplication is a sum of products built from one row-column pair, not entry-by-entry multiplication. This is also why the inner dimensions must match: the row and the column being paired need the same length for the sum to line up. And it is why one matrix acts first and the next acts on its result, which is the intuition behind composing linear processes.
Multiplying Matrices in Three 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.
Worked Example
Multiply
First check the sizes. is and is , so is defined and the answer is .
Top-left, row 1 of with column 1 of :
Top-right, row 1 of with column 2 of :
Bottom-left, row 2 of with column 1 of :
Bottom-right, row 2 of with column 2 of :
So
Each position in the answer comes from one row-column pairing.
Try It Yourself
Multiply
Predict the size of the answer before you calculate any entries, then compute each entry with the row-by-column rule. If you want to check your setup after doing it by hand, run the same product in GPAI Solver and compare.
Calculation Traps
Skipping the dimension check. Many errors happen before any arithmetic; if the inner dimensions do not match, the product is not defined.
Multiplying matching positions directly. Pairing top-left with top-left and so on is a different operation. Standard 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 common bookkeeping error.
Assuming the reverse order gives the same answer. In ordinary arithmetic , but for matrices and can differ, and sometimes only one product is even defined. The order is part of the problem.
Matrix multiplication is used when one linear process is followed by another: systems of equations and geometric transformations in introductory courses, and computer graphics, data models, and scientific computing in applications. The intuition is simple: one matrix acts first, and the next matrix acts on that result.
Frequently Asked Questions
- How do you know if two matrices can be multiplied?
- Check the inner dimensions: the number of columns in the first matrix must equal the number of rows in the second. For example, a 2 by 3 matrix can multiply a 3 by 4 matrix, but it cannot multiply a 2 by 4 matrix in that order, because the inner dimensions do not match.
- What size is the product of two matrices?
- The outer dimensions give the answer. If the first matrix is m by n and the second is n by p, the product is m by p. So multiplying a 2 by 3 matrix with a 3 by 2 matrix produces a 2 by 2 result. Checking this before computing tells you exactly how many entries to find.
- Is matrix multiplication done entry by entry?
- No. Standard matrix multiplication is not entry-by-entry multiplication. Each entry of the product comes from one row of the first matrix and one column of the second: multiply matching entries along that row-column pair, then add the products. Treating it like entrywise multiplication is one of the most common mistakes.
- What are the three steps to multiply matrices?
- First, check the inner dimensions; if they do not match, the product is not defined. Second, use the outer dimensions to determine the size of the answer. Third, compute each entry by multiplying matching row and column entries and adding those products. This routine covers both the validity check and the calculation itself.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →