Skip to content
CalculatorAtlas

Matrix Multiplication Calculator

Tested

Multiply two matrices.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

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

  1. Type matrix A, for example 1 2; 3 4.
  2. Type matrix B, for example 5 6; 7 8.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Matrix Multiplication Calculator
InputWhat to enterAllowed values
Matrix AText, such as 1 2; 3 4—
Matrix BText, 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.

Results of example 1
ResultValue
A × B19 22; 43 50
Size2×2

Example 2

Inputs: Matrix A = 1 2 3; Matrix B = 1; 2; 3.

Results of example 2
ResultValue
A × B14
Size1×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.

Choosing between the Matrix Multiplication Calculator and similar calculators
CalculatorYou enterIt returns
[Matrix Calculator](/math/matrix-calculator/)matrixDeterminant
[Matrix Determinant Calculator](/math/matrix-determinant-calculator/)matrixDeterminant
[Solve for Unknown Fraction (Cross Multiplication)](/math/solve-for-unknown-fraction/)Unknown (d)
[Multiplication Calculator](/math/multiplication/)numbersProduct
[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.

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.