Skip to content
Toolew.com

Matrix Calculator

Add, multiply, invert and row-reduce matrices exactly with fractions; find determinants, rank, powers and solve linear systems with steps.

Runs in your browser. Your data is not uploaded.
Loading tool…

This guide is not yet available in your language and is shown in English.

Tool guide

What this tool does

The Matrix Calculator works with matrices up to 20 × 20 using exact fractions, so inverses and determinants never suffer from rounding. It covers sums, products, scalar multiples, powers, transpose, determinant, inverse, rank, trace, reduced row echelon form and solving A·X = B, listing every row operation.

Matrices organise linear equations, transformations and data tables, and the standard operations on them, such as multiplication, inversion and row reduction, involve many small arithmetic steps. Floating-point software often reports a determinant of 1e-16 instead of 0 or an inverse full of long decimals, which makes it hard to tell whether a matrix is singular or what the exact answer is.

This calculator stores every entry as an exact fraction of big integers and performs Gauss-Jordan elimination, so the inverse of a matrix with integer entries is shown as clean fractions and a singular matrix gives a determinant of exactly 0. Row swaps, scalings and eliminations are logged, which lets you follow or check the method used in linear algebra courses. Results can be copied as tab-separated text, as LaTeX bmatrix code or downloaded as CSV. Calculations run locally in your browser.

How to use Matrix Calculator

  1. Type Matrix A with one row per line and entries separated by spaces or commas; fractions like 3/4 and decimals are fine.
  2. Choose an Operation, for example Inverse A⁻¹ or Solve A·X = B.
  3. If the operation needs a second matrix, enter Matrix B; for Solve, B is the right-hand-side column (or several columns).
  4. For k × A or Aⁿ, enter the scalar or power in the options panel.
  5. Read the result matrix, then expand Row operations to see each elimination step.
  6. Copy the result as text or LaTeX, download it as CSV, or switch on decimals for an approximate view.

Tips for better results

  • Use Swap to exchange A and B and compare A × B with B × A; matrix multiplication is not commutative.
  • A determinant of 0 means the matrix is singular, has no inverse, and its rows are linearly dependent.
  • Solve A·X = B with several right-hand-side columns at once by giving B several columns.
  • Random fills a 3 × 3 matrix with integers from −9 to 9 for practice problems.

Common use cases

  • Checking linear algebra homework: inverses, determinants and RREF.
  • Solving systems of linear equations from circuits, chemistry balancing or economics models.
  • Computing transition-matrix powers for Markov chains.
  • Producing LaTeX for matrices in reports and assignments.

Common mistakes to avoid

  • Multiplying matrices with incompatible sizes: the left matrix’s column count must equal the right matrix’s row count.
  • Assuming every square matrix has an inverse; singular matrices do not.
  • Entering rows with different numbers of entries, which is rejected with the row number to fix.

Frequently asked questions

How is the inverse calculated?

The calculator row-reduces the augmented matrix [A | I] with Gauss-Jordan elimination. When the left side becomes the identity, the right side is A⁻¹. If a pivot is missing, A is singular and no inverse exists.

Why are results shown as fractions?

All arithmetic is exact, using fractions of arbitrary-precision integers. Switch on Show decimals to display approximations with the number of significant digits you choose.

What does Solve A·X = B report?

It returns the unique solution when A has full column rank, says the system is inconsistent when there is no solution, and shows the RREF with the free variables when there are infinitely many solutions.

How large can the matrices be?

Up to 20 rows and 20 columns. Exact fractions can grow long for large matrices with complicated entries, so very large inputs may take a moment.

Feedback & suggestions

Help us improve Matrix Calculator. We read every message.

Rating (optional)
Necessary
Required for security, language and theme preferences. Always on.