Skip to main content
NyankoTools

Matrix Calculator (Inverse & Determinant)

Add, subtract, multiply, scale, transpose and invert matrices up to 6×6, or compute a determinant. Enter integers, decimals or fractions such as 1/3. Everything is calculated as exact fractions, so an inverse comes out with no rounding error, which makes it handy for checking homework. All processing happens in your browser, and nothing you enter is sent to a server. For averages and variance, see the Statistics Calculator.

🔒 Runs in your browser · Your data is never sent to a server

Display as

Matrix A

Matrix B

Result

Notes

  • Entries can be integers, decimals (0.25) or fractions (3/4). Empty cells count as 0. Scientific notation such as 1e3 is not supported.
  • Calculations use exact BigInt fractions, so addition, multiplication and inversion have no rounding error. Decimal output is rounded to 6 places, so non-terminating fractions are approximations.
  • Sizes range from 1×1 to 6×6. The inverse and the determinant need a square matrix.
  • Inverting a singular matrix (determinant 0) shows an error instead of a result.
  • This tool is meant for learning and checking your work. For anything important, verify the result another way.

Glossary

Matrix

A rectangular array of numbers. An m×n matrix has m rows and n columns. Sums and differences need matching sizes, and A × B is defined when the columns of A equal the rows of B. Multiplication is generally not commutative (A × B ≠ B × A).

Transpose

The matrix with rows and columns swapped. Transposing an m×n matrix gives an n×m matrix, moving entry (i, j) to position (j, i).

Determinant

A single number computed from a square matrix. If it is 0 the matrix has no inverse. For a 2×2 matrix [[a, b], [c, d]] it equals ad − bc.

Inverse matrix

The matrix that gives the identity when multiplied by the original (A × A⁻¹ = I). It exists only for square matrices with a non-zero determinant. This tool finds it with Gauss-Jordan elimination.

Singular matrix

A square matrix whose determinant is 0, so it has no inverse. This happens, for example, when one row is a multiple or a sum of other rows.

FAQ

Why does the inverse show an error?

An inverse exists only for a square matrix with a non-zero determinant. A singular matrix (for example, one row is a multiple of another) or a non-square matrix has no inverse.

What is the difference between fraction and decimal display?

Everything is calculated as exact fractions; only the display changes. Decimals are rounded to 6 places, so 1/3 shows as 0.333333. Use fractions when you want to avoid rounding.

When can I not multiply A × B?

When the number of columns in A differs from the number of rows in B. A 2×3 matrix cannot be multiplied by a 2×2 matrix, for example. Order also matters: A × B and B × A are usually different matrices.

What number formats and sizes are supported?

Integers, decimals (0.25) and fractions (3/4). Empty cells count as 0, and scientific notation like 1e3 is not accepted. Matrices can be from 1×1 up to 6×6.

Share this page

↑↓ Select Enter Open Esc Close