Pair of linear equations solver
Solve a₁x + b₁y = c₁ and a₂x + b₂y = c₂ by cross-multiplication.
x = 2, y = 3
- D = a₁b₂ − a₂b₁ = -5
- x = (c₁b₂ − c₂b₁) / D = -10 / -5 = 2
- y = (a₁c₂ − a₂c₁) / D = -15 / -5 = 3
- 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:
- D = a₁b₂ − a₂b₁ = -5
- x = (c₁b₂ − c₂b₁) / D = -10 / -5 = 2
- y = (a₁c₂ − a₂c₁) / D = -15 / -5 = 3
- 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