Easy CalculatorsOnline
A little less guesswork.

Math · EVERYDAY CLARITY

Matrix multiplication calculator

Multiply two compatible matrices up to5×5.

Units & number format

Number formatting changes the display; the interface and guides are in English. Dates use calendar controls; numeric lists use decimal points and comma or space separators.

01 · CALCULATE

Work out your numbers

Your inputs stay in this browser.

Example result · using the values shown

Product A × B
19, 22 ; 43, 50
Output shape2 × 2
See visual ↓

Columns of A must equal rows of B. Matrix multiplication is ordered.

02 · SEE THE RESULT

Your numbers, pictured

Example visualization

Rows of the product

01Row 119 · 22Equivalent measurement
02Row 243 · 50Equivalent measurement

Rows are displayed in their original order; signed entries are preserved.

03 · UNDERSTAND THE METHOD

How the matrix multiplication calculator works

Matrix multiplication combines each row of a first matrix with each column of a second matrix. It is an ordered operation, so AB generally differs from BA. This calculator supports rectangular inputs up to five by five and checks their inner dimensions before multiplying. The output has the first matrix’s row count and the second matrix’s column count. It can represent composed linear transformations or compact sets of weighted sums.

The formula and its variables

(AB)ᵢⱼ = Σ_k AᵢₖBₖⱼ
A
First matrix in the ordered product.
B
Second matrix whose row count matches A’s column count.

The calculation, step by step

  1. Enter each matrix with semicolons between rows and commas or spaces between entries. Every row in a matrix must have the same number of columns.
  2. Check that the number of columns in A equals the number of rows in B. Pair each A row with each B column.
  3. Multiply corresponding paired entries and add their products to form one output entry. Repeat for every output position and retain the resulting row order.

A worked example

For A with rows (1, 2) and (3, 4), and B with rows (5, 6) and (7, 8), the output is rows (19, 22) and (43, 50). Its upper-left entry is 1 × 5 + 2 × 7 = 19. Multiplying the matrices entry by entry would produce different numbers and would not be matrix multiplication.

Example inputs and calculated output
Matrix A rows separated by semicolons1,2;3,4
Matrix B rows separated by semicolons5,6;7,8
Product A × B19, 22 ; 43, 50

How to read the result and visual

The dimension rule expresses which intermediate components can be combined. A two-by-three matrix multiplied by a three-by-one column produces two outputs. Reversing that order may be incompatible or produce a different shape. The visual displays output rows directly instead of suggesting that every matrix entry is one common measurement series.

Assumptions, rounding, and limitations

Both inputs are limited to five rows and five columns, and entries use finite numeric precision. The calculator does not multiply symbolic expressions or infer units for incompatible variables. A product may have very large entries even when both inputs are within bounds. The output dimensions alone do not establish whether its matrices represent an appropriate real-world model.

Frequently asked questions

Must both matrices be square?

No. Only their inner dimensions must match. The output can also be rectangular.

Why does reversing the order matter?

Each order pairs different rows and columns, so the arithmetic and even the dimensions can change.

Reference sources

How we check calculations and what verification covers