Matrix Multiplication Calculator

Matrix A
Rows × Cols
3 × 3
×
Matrix B
Rows × Cols
3 × 3

👆 Click any cell to see its dot product step-by-step

What This Tool Does

This matrix multiplication calculator multiplies two matrices together (or a matrix by a scalar), producing a new matrix using the dot-product method, provided the matrices’ dimensions are compatible.

You can also use this Emergency Fund Calculator

How It’s Calculated

To multiply matrix A by matrix B, the number of columns in A must equal the number of rows in B. Each element of the resulting matrix is the dot product of a row from A and a column from B — multiplying corresponding entries and summing the results.

Worked example: A (2×3) = [[2, 0, 1], [1, 3, 2]], B (3×2) = [[1, 2], [0, 1], [4, 1]]

  • c₁,₁ = (2×1) + (0×0) + (1×4) = 2 + 0 + 4 = 6
  • c₁,₂ = (2×2) + (0×1) + (1×1) = 4 + 0 + 1 = 5
  • c₂,₁ = (1×1) + (3×0) + (2×4) = 1 + 0 + 8 = 9
  • c₂,₂ = (1×2) + (3×1) + (2×1) = 2 + 3 + 2 = 7

Resulting matrix C (2×2) = [[6, 5], [9, 7]]

Since A is 2×3 and B is 3×2, the result C takes the row count of A and the column count of B — a 2×2 matrix.

Edge Cases and Special Rules

  • Dimension compatibility is non-negotiable: If the columns of the first matrix don’t match the rows of the second, multiplication simply isn’t defined — there’s no result to compute.
  • Matrix multiplication isn’t commutative: A×B generally doesn’t equal B×A — in fact, one order might be defined while the other isn’t, depending on the matrices’ dimensions.
  • Scalar multiplication is a different, simpler operation: Multiplying a matrix by a single number just multiplies every element by that number — no dot products or dimension matching involved.
  • Multiplying three or more matrices is associative, though not commutative: (A×B)×C gives the same result as A×(B×C), as long as you keep each matrix in its original order — but you still can’t freely swap which matrix comes first, second, or third.

Numeric vs. Symbolic (Variable) Matrix Multiplication

Most basic matrix calculators, including this one, handle numeric matrices — where every entry is a specific number. Matrices containing variables (like x or y in place of numbers) require symbolic computation, a more advanced capability found in computer algebra systems rather than typical basic calculators. If you need to multiply matrices with variable entries and simplify the algebraic result, you’ll likely need a tool built specifically for symbolic math rather than a standard numeric matrix calculator.

Who Uses This

  • Students learning linear algebra and matrix operations
  • Engineers and scientists working with transformations in physics or computer graphics
  • Programmers implementing algorithms that rely on matrix operations
  • Statisticians and data analysts working with data represented in matrix form

Matrix Multiplication vs. Scalar Multiplication

These are two entirely different operations that happen to share the word “multiplication.” Scalar multiplication multiplies every element of a single matrix by one number — straightforward and always defined, regardless of the matrix’s size. Matrix-by-matrix multiplication uses the dot-product method described above, requires compatible dimensions, and can fail to be defined at all if those dimensions don’t line up. Don’t confuse the two when working through a calculation by hand.

FAQ

What is the rule for multiplying two matrices?

The number of columns in the first matrix must equal the number of rows in the second matrix.

Is matrix multiplication commutative?

No, A×B generally doesn’t equal B×A, and one order may not even be mathematically defined.

Can I multiply a 2×3 matrix by a 3×2 matrix?

Yes, the columns of the first (3) match the rows of the second (3), producing a 2×2 result.

Does my scientific calculator do matrix multiplication?

Many scientific calculators, including popular models like the Casio fx-991 series, include a built-in matrix mode, check your specific model’s manual for the exact steps.

Can I multiply three matrices at once?

Yes,multiply them in sequence, keeping their original order, since matrix multiplication is associative but not commutative.

Try It Above

Enter your matrices’ dimensions and values in the matrix multiplication calculator above to get the result instantly. Results are for general calculation purposes only.