Math

Matrix Calculator

Details

How to use Matrix Calculator

What the tool does, how to run it, and what to expect from the result.

How to add, multiply, transpose, and invert a matrix

Matrix arithmetic has a handful of rules that are easy to state and easy to get wrong under time pressure: addition needs identical shapes, multiplication needs the inner dimensions to agree, and only a square matrix with a non-zero determinant has an inverse.

This calculator enforces all of those and tells you which one you broke. Resize each matrix, type the numbers, then hit an operation. Everything runs in the browser and the result can be copied as tab-separated rows for pasting into a spreadsheet.

  • Set the size of matrix A, from 1x1 up to 6x6, and fill in the cells.
  • Set the size of matrix B if you plan to use a binary operation.
  • Click A + B, A - B, or A x B for a two-matrix operation, or Transpose A, det(A), or Inverse A for a single one.
  • Read the result grid, or the error explaining why the shapes do not allow it.
  • Click Copy result to get the answer as tab-separated rows.
Tips

Getting a better result out of Matrix Calculator

Specific settings and thresholds, not general advice.

  • A x B needs the columns of A to equal the rows of B, and the result has the rows of A and the columns of B. That is the one rule people trip on: a 2x3 times a 3x2 works and gives a 2x2, while 3x2 times 2x3 also works and gives a 3x3. Order matters, and matrix multiplication does not commute.
  • The determinant and inverse buttons operate on matrix A only. If you need det(B), copy B into A. There are no det(B) or inverse-B buttons.
  • Determinant and inverse both use Gaussian elimination with partial pivoting and treat any pivot smaller than 1e-10 as zero. A matrix that is mathematically invertible but numerically fragile can therefore report a determinant of 0 or refuse to invert.
  • Blank cells are read as 0, not as an error, so an accidentally cleared cell will silently change your answer. Values that are not numbers do error, naming the exact cell (for example R2C3).
  • Results are displayed rounded to four decimals, but the underlying arithmetic is double precision. An inverse that shows 0.3333 is really 0.33333333..., so do not copy the display into a place that needs exactness.
Limits

What Matrix Calculator does not do

The honest boundary, so you do not lose time finding it yourself.

  • Matrices are limited to 6x6, and at least 1x1.
  • Determinant and inverse are available for matrix A only.
  • No eigenvalues, eigenvectors, rank, trace, LU/QR decomposition, or solving Ax = b.
  • Real numbers only. No complex entries, no fractions or symbolic values.
At a glance

Who Matrix Calculator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Students and engineers doing linear algebra.

Ideal for

Using the matrix calculator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Why does A x B give an error but B x A works?

Matrix multiplication requires the columns of the left matrix to equal the rows of the right one. A 2x3 times a 3x4 is defined and yields a 2x4; the reverse, 3x4 times 2x3, is not defined at all. Unlike numbers, matrices do not commute, so even when both orders are legal they usually give different results.

Why does it say my matrix is singular?

During Gauss-Jordan elimination the tool looks for a usable pivot in each column. If the largest remaining value in that column is below 1e-10 it declares the matrix singular, meaning its determinant is zero and no inverse exists. Geometrically, the matrix collapses space onto a lower dimension, so the transformation cannot be undone.

How can I get the determinant of matrix B?

Copy B's values into matrix A. The determinant, inverse, and transpose buttons are all bound to A. The binary operations (add, subtract, multiply) are the only ones that use both matrices.

Are the results exact?

They are double-precision floating point, rounded to four decimals for display. Integer inputs give exact integer results for addition, subtraction, multiplication, and transpose. Inverses of matrices with fractional entries carry the usual floating point error, so 1/3 displays as 0.3333.

What happens if I leave a cell empty?

An empty cell is treated as 0 and the calculation proceeds. Only a cell containing something that cannot be parsed as a number raises an error, and it names the position, such as Cell R2C3 is not a valid number. Watch for accidental blanks, because they change the answer without warning you.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon