Skip to content

Two equations with two unknowns

Two equations, two unknowns: the solution is the point where the two lines cross. Enter the coefficients and see both the working and the graph.

The explanation is shown. Quick: six numbers in, x and y out. Advanced: each equation as a line y = ax + b, and what the solution becomes if c₁ changes.

Your numbers

a₁x + b₁y = c₁

a₂x + b₂y = c₂

1x + 1y = 10

1x − 1y = 2

Answer

x

6

y

4

xy-10-10-5-5551010(6 ; 4)

How to work it out

  1. 1D = a₁·b₂ − a₂·b₁ = 1·-1 − 1·1 = -2
  2. 2Dx = c₁·b₂ − c₂·b₁ = 10·-1 − 2·1 = -12
  3. 3Dy = a₁·c₂ − a₂·c₁ = 1·2 − 1·10 = -8
  4. 4x = Dx / D = 6 · y = Dy / D = 4
  5. 5Test: 10 = 10 · 2 = 2

The formula

x = Dx / D · y = Dy / D

The determinant method. D is a₁·b₂ − a₂·b₁; if it is 0, the lines are parallel.

Elimination method

Add the equations or subtract one from the other, so that one unknown disappears.

The copper line is the first equation, the dashed one the second. The solution is where they cross.

In depth: more numbers and “what if”

The equations as lines

EquationAs a lineSlope
(1) 1x + 1y = 10y = -1x + 10-1
(2) 1x − 1y = 2y = 1x − 21

What if c₁ changes?

c₁xy
853
95.53.5
1064
116.54.5
1275

More: Equations and functions

6