Matrix multiplication isn't entry-by-entry like addition — it's a row-by-column operation. Once you see the pattern it's mechanical, and a matrix multiplication calculator confirms every answer. Let's build it up.
On this page
The dimension rule
You can multiply an m×n matrix by an n×p matrix — the inner numbers must match — and the result is m×p:
(m × n) · (n × p) → (m × p)
↑↑↑↑↑ must be equal
So a 2×3 times a 3×2 works and gives a 2×2; a 2×3 times a 2×2 does not work at all.
One entry = one dot product
Entry (i, j) of the product is the dot product of row i of the first matrix with column j of the second: multiply matching elements and add.
Full worked example
Multiply A × B where
A = 1 2 B = 5 6
3 4 7 8
Compute each of the four entries:
- (1,1) = row 1 · col 1 = 1·5 + 2·7 = 5 + 14 = 19
- (1,2) = row 1 · col 2 = 1·6 + 2·8 = 6 + 16 = 22
- (2,1) = row 2 · col 1 = 3·5 + 4·7 = 15 + 28 = 43
- (2,2) = row 2 · col 2 = 3·6 + 4·8 = 18 + 32 = 50
A × B = [[19, 22], [43, 50]].
Order matters
Reverse the order and you get a different matrix:
B × A = [[23, 34], [31, 46]] — for example (1,1) = 5·1 + 6·3 = 23. Clearly A × B ≠ B × A.
Unlike numbers, matrices rarely commute. Always multiply in the order the problem specifies.
Check on the calculator
In MATRIX mode, enter A in the first box and B in the second:
Matrix A Matrix B
1 2 5 6
3 4 7 8
The calculator returns A × B = [[19, 22], [43, 50]] (plus A + B). Swap the inputs to see B × A change. For determinants, inverses and transposes of the same matrices, see the matrix calculator pillar guide, and to apply products to systems read simultaneous equations with matrices.
Frequently asked questions
When can two matrices be multiplied?
When the columns of the first equal the rows of the second: (m×n)·(n×p) → (m×p).
Is matrix multiplication commutative?
No — A×B generally differs from B×A, and the two may not even be the same size.
How is each entry computed?
Entry (i, j) is the dot product of row i of the first matrix with column j of the second.
Multiply matrices instantly
Enter A and B in MATRIX mode and read A × B without the arithmetic.
Open the matrix multiplication calculator →