Matrix subtraction calculator

Type two matrices of the same size, one row per line, and get A − B.

One row per line, numbers separated by spaces. Fractions such as 1/2 are allowed.

Fill in the fields; the answer appears here straight away.

How it works

  1. Enter the values

    Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.

  2. Instant answer

    The answer appears as you type, with the most important intermediate values.

  3. See the working

    Under "How it's worked out" you see the steps, handy for checking your own calculation.

How matrices are subtracted

Subtract the numbers in the same position. For A = [[5, 6], [7, 8]] and B = [[1, 2], [3, 4]], A − B = [[4, 4], [4, 4]]. Note that A − B is not the same as B − A: every sign flips.

Both matrices need the same size. Fractions are allowed and the result is exact. To add, use the matrix addition calculator.

Frequently asked questions

Is the matrix subtraction free?

Yes. The matrix subtraction is completely free, with no account, sign-up or usage limit.

How accurate is the result?

The tool calculates with your browser's number precision. For important calculations, always double-check what you entered.

Does it work on my phone?

Yes. The tool works in any modern browser on a phone, tablet or computer.