Matrix Calculator

Enter a small matrix in a grid or paste rows, then calculate an inverse, determinant or other supported result.

On-device No sign-up Free to use

Calculate result controls

Showing an example. Edit to see your own.

Operation
?

One row per line; use commas or spaces between values. Up to 6 rows and 6 columns, plain decimals only.

?

Used only when the operation needs B.

Processed in your browser. Your inputs stay on this device.

Result

Showing an example.

Invert the 2 by 2 matrix with rows [1, 2] and [3, 4]. Matrix B is not used for this operation.

Inverse of A (2 × 2): [[-2, 1], [1.5, -0.5]].
Answer: [[-2, 1], [1.5, -0.5]]
Formula: A × A⁻¹ = identity matrix (within floating-point precision).

https://usefreetools.net/matrix-calculator · 20 November 2026

Was this helpful?

How to use Matrix Calculator

  1. Choose the operation. Add, Subtract and Multiply use both A and B; Transpose, Determinant, Inverse and Rank use A only.
  2. Enter one matrix row per line using commas or spaces between numbers, or edit the synchronized grid. Keep every row the same length.
  3. For addition/subtraction, match both matrix dimensions. For multiplication, A’s column count must equal B’s row count. Determinant and inverse require square A.
  4. Calculate and inspect the result dimensions and numerical threshold. Inverse and determinant working is listed only for matrices up to 4 by 4.

Example: Matrix Calculator

Invert the 2 by 2 matrix with rows [1, 2] and [3, 4]. Matrix B is not used for this operation.

You add
Operation: Inverse of A Matrix A: 1, 2 3, 4 Matrix B (add, subtract or multiply): 5, 6 7, 8
You get
Inverse of A (2 × 2): [[-2, 1], [1.5, -0.5]]. Answer: [[-2, 1], [1.5, -0.5]] Formula: A × A⁻¹ = identity matrix (within floating-point precision).

Options

Matrix shape
Each matrix may have 1 to 6 rows and columns. Addition and subtraction need the same shape. If A is r by k and B is k by c, multiplication produces r by c. Operand order matters.
Pivot threshold
Rank, inverse and related operations use the stated numerical threshold. Small pivots can be treated as zero.

Supported inputs and limits

  • Each matrix has 1 to 6 rows and columns, with at most 4,000 input characters.
  • Enter plain decimal values of magnitude at most 10¹², with up to 60 characters, 40 digits and 20 fractional places per cell; exponent notation is refused.
  • The grid and pasted rows stay synchronized.
  • Working uses floating-point arithmetic.
  • Pivots at or below 10⁻¹⁰ of the largest original entry count as zero, so nearly dependent matrices can change rank or fail inversion after rounding.
More details

Determinant and inverse need square matrices.

Step lists are provided up to 4 by 4; larger accepted matrices return numerical results without the full working.

There is no symbolic algebra or exact rational guarantee.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

A refusal can reflect numerical sensitivity

Nearly dependent rows can make an inverse unstable even when an exact symbolic inverse exists. Small changes in scale or entered rounding can alter a numerical rank. Check the input precision and threshold before interpreting the result as a statement about an exact mathematical matrix.

Questions about Matrix Calculator

Why must matrix dimensions match for addition?

Each entry is added to the entry at the same position, so both matrices need the same row and column counts.

Can every square matrix be inverted?

No. A singular matrix has no inverse. Values near numerical singularity can also make a floating-point inverse unreliable.

Is a computed rank exact?

The reported numeric rank uses a pivot threshold. Very small perturbations can affect rank for nearly dependent rows or columns.

Page updated · Project managed by Tony Hines · Report a problem with Matrix Calculator