Matrix Multiplication Calculator
Matrix multiplication is a fundamental operation in linear algebra that combines two matrices to produce a new result. Unlike regular number multiplication, matrix multiplication is not commutative, so A × B does not generally equal B × A. This calculator multiplies 2x2 and 3x3 matrices and shows both A × B and B × A, helping you understand why the order matters. Enter your matrix values and see the computed products instantly.
Matrix A
Matrix B
A × B
B × A
Matrix multiplication formula
(A × B)ij = Σ Aik × Bkj (sum over all k)
Note: Matrix multiplication is NOT commutative
Matrix multiplication calculator: frequently asked questions
What is matrix multiplication?
Matrix multiplication combines two matrices to produce a new matrix. The element in row i and column j of the result is the dot product of row i from the first matrix and column j from the second matrix. Unlike number multiplication, matrix multiplication is not commutative: A × B generally does not equal B × A.
When can you multiply two matrices?
To multiply matrix A (dimensions m × n) by matrix B (dimensions n × p), the number of columns in A must equal the number of rows in B. The result is an m × p matrix. For example, a 2x3 matrix can be multiplied by a 3x4 matrix, but not by a 4x3 matrix.
Is matrix multiplication commutative?
No. Matrix multiplication is generally not commutative, meaning A × B ≠ B × A in most cases. This is one of the key differences between matrix multiplication and scalar multiplication. The order matters fundamentally in matrix operations.
How is each element calculated in matrix multiplication?
The element in row i, column j of A × B is calculated by taking row i from A and column j from B, multiplying corresponding elements, and summing the results. This is the dot product of a row vector and a column vector.
What are applications of matrix multiplication?
Matrix multiplication is essential in computer graphics (combining transformations), physics (representing operations), machine learning (neural networks), and solving systems of linear equations. Essentially any multi-dimensional linear transformation uses matrix multiplication.
Official sources
- Khan Academy: Matrix multiplication.
- Wolfram MathWorld: Matrix multiplication.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.