Everyday tool

Matrix Calculator

Enter one matrix row per line, separating values with commas. Select a supported matrix operation.

Runs in your browser. No upload.

Values are processed locally in this browser.

Result

—

About this tool

Matrix Calculator made simple.

This calculator supports finite matrices up to 6×6 for determinant, inverse and transpose. Singular matrices do not have an inverse.

Guide

Using Matrix Calculator

The Matrix Calculator works on a small grid of numbers. You type the matrix with one row per line, pick Determinant, Inverse or Transpose, and press Calculate. It accepts from 1 by 1 up to 6 by 6. Determinant and inverse need a square grid, while transpose also works on grids that are wider than they are tall. It does not add, multiply or solve systems of equations.

How to use it

  1. Type the matrix in the box. Put each row on its own line and separate the numbers in a row with commas. The code also accepts spaces between numbers and a semicolon in place of a new line.
  2. Keep every row the same length and use at most 6 rows and 6 columns. Only plain finite numbers are read, so a fraction such as 1/2 is not allowed and you must type 0.5.
  3. Choose Determinant, Inverse or Transpose. Determinant and inverse give an error message unless the matrix is square.
  4. Press Calculate and read the result. Use Copy result to take it with you, or Clear to start again.

Worked examples

A 2 by 2 matrix

You enter
Matrix
1, 2 3, 4
Operation
determinant
You get
Determinant
Determinant: -2
Inverse
-2, 1 1.5, -0.5

The determinant is 1 times 4 minus 2 times 3, which is -2. The inverse is shown row by row, and multiplying the matrix by it gives the identity matrix.

Run through the tool’s own code.

The inverse of a 3 by 3 matrix

You enter
Matrix
2, 0, 1 1, 3, 2 1, 1, 2
Operation
inverse
You get
Determinant
Determinant: 6
Inverse
0.66666667, 0.16666667, -0.5 0, 0.5, -0.5 -0.33333333, -0.33333333, 1

The determinant is 6, so an inverse exists. The numbers match the adjugate matrix divided by 6, which was worked out by hand. Long decimals are cut to 8 places.

Run through the tool’s own code.

A matrix with no inverse

You enter
Matrix
1, 2 2, 4
Operation
inverse
You get
Message
This matrix is singular and has no inverse.

The second row is twice the first, so the determinant is 0. The determinant option shows 'Determinant: 0' for it, and the inverse option shows this message.

Run through the tool’s own code.

When it helps

  • Check a homework answer for a determinant or an inverse of a small matrix.
  • Find out quickly whether a square matrix is singular before you start a longer calculation.
  • Flip a table of numbers so its rows become columns, for example before pasting it into another tool.
  • Test a matrix you built in a spreadsheet to see if it can be inverted.

Limits to keep in mind

  • The size limit is 6 rows by 6 columns, and all entries must be finite numbers. Empty cells, text, fractions and ragged rows are refused with one general error message.
  • Only three operations exist: determinant, inverse and transpose. There is no addition, multiplication, rank, eigenvalues or equation solving.
  • Floating-point arithmetic is used. A value below about 1e-12 on a pivot is treated as zero, and the determinant is rounded to 10 decimal places, so a very small but real determinant can appear as 0. The inverse is rounded to 8 places.
  • It shows the final answer only. There are no steps, so it is a checker, not a teacher.

Tips

  • Run Determinant first. A result of 0 tells you at once that the inverse will fail.
  • For a matrix with very small or very large entries, rescale it by a common factor and calculate again to avoid the rounding limit.
  • Check an inverse by multiplying it with the original by hand or in another tool. You should get ones on the diagonal and zeros elsewhere.

Sources

Common questions

About Matrix Calculator.

What does a determinant of zero mean?

It means the matrix is singular. A square matrix has an inverse only if its determinant is not zero, so the Inverse option will return an error for it. The row or column pattern is then not independent.

Can I enter fractions like 1/2?

No. Each entry is read as a plain number, so 1/2 causes an error. Type 0.5 instead. Scientific notation such as 1e3 is read as a number, and negative numbers and decimals work too.

Does the transpose work on a non-square matrix?

Yes. A 2 by 3 matrix typed as 1, 2, 3 and 4, 5, 6 becomes a 3 by 2 matrix with rows 1, 4 then 2, 5 then 3, 6. Only determinant and inverse need a square matrix.

What is the biggest matrix I can use?

Six rows and six columns. A seventh row or column makes the tool show an error. Every row must have the same number of entries as the first.

Why do I see 0 for a determinant that should be tiny?

The determinant is rounded to 10 decimal places. A 2 by 2 matrix with 0.000001 on the diagonal and zeros elsewhere has a determinant of one trillionth, and that shows as 0. Rescale the matrix if you need to see such values.

Is my matrix sent to a server?

No. The page says values are processed locally in your browser, and the calculation uses the code on the page itself, so the numbers stay on your device.

Can I trust it for exam or work results?

It is a handy check for small matrices, but rounding applies, and nothing here shows working. For anything that matters, verify with a second method or a tool that shows exact fractions.

How do I use Matrix calculator?

Enter one matrix row per line, separating values with commas. Select a supported matrix operation.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.