1. Home
  2. Calculators
  3. Matrix Calculator

Matrix Calculator

For linear algebra homework and checking by hand: every entry is an exact fraction, so a determinant of 1/60 stays 1/60.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Matrix Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table as a CSV file.

Features

  • Multiply, add, subtract, transpose and scale
  • Determinant, inverse, rank, trace and reduced row echelon form
  • Powers up to An with n up to 64
  • Exact fractions or decimals
  • Clear errors when sizes do not match

Supported formats

Input

  • Matrices typed one row per line
  • Fractions and decimals

You get

  • On-screen matrix result
  • Copyable text

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Matrix Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Matrices are limited to 8 × 8 and entries must be numbers or fractions, not symbols.
  • Eigenvalues and decompositions are not included.

Guide

Matrix arithmetic with exact fractions: multiply, invert, determinant, rank

Matrix problems are tedious by hand and risky on a floating-point calculator: a determinant that should be exactly zero comes out as 1e-16, and an inverse is full of long decimals. This calculator keeps every entry as an exact fraction, so a determinant of 1/60 stays 1/60 and a singular matrix is recognised as singular. Use it to check homework, test a transformation or find the rank of a system.

Entering matrices

Type one row per line and separate the entries with spaces or commas. An entry may be an integer, a decimal such as 0.25, a fraction such as 3/4 or a number in scientific form such as 1e-3, and each is converted to an exact fraction first: 0.1 becomes 1/10. Every row must have the same number of entries, and a matrix can be at most 8 by 8. Errors say which matrix and what is wrong.

The operations

The Operation menu offers A × B, A + B, A − B, the determinant of A, the inverse of A, the transpose, rank and reduced row echelon form, Aⁿ for a power from 0 to 64, k × A for a scalar that may be a fraction, and the trace. For addition and subtraction the sizes must match; for multiplication the number of columns of A must equal the number of rows of B, and the message names the sizes if they do not.

Methods behind the results

The determinant is found by Gaussian elimination with row swaps, tracking the sign, and an exact zero pivot returns 0. The inverse uses Gauss-Jordan elimination on A joined to the identity matrix; if a pivot is missing the matrix is singular. Rank and the reduced row echelon form come from the same elimination, with the pivot columns listed. Powers multiply repeatedly. Because all arithmetic is rational, results are exact at every step.

Worked examples

[[1,2],[3,4]] × [[5,6],[7,8]] = [[19,22],[43,50]], and the determinant of A is −2. For A = [[2,1,1],[1,3,2],[1,0,0]] the determinant is −1 and the inverse is [[0,0,1],[−2,1,3],[3,−1,−5]]; a note reminds you that A × A⁻¹ is the identity matrix, which you can verify with the multiply operation. The tridiagonal matrix [[2,−1,0],[−1,2,−1],[0,−1,2]] has determinant 4. The Fibonacci matrix [[1,1],[1,0]] raised to the 10th power is [[89,55],[55,34]]. [[1,2,3],[4,5,6],[7,8,9]] has rank 2, pivot columns 1 and 2 and row-reduced form [[1,0,−1],[0,1,2],[0,0,0]].

Fractions or decimals

The Show entries as menu switches the result between exact fractions and decimals rounded to six places, with trailing zeros removed. Fractions are the better choice for checking work, since 2/3 is not the same number as 0.666667. Decimals suit a report, or entries that are fractions of awkward denominators. Switching does not change the calculation, only the display.

Reading singular and rank-deficient cases

A determinant of 0, as in the rank example, means the rows are dependent: the matrix has rank below its size and no inverse. The rank also tells you how many independent equations a system holds. If the coefficient matrix of three equations has rank 2, the system has either no solution or infinitely many. Rank is one of the first things to compute for any linear system.

Limits

The calculator works with numeric matrices up to 8 × 8. It does not compute eigenvalues, eigenvectors, LU or QR decompositions, or solve a system Ax = b directly, although the inverse and the row-reduced form of an augmented matrix give the same information. Entries cannot be variables. Very large entries are handled exactly but make long results.

Checked against the current version of the Matrix Calculator on .

Frequently asked questions

Why does a matrix with a zero determinant have no inverse?

A zero determinant means the rows are linearly dependent: one row is a combination of the others, so the matrix squashes space flat and the squashing cannot be undone. The tool reports the determinant and then says the matrix is singular, instead of returning a made-up inverse.

Is matrix multiplication commutative?

No. A × B and B × A are usually different, and one of them may not exist: a 2 × 3 matrix times a 3 × 2 matrix gives 2 × 2, while the reverse order gives 3 × 3. Swap the two matrices on the page and compare the sizes it reports to see the effect.

Why are the answers fractions?

The entries are stored as exact rational numbers, so inverses and determinants have no floating-point error. Switch the output to decimals if you prefer.

How do I know a matrix has no inverse?

Its determinant is 0. The tool then says the matrix is singular instead of returning a wrong inverse.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.