A little clarity, calculated.

culators

Math / Matrix

Matrix Calculator

Add, subtract, or multiply two small matrices and show the resulting matrix with compatible dimensions. This matrix calculator validates row lengths and multiplication shape before computing, so an invalid operation is explained rather than silently truncated. Addition and subtraction are element-wise and require equal dimensions. Multiplication uses Cᵢⱼ=ΣₖAᵢₖBₖⱼ, requiring columns of A to match rows of B. Matrix multiplication is order-sensitive, so reversing A and B can change both the dimensions and the result; the entered A×B order is preserved.

Your inputs

Make it your own
Calculator settings

Your result
[4, 4] [10, 8]
Product matrix

Example inputs shown. Adjust them to explore.

A familiar situation

Check a small matrix product used in a coordinate transformation or linear algebra exercise.

How to use this calculator

  1. Enter matrix a, matrix b, operation.
  2. Select Calculate to see the answer and its breakdown.
  3. Keep a scenario, change an input and compare the results.

Use consistent units and check the assumptions below before applying the result.

How matrix is calculated

Addition and subtraction are element-wise and require equal dimensions. Multiplication uses Cᵢⱼ=ΣₖAᵢₖBₖⱼ, requiring columns of A to match rows of B. Matrix multiplication is order-sensitive, so reversing A and B can change both the dimensions and the result; the entered A×B order is preserved. [[1,2],[3,4]] × [[2,0],[1,2]] = [[4,4],[10,8]].

Addition/subtraction are elementwise; (AB)ᵢⱼ=ΣₖAᵢₖBₖⱼ.
A worked example

[[1,2],[3,4]] × [[2,0],[1,2]] = [[4,4],[10,8]].

Assumptions & useful context

The result depends on the values you enter and the method described above. Displayed numbers may be rounded; calculations use the unrounded values. Check that this model matches your situation before relying on it.

Frequently asked questions

Can rectangular matrices be multiplied?

Yes, if the first matrix’s column count matches the second matrix’s row count.

What size is supported?

Each matrix may have up to 5 rows and 5 columns.

Find a calculator