Skip to content
Zesona
Matrix Multiplication CalculatorLocal

Matrix Multiplication Calculator

Multiply two matrices exactly, with the dimension rule explained when it does not apply.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

7 characters

One row per line, entries separated by spaces or commas. Fractions such as 3/4 are accepted. Up to 12 x 12.

7 characters

One row per line.

Ready

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Enter the matrix with one row per line.

  2. 2

    Every entry is held as an exact fraction, so the result carries no rounding.

  3. 3

    A ragged matrix is refused rather than padded with zeros, which would change the answer.

Questions about Matrix Multiplication Calculator

Why does AB differ from BA?

Because matrix multiplication composes transformations, and the order of two transformations matters - rotating then stretching is not the same as stretching then rotating. For the matrices in the example, AB is [[8, 19], [20, 45]] while BA is [[25, 36], [20, 28]]. BA may not even be defined when AB is.

What dimensions does the product have?

An m x n matrix times an n x p matrix gives m x p. The inner dimensions must match because each entry of the result is a dot product of a row of the first with a column of the second, and those need the same length.

Why is a ragged matrix rejected?

Because padding a short row with zeros would change the matrix, and with it the determinant, the inverse and the rank. Guessing at the missing entries would produce a confident answer to a different question, so the tool names the row and asks you to fix it.

Is my data sent anywhere?

No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.

Does the Matrix Multiplication Calculator work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Matrix Multiplication Calculator keeps working with the network switched off and nothing is ever sent to a server.

Other tools you might reach for next.