# System of Equations Solver

> Solve 2×2 and 3×3 systems of linear equations with exact fractions, step-by-step Gaussian elimination or Cramer's rule, and no/infinite solution detection.

Interactive calculator: https://calculatorsplatform.com/c/linear-equations/
Category: Math & Statistics Calculators
Calculations run in the browser; inputs can be prefilled through URL parameters and shared with the Share button.

## What a system of linear equations is

A system of linear equations is a set of equations that share the same unknowns, such as

> 2x + 3y = 8  and  x − y = −1

A solution is a set of values that makes every equation true at once. For two unknowns each equation is a straight line and the solution is where the lines cross; for three unknowns each equation is a plane in space.

There are only three possibilities. The system has **exactly one solution** (the lines cross at one point), **no solution** (parallel lines, or planes with no common point — the equations contradict each other), or **infinitely many solutions** (the equations are dependent: one can be built from the others, so the lines coincide).

## Gaussian elimination and Cramer's rule

**Gauss–Jordan elimination** writes the system as an augmented matrix [A | b] and applies three row operations that never change the solution: swap two rows, multiply a row by a non-zero number, and add a multiple of one row to another. Column by column, each pivot is made 1 and every other entry in its column is made 0. When the left side becomes the identity matrix the right column is the answer. A row that reads 0 = 5 means no solution; a row of all zeros means a free variable and infinitely many solutions, which the calculator writes in terms of a parameter t.

**Cramer's rule** uses determinants. With D = det(A) and Dₓ the determinant of A with its x column replaced by the constants:

> x = Dₓ ÷ D,  y = Dᵧ ÷ D,  z = D_z ÷ D

It is elegant for 2×2 and 3×3 systems but only works when D ≠ 0; when D = 0 elimination is needed to tell "no solution" from "infinitely many". All arithmetic here uses exact rational numbers, so a result like 9/23 is shown exactly.

## Worked example

Solve 2x + 3y = 8 and x − y = −1 (the default system).

1. Augmented matrix: [2 3 | 8], [1 −1 | −1].
2. R1 → R1 ÷ 2 gives [1 3/2 | 4].
3. R2 → R2 − R1 gives [0 −5/2 | −5].
4. R2 → R2 ÷ (−5/2) gives [0 1 | 2], so **y = 2**.
5. R1 → R1 − (3/2)·R2 gives [1 0 | 1], so **x = 1**.

With Cramer's rule: D = 2·(−1) − 3·1 = −5, Dₓ = 8·(−1) − 3·(−1) = −5, Dᵧ = 2·(−1) − 8·1 = −10, so x = −5 ÷ −5 = 1 and y = −10 ÷ −5 = 2. Check: 2·1 + 3·2 = 8 ✓ and 1 − 2 = −1 ✓.

## Tips for entering a system

- Move every variable to the left and every constant to the right before typing: 3x = 12 − 2y becomes 3x + 2y = 12.
- If a variable is missing from an equation, enter 0 for its coefficient.
- Coefficients may be integers, decimals (0.25) or fractions (−3/4).
- For larger matrices, inverses and determinants on their own, use the [matrix calculator](https://calculatorsplatform.com/c/matrix/); to find the equation of a line through two points first, use the [slope calculator](https://calculatorsplatform.com/c/slope/).

## Frequently asked questions

### How do I know if a system has no solution?

During elimination a row of the form 0 = c with c ≠ 0 appears. Equivalently, the rank of the coefficient matrix is smaller than the rank of the augmented matrix. For two equations it means the lines are parallel.

### What does "infinitely many solutions" look like?

At least one variable is free. For x + 2y = 3 and 2x + 4y = 6 the second equation is just twice the first, so every point x = 3 − 2t, y = t is a solution for any t.

### Which method is better, elimination or Cramer's rule?

Both give the same answer. Cramer's rule is quick for small systems with a non-zero determinant; elimination works in every case and scales to larger systems.

### Why are the answers fractions?

Exact fractions avoid rounding errors. A decimal approximation is shown next to every non-integer answer.

## Related calculators

- [Matrix Calculator](https://calculatorsplatform.com/c/matrix/index.md)
- [Slope Calculator](https://calculatorsplatform.com/c/slope/index.md)
- [Fraction Calculator](https://calculatorsplatform.com/c/fraction/index.md)
- [Quadratic Formula Calculator](https://calculatorsplatform.com/c/quadratic/index.md)
- [GCF & LCM Calculator](https://calculatorsplatform.com/c/gcf-lcm/index.md)
- [Scientific Calculator](https://calculatorsplatform.com/c/scientific/index.md)

---
Source: CalculatorsPlatform (https://calculatorsplatform.com/c/linear-equations/). Last reviewed 2026-11-25. Please link to the calculator page when citing.
