Skip to content
Math & Statistics

How to Solve Systems of Equations: 4 Methods With One Worked Example

Solve two linear equations by graphing, substitution, elimination and Cramer's rule – one example worked four ways, plus word problems and special cases.

Umar Umar Content Writer Published 3 min read
How to solve systems of equations – Tuff Search guide
Share
In this guide
  1. Method 1: Graphing
  2. Method 2: Substitution
  3. Method 3: Elimination
  4. Method 4: Cramer’s rule
  5. Check your answer
  6. When there is no single solution
  7. A word problem
  8. Which method should you use?
  9. Frequently asked questions
  10. Related calculators
  11. Related articles

A system of equations is a set of equations that share the same unknowns. Solving it means finding values that make every equation true at once. For two linear equations in x and y there are four standard methods – here is the same example solved each way, so you can pick the one that suits the problem.

Our example:

2x + 3y = 13 and x − y = −1

Method 1: Graphing

Rewrite each equation as y = mx + b and draw both lines. The solution is the point where they cross. Here y = (13 − 2x) ÷ 3 and y = x + 1, which cross at (2, 3).

Graph of the lines 2x + 3y = 13 and x − y = −1 crossing at the point (2, 3)
The solution of a system is where the lines cross.

Graphing shows what a solution means, but it is only as precise as your drawing, so it is best for checking.

Method 2: Substitution

  1. Solve one equation for one variable. From x − y = −1: x = y − 1.
  2. Substitute into the other equation: 2(y − 1) + 3y = 13.
  3. Solve: 2y − 2 + 3y = 13 → 5y = 15 → y = 3.
  4. Back-substitute: x = 3 − 1 = 2.

Substitution is easiest when one equation already has a variable with a coefficient of 1.

Try it with your numbersCramer's Rule CalculatorSolve 2×2 and 3×3 systems of linear equations with Cramer's rule.Open calculator

Method 3: Elimination

  1. Multiply equations so one variable has opposite coefficients. Multiply x − y = −1 by 3: 3x − 3y = −3.
  2. Add it to 2x + 3y = 13: the y terms cancel, leaving 5x = 10.
  3. Solve: x = 2.
  4. Substitute back: 2 − y = −1 → y = 3.

Elimination is usually fastest when the coefficients are larger or there are three equations.

Method 4: Cramer’s rule

Cramer’s rule uses determinants. For ax + by = e and cx + dy = f:

D = ad − bc x = (ed − bf) ÷ D y = (af − ec) ÷ D

  1. D = (2)(−1) − (3)(1) = −5.
  2. Dx = (13)(−1) − (3)(−1) = −13 + 3 = −10, so x = −10 ÷ −5 = 2.
  3. Dy = (2)(−1) − (13)(1) = −15, so y = −15 ÷ −5 = 3.

Cramer’s rule is a formula you can apply mechanically, which makes it handy for computers and for 3 × 3 systems. The Cramer’s rule calculator shows every determinant step for 2 × 2 and 3 × 3 systems.

Check your answer

Always substitute back into both original equations: 2(2) + 3(3) = 4 + 9 = 13 ✓ and 2 − 3 = −1 ✓.

When there is no single solution

Lines What you see Number of solutions
Cross at one point One x and one y Exactly one
Parallel Elimination gives something false, like 0 = 5; D = 0 None
The same line Elimination gives 0 = 0; D = 0 Infinitely many

A word problem

A school play sells 50 tickets for $520. Adult tickets cost $12 and child tickets $8. How many of each were sold?

  1. Let a = adult tickets, c = child tickets.
  2. a + c = 50 and 12a + 8c = 520.
  3. Substitute c = 50 − a: 12a + 8(50 − a) = 520 → 4a + 400 = 520 → a = 30.
  4. c = 50 − 30 = 20. Check: 12 × 30 + 8 × 20 = 360 + 160 = 520 ✓.

Which method should you use?

  • Graphing – to visualise or check.
  • Substitution – when a variable is already isolated or has coefficient 1.
  • Elimination – for most hand calculations, especially with three equations.
  • Cramer’s rule – for a formula-based approach or when using a calculator.

Working with polynomials instead? See the remainder and factor theorems.

Frequently asked questions

Graphing, substitution, elimination and matrix methods such as Cramer’s rule.

Substitution when a variable has a coefficient of 1; elimination for most other cases.

If elimination produces a false statement such as 0 = 5, or the determinant D is 0 and the lines are parallel, there is no solution.

Only systems with the same number of equations as unknowns and a non-zero determinant.

Estimates, not adviceResults are estimates for information only, not tax, financial, medical or legal advice. Confirm important figures with a qualified professional. See our Disclaimer.

Share this guide

Related calculators

Umar

About the author

Umar

Content Writer · Tuff Search

Umar writes the guides on the Tuff Search blog. He explains how each calculation works in plain English, with worked examples, and checks every figure against official sources.

Keep reading

More math & statistics guides

View all guides