Matrix Calculator

Add, subtract and multiply matrices; find the transpose, determinant, inverse and rank. Rows are separated by new lines or semicolons.

Also called: matrix multiplication calculator, determinant calculator, inverse matrix calculator.

FreeNo sign-upRuns in your browser
CALCULATORS

Matrix Calculator

Add, subtract and multiply matrices; find the transpose, determinant, inverse and rank. Rows are separated by new lines or semicolons.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the Matrix Calculator (15 seconds)

Recorded on a phone, steps written on screen, no sound.

About the Matrix Calculator

Add, subtract and multiply matrices, or find the transpose, determinant, inverse and rank of matrix A. Type rows on new lines (or separated by semicolons) and numbers separated by spaces or commas.

Example: A = 1 2 / 3 4 has determinant −2. Multiplication needs A's columns to equal B's rows; only square matrices have a determinant and inverse.

Matrix operations, dimensions and conditions

Enter each matrix as rows of numbers, with rows separated by new lines or semicolons. Addition and subtraction require matrices with the same number of rows and columns. Matrix multiplication is possible when the number of columns in Matrix A equals the number of rows in Matrix B.

The transpose swaps rows and columns. A determinant is defined only for a square matrix. An inverse exists only when a square matrix is non-singular (its determinant is not zero); otherwise the inverse operation is undefined. Rank describes the number of linearly independent rows or columns.

For a quick check, the 2 × 2 matrix [[1, 2], [3, 4]] has determinant −2, so it has an inverse. Check row order and dimensions carefully before using a result in coursework, engineering or scientific calculations.

How to use the Matrix Calculator

  1. Add your inputFill in matrix A and matrix B.
  2. Pick the optionsoperation (the defaults suit most uses).
  3. Press Run toolThe result appears right under the button.
  4. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the Matrix Calculator gives for it (produced by the tool itself, not typed by hand).

Matrix A
1 2 3 4
Matrix B
5 6 7 8
Operation
A + B

Result:

 6   8
10  12

Good to know

What you need
You type or choose: Matrix A, Matrix B
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

Why is there no inverse?

The determinant is 0, so the matrix can't be inverted.

Can I use fractions?

Use decimals.

More tools in Calculators

See all Calculators tools