Skip to content

Matrix Multiplication Calculator

Type matrix A and matrix B, one row per line or rows separated by semicolons, to get the product A × B. The number of columns of A must equal the number of rows of B.

Calculator Details

A × B:2×2 matrixSee results ↓

Determinant, inverse, reduced row echelon form (RREF), the product A × B or the transpose Aᵀ

One row per line (or separate rows with ;), entries separated by spaces or commas; fractions like 1/2 are fine

Only used for A × B; its number of rows must equal A’s number of columns

Your Results

A × B: 2×2 matrix

A × B

2×2 matrix

Product A × B

A × B (exact)

5864
139154

As decimals

5864
139154

A (2×3) × B gives a 2×2 matrix.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Entries of A × B
EntryExactDecimal
Row 1, column 15858
Row 1, column 26464
Row 2, column 1139139
Row 2, column 2154154

How This Calculator Works

How It’s Calculated

Each entry (AB)ᵢⱼ is row i of A dotted with column j of B.

A =

123
456

Each row operation and the matrix after it are listed in the breakdown table above.

Frequently Asked Questions

When can two matrices be multiplied?

Only when the number of columns of the first equals the number of rows of the second. A 2×3 matrix can multiply a 3×2 or a 3×4 matrix, but not a 2×3. The product has the rows of the first and the columns of the second: 2×3 times 3×2 gives 2×2.

Is A × B the same as B × A?

Usually not. Matrix multiplication is not commutative: B × A may not even be defined, and when it is, it is often a different size or has different entries. Here B × A is 3×3, while A × B is 2×2.

How is this different from multiplying entry by entry?

Entry-by-entry (Hadamard) multiplication needs matrices of the same size and multiplies matching positions. Ordinary matrix multiplication combines a whole row with a whole column for each entry, which is what represents doing one linear transformation after another.

What is the identity matrix?

The square matrix with 1s on the main diagonal and 0s elsewhere. Multiplying any matrix by an identity of the right size leaves it unchanged, the way multiplying a number by 1 does.

Included: determinant, inverse and RREF by exact Gaussian / Gauss–Jordan elimination with every row operation listed, rank, matrix multiplication and the transpose, for matrices up to 6×6 (8 columns for RREF) with integer, decimal or fraction entries.

Left out: eigenvalues and eigenvectors, complex entries, LU/QR decompositions, matrix powers, addition, and matrices larger than 6 rows.

Matrix Multiplication Calculator: Multiply A × B

By FindMySum · Last reviewed

A matrix multiplication calculator multiplies two matrices the way linear algebra defines it: each entry of the product is a row of the first matrix combined with a column of the second, by multiplying matching entries and adding. It is how you chain transformations in graphics, combine prices with quantities, or step a system forward in time, and it is easy to slip on by hand.

Worked example

Multiply A, with rows 1 2 3 and 4 5 6 (2×3, typed as 1 2 3; 4 5 6), by B, with rows 7 8, 9 10 and 11 12 (3×2, typed as 7 8; 9 10; 11 12). A has 3 columns and B has 3 rows, so the product exists and is 2×2.

  1. Row 1 of A with column 1 of B: 1 × 7 + 2 × 9 + 3 × 11 = 7 + 18 + 33 = 58.
  2. Row 1 with column 2: 1 × 8 + 2 × 10 + 3 × 12 = 8 + 20 + 36 = 64.
  3. Row 2 with column 1: 4 × 7 + 5 × 9 + 6 × 11 = 28 + 45 + 66 = 139.
  4. Row 2 with column 2: 4 × 8 + 5 × 10 + 6 × 12 = 32 + 50 + 72 = 154.

So A × B has rows 58 64 and 139 154.

A practical reading

Think of A as two shoppers' quantities of three products, and B as each product's price in two stores. Then A × B gives each shopper's total bill at each store: shopper 1 pays 58 at store 1 and 64 at store 2. Seeing what the rows and columns mean makes it clear why the inner sizes must match.

For determinants, inverses and row reduction, use the matrix calculator; for the determinant on its own, the determinant calculator.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy