Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Tools › Maths

Pair of linear equations solver

Solve a₁x + b₁y = c₁ and a₂x + b₂y = c₂ by cross-multiplication.

x = 2, y = 3

  1. D = a₁b₂ − a₂b₁ = -5
  2. x = (c₁b₂ − c₂b₁) / D = -10 / -5 = 2
  3. y = (a₁c₂ − a₂c₁) / D = -15 / -5 = 3
  4. Check: 2(2) + 3(3) = 13

How it works

Two straight lines either cross once (one solution), are parallel (no solution) or are the same line (infinitely many).

Check a₁/a₂ against b₁/b₂ first: if they differ, there is exactly one solution.

Worked example

With a₁ = 2, b₁ = 3, c₁ = 13, a₂ = 1, b₂ = -1, c₂ = -1:

  1. D = a₁b₂ − a₂b₁ = -5
  2. x = (c₁b₂ − c₂b₁) / D = -10 / -5 = 2
  3. y = (a₁c₂ − a₂c₁) / D = -15 / -5 = 3
  4. Check: 2(2) + 3(3) = 13

Answer: x = 2, y = 3

Questions

How do I know there is no solution?
If a₁/a₂ = b₁/b₂ but that is not equal to c₁/c₂, the lines are parallel and never meet.

Learn the method properly

The chapter behind this tool, with animations, an experiment and an AI tutor who checks each step you write.

Open the chapter

More maths tools

  • Quadratic equation solver
  • LCM and HCF calculator
  • Fraction simplifier
  • Percentage calculator
  • Simple interest calculator
  • Compound interest calculator