Quick answer
Matrix product (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ. [[1, 2], [3, 4]] × [[5, 6], [7, 8]] = [[19, 22], [43, 50]].
Enter two matrices with rows separated by semicolons. The calculator returns the product and its size. Use this matrix multiplication calculator to check your own figures.
Related tools: Matrix Calculator: Determinant, trace, transpose and 2×2 inverse of a matrix. Matrix Determinant Calculator: Determinant of a square matrix (up to 6×6). Solve for Unknown Fraction (Cross Multiplication): Solve a/b = c/d when one value is unknown.
How to use the Matrix Multiplication Calculator
- Type matrix A, for example 1 2; 3 4.
- Type matrix B, for example 5 6; 7 8.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Matrix A | Text, such as 1 2; 3 4 | — |
| Matrix B | Text, such as 5 6; 7 8 | — |
Formula and method
Formula
(AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ
IEEE-754 double precision; shown to at most 6 decimal places.
Columns of A must equal rows of B.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Matrix A = 1 2; 3 4; Matrix B = 5 6; 7 8.
| Result | Value |
|---|---|
| A × B | 19 22; 43 50 |
| Size | 2×2 |
Example 2
Inputs: Matrix A = 1 2 3; Matrix B = 1; 2; 3.
| Result | Value |
|---|---|
| A × B | 14 |
| Size | 1×1 |
The first line is the headline result (a × B). Below it the matrix Multiplication Calculator lists size, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Entry by entry
Top-left: 1 × 5 + 2 × 7 = 19. Top-right: 1 × 6 + 2 × 8 = 22. Bottom-left: 3 × 5 + 4 × 7 = 43. Bottom-right: 3 × 6 + 4 × 8 = 50.
Compatibility
The number of columns of A must equal the number of rows of B. The result has A's rows and B's columns. Multiplication is not commutative: BA = [[23, 34], [31, 46]], which differs from AB.
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Matrix B: entering "1 2 3" shows "Columns of A must equal rows of B." beside that field and no result.
Choosing between the Matrix Multiplication Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Matrix Calculator](/math/matrix-calculator/) | matrix | Determinant |
| [Matrix Determinant Calculator](/math/matrix-determinant-calculator/) | matrix | Determinant |
| [Solve for Unknown Fraction (Cross Multiplication)](/math/solve-for-unknown-fraction/) | Unknown (d) | |
| [Multiplication Calculator](/math/multiplication/) | numbers | Product |
| [Slope Calculator](/math/slope-calculator/) | x₁, y₁ and x₂ | Slope |
Background: algebra
Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.
If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.
Assumptions and limitations
- Compatible dimensions
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for matrix B to confirm this.
Frequently asked questions
Is AB the same as BA?
Not in general. For the example matrices AB = [[19, 22], [43, 50]] but BA = [[23, 34], [31, 46]].
What size is a 2×3 times a 3×4?
A 2×3 matrix times a 3×4 matrix gives a 2×4 matrix: the inner dimensions (3) must match.
What is the identity matrix?
A matrix that leaves others unchanged.
What does the Matrix Multiplication Calculator calculate?
Multiply two matrices. It returns A × B and Size.
What formula does the Matrix Multiplication Calculator use?
(AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ. Columns of A must equal rows of B.
What do I need to enter in the matrix Multiplication Calculator?
You enter Matrix A and Matrix B.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Compatible dimensions.
What is an example of a matrix Multiplication result?
With matrix A 1 2; 3 4 and matrix B 5 6; 7 8, the a × B is 19 22; 43 50.
Where does the method come from?
The method follows: OpenStax, Algebra and Trigonometry 2e (Rice University): matrices, determinants and systems of equations.
Related calculators
- Matrix Calculator — Determinant, trace, transpose and 2×2 inverse of a matrix.
- Matrix Determinant Calculator — Determinant of a square matrix (up to 6×6).
- Solve for Unknown Fraction (Cross Multiplication) — Solve a/b = c/d when one value is unknown.
- Multiplication Calculator — Product of a list of numbers.
- Slope Calculator — Slope, angle, distance and line equation through two points.
- LCM Calculator — Least common multiple of two or more numbers.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): matrices, determinants and systems of equations
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.