100% Free No Sign-Up Unlimited Use No Limits Secure & Private
PDF Tools Calculators Categories Guides Contact No Sign-Up Needed to Use This Site
Matrix A
×
Matrix B
=
Result C

Multiply two matrices of any compatible size and see every element of the result computed as a full dot-product, step by step.

How It Works

How Matrix Multiplication Calculator Works

Two matrices A and B can be multiplied only when the number of columns in A matches the number of rows in B. The result C has as many rows as A and as many columns as B, and each element C[i][j] is the dot product of row i from A with column j from B — multiplying corresponding entries together and summing the results.

The calculator lets you choose the dimensions of A and B independently (as long as they are compatible) and fills in the values you enter, then computes every entry of the result using the formula C[i][j] = Σ A[i][k] × B[k][j], showing the exact multiplication and addition behind each one.

Because matrix multiplication is not commutative — A × B usually does not equal B × A, and may not even be defined both ways — the calculator always treats the first matrix as the left factor and the second as the right factor, matching the order they are entered in.

Worked Example

See It In Action

Multiplying a 2×3 matrix A = [[1,2,3],[4,5,6]] by a 3×2 matrix B = [[7,8],[9,10],[11,12]]: C[1][1] = 1×7 + 2×9 + 3×11 = 7+18+33 = 58, and C[1][2] = 1×8 + 2×10 + 3×12 = 8+20+36 = 64. Working through all four entries gives the final 2×2 result C = [[58, 64], [139, 154]].
Real-World Use Cases

Who Uses Matrix Multiplication Calculator and Why

  • Combining two linear transformations — such as a rotation and a scaling matrix — into a single matrix.
  • Checking a homework dot-product calculation entry by entry against the full worked-out result.
  • Verifying two matrices are dimension-compatible before committing to a larger multi-step computation.
  • Working through a matrix multiplication example when it's easy to accidentally multiply entries element-by-element instead.
Common Mistakes

Mistakes to Avoid

  • Assuming A × B equals B × A — matrix multiplication generally isn't commutative, and swapping the order can give a completely different result or make the multiplication undefined.
  • Entering matrices whose inner dimensions don't match — the number of columns in A must equal the number of rows in B, or the multiplication simply isn't defined.
  • Confusing matrix multiplication's row-by-column dot products with the Hadamard (element-by-element) product, which is a different, less common operation.
Pro Tips

Tips for Best Results

  • Check that A's column count matches B's row count before entering all your values — it saves re-entering data if the sizes turn out incompatible.
  • Spot-check one or two entries of the result by hand using the dot-product formula to catch input typos before trusting the full output.
Troubleshooting

Fixing Common Problems

The calculator says the multiplication is undefined. — Confirm the number of columns in matrix A equals the number of rows in matrix B — that's the only requirement for A × B to be defined.

My result matrix is a different size than I expected. — The result always has as many rows as A and as many columns as B — an (m×n) matrix times an (n×p) matrix always produces an (m×p) result.

Glossary

Terms Explained

Dot product: The sum of the products of corresponding entries from a row and a column, used to compute each entry of a matrix product.

Hadamard product: Element-by-element multiplication of two same-sized matrices — a distinct operation from standard matrix multiplication.

FAQ

Frequently Asked Questions

When can two matrices be multiplied?
Only when the number of columns in the first matrix equals the number of rows in the second — an (m×n) matrix can be multiplied by an (n×p) matrix, producing an (m×p) result. If those dimensions don't match, the multiplication is undefined.
Is matrix multiplication the same as multiplying element by element?
No — matrix multiplication uses dot products of rows and columns, not simple position-by-position multiplication (that operation is called the Hadamard product and is a different, less common operation).
Does the order of multiplication matter?
Yes — matrix multiplication is generally not commutative, meaning A × B does not usually equal B × A. Always keep track of which matrix comes first, since swapping the order can give a completely different result (or make the multiplication undefined).
What size will my result matrix be?
The result always has the same number of rows as the first matrix and the same number of columns as the second — multiplying an (m×n) matrix by an (n×p) matrix always produces an (m×p) matrix.