Matrix Multiplication Calculator
Multiply two matrices of compatible dimensions with full row-by-column working.
About Matrix Multiplication Calculator
Matrix multiplication computes (AB)ᵢⱼ as the dot product of row i of A with column j of B. The number of columns in A must equal the number of rows in B. The result is an m×n matrix when A is m×p and B is p×n. Matrix multiplication is not commutative in general.
Formula
Matrix Multiplication
(AB)ᵢⱼ = Σₖ Aᵢₖ · Bₖⱼ
- A
- Left matrix (m×p)
- B
- Right matrix (p×n)
Worked example
With the default values below, Matrix Multiplication Calculator returns A × B of 1 2 3 4. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Matrix A (rows separated by newlines or semicolons; values by commas or spaces)
- 1 2 3 4
- Matrix B
- 1 0 0 1
Results
- A × B
- 1 2 3 4
- Result Dimensions
- 2×2
Step by step
- 1Matrix A= 1 2 3 4
- 2Matrix B= 1 0 0 1
- 3A × B= 1 2 3 4
- 4Note(A×B)ᵢⱼ = sum of row i of A times column j of B
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Is matrix multiplication commutative?
No. In general AB ≠ BA. The dimensions may not even permit the reverse product.
What happens when I multiply by the identity matrix?
Multiplying any matrix A by the identity I gives A back: AI = IA = A.
