Equation of a Line

311. Two Points, One Line · Deriving the equation from any two coordinates

The line always passes through A and B, and its slope matches the two-points formula.

O-6-4-22464321-1-2-3y − y₁ = m(x − x₁)m = (y₂ − y₁)/(x₂ − x₁) = (2 − -1)/(3 − -3) = 0.5m = (y₂ − y₁)/(x₂ − x₁) = (2 − -1)/(3 − -3) = 0.5A (-3, -1)A (-3, -1)B (3, 2)B (3, 2)
A line through two points A(x₁, y₁) and B(x₂, y₂) has slope (y₂ − y₁)/(x₂ − x₁), giving the two-point form (y − y₁)/(x − x₁) = (y₂ − y₁)/(x₂ − x₁). Two distinct points fix exactly one line.

Stuck? Ask Guru

Selina ICSE: Equation of a Line

What this lesson covers

Try to break it

Drag A and B to set two points. The slope m = (y₂ − y₁) / (x₂ − x₁) updates immediately, and the line through both points is uniquely determined: y − y₁ = m(x − x₁). Try to find a second different line through the same two points; impossible — two distinct points pin exactly one line.

How you build it

Draw the line through two points and find its slope.

  • Point tool: plot A(x₁, y₁) at (-3, -1).
  • Point tool: plot B(x₂, y₂) at (3, 2).
  • Line tool: click A, then B — the one line through both points. Slope = (y₂−y₁)/(x₂−x₁) = (2−(−1))/(3−(−3)) = 0.5.

The proof, step by step

Prove that the line through A and B has the slope given by the two-point formula.

  • Let the line pass through two distinct points A(x₁, y₁) and B(x₂, y₂).
  • The slope m of the line is defined as the change in y over the change in x: m = (y₂ - y₁) / (x₂ - x₁).
  • The point-slope form of a line is y - y₁ = m(x - x₁).
  • Substituting the expression for m gives the two-points form: y - y₁ = ((y₂ - y₁)/(x₂ - x₁))(x - x₁).

Worked example

Find the equation of the line passing through points A(2, 3) and B(4, 7).

Slope m = (7-3)/(4-2) = 2. Using point-slope form with A(2,3): y - 3 = 2(x - 2).

  • y - 3 = 2(x - 2) — correct
  • y - 3 = 1/2(x - 2)
  • y - 3 = -2(x - 2)
  • y - 3 = 2(x + 2)
Hold to talk

Subscription Status