Matrix Multiplication Calculator
Multiply two matrices step by step. Every element of the result is shown as a complete dot-product calculation.
Multiply two matrices of any compatible size and see every element of the result computed as a full dot-product, step by step.
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.
See It In Action
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.
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.
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.
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.
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.