MatrixStep

Linear System Solver

Reduces the augmented matrix [A | b] and tells whether there is one solution, none, or infinitely many.

INPUT

Integers, fractions (1/3) and decimals (0.25) are accepted. Empty cells count as 0. Paste a block of numbers from a spreadsheet or textbook into the first cell to fill the whole matrix.

RESULT

LaTeX is the math code you can paste into Overleaf, Notion equation blocks or Word's equation editor.

Linear systems and the augmented matrix

Write Ax = b as the augmented matrix [A | b] and reduce it to RREF; the solution can be read off directly.

A row of the form 0 = (nonzero) means no solution. A variable without a pivot (a free variable) means infinitely many solutions.

Full explanation with examples: One Solution, No Solution, or Infinitely Many? How to Tell

Exam tipIf the rank equals the number of unknowns and there is no contradiction, the solution is unique.

How to do it by hand

  1. Fix the order of the unknowns and write only the coefficients as the augmented matrix [A | b]. Put a 0 wherever an unknown is missing.
  2. Row-reduce the left side to reduced row echelon form, applying the same operations to the right-hand constants.
  3. Read off the result. If the left side is the identity, the right side is the solution.
  4. If a row becomes all zeros on the left, look at its right side. 0 = 0 means infinitely many solutions (set the free variable to t); 0 = c with c ≠ 0 is a contradiction, so there is no solution.
Worked example

Solve 2x + y = 5, x − y = 1. Augmented matrix: [2 1 | 5; 1 −1 | 1]

R₁ ↔ R₂ → [1 −1 | 1; 2 1 | 5], R₂ − 2R₁ → [1 −1 | 1; 0 3 | 3], R₂ ÷ 3 → [1 −1 | 1; 0 1 | 1]

R₁ + R₂ → [1 0 | 2; 0 1 | 1]. So x = 2, y = 1.

Check: 2·2 + 1 = 5 ✓, 2 − 1 = 1 ✓

Where is it used?

  • Circuit analysis (Kirchhoff's laws), force balance in structures and balancing chemical equations are all linear systems.
  • Input-output models in economics and least-squares regression in statistics both end up solving Ax = b.
  • Fitting a parabola or surface through given points in graphics means solving for the coefficients.

Common mistakes

  • Shifting columns instead of writing 0 for a missing unknown. x + z = 3 is [1 0 1 | 3], not [1 1 | 3].
  • Confusing 'no solution' with 'infinitely many'. 0 = 0 means infinitely many; 0 = 5 means none.
  • Assuming equal numbers of equations and unknowns guarantee one solution. If the determinant is 0, three equations can still have no solution or infinitely many.

How to use

  1. Set the matrix size with the row and column buttons. Up to 6×6 is supported.
  2. Type numbers into the cells and the result updates instantly. Enter fractions as 1/3 and negatives as -2.
  3. Enter moves to the next cell; the ← → ↑ ↓ arrow keys move between cells.
  4. Open ‘Steps’ to see the full working. ‘Copy LaTeX’ copies the result as math code you can paste into Overleaf, a Notion equation block or Word's equation editor.

FAQ

Can the number of equations differ from the number of unknowns?
Yes. Rows (equations) and columns (unknowns) can be set independently.
What is t in the general solution?
A parameter standing for a free variable. Any value of t gives a solution of the system.

Related guides