045Mathematics · Coordinate geometry

Line through Two Points

Line through Two Points

Enter two distinct points to obtain the coefficients of ax+by+c=0, including vertical and horizontal lines.

  • 62 bytes
  • COMP mode
01

Worked examples

Example 1

Line L passes through A(1,2) and B(4,8). Which equation describes L?

  1. A.2x−y=0
  2. B.2x+y=0
  3. C.x−2y=0
  4. D.x−y=0
Answer
A — 2x−y=0
Standard solution (without a calculator)
  1. Rewrite: (x₁,y₁)=(1,2), (x₂,y₂)=(4,8)
  2. Calculate: a=8−2=6; b=1−4=−3; c=−6(1)−(−3)(2)=0
  3. Rewrite: 6x−3y=0 ⇒ 2x−y=0
  4. Check: 2(1)−2=0; 2(4)−8=0
  5. Therefore: Answer A; (a,b,c)=(6,−3,0)
Do it on the calculator

Example 2

Find the general equation of the line through P(−2,1) and Q(−2,7), and explain why its slope is undefined.

Answer
x+2=0; Slope: Undefined
Standard solution (without a calculator)
  1. Rewrite: (x₁,y₁)=(−2,1), (x₂,y₂)=(−2,7)
  2. Calculate: a=7−1=6; b=−2−(−2)=0; c=−6(−2)−0(1)=12
  3. Rewrite: 6x+12=0 ⇒ x+2=0
  4. Calculate: m=(7−1)/(−2+2)=6/0 ⇒ Undefined
  5. Therefore: x=−2; Vertical line
Do it on the calculator

Example 3

Triangle PQR has P(2,1), Q(0,7), R(6,3). N is the midpoint of QR. Which equation describes median PN?

  1. A.4x−y−7=0
  2. B.4x+y−9=0
  3. C.x−4y+2=0
  4. D.4x−y+7=0
Answer
A — 4x−y−7=0
Standard solution (without a calculator)
  1. Calculate: Midpoint: N=((0+6)/2,(7+3)/2)=(3,5)
  2. Substitute: (x₁,y₁)=(2,1), (x₂,y₂)=(3,5)
  3. Calculate: a=5−1=4; b=2−3=−1; c=−4(2)−(−1)(1)=−7
  4. Check: P: 4(2)−1−7=0; N: 4(3)−5−7=0
  5. Therefore: Answer A; 4x−y−7=0
Do it on the calculator
02

When to use it

Enter two distinct points to obtain the coefficients of ax+by+c=0, including vertical and horizontal lines.

Use it for

  • Line through Two Points

You enter

  • A=x₁ → B=y₁ → C=x₂ → D=y₂
  • Use COMP / Deg / Norm 1. Enter every value anew; blank EXE keeps the stored value rather than entering zero.

It shows

  • Coefficient a → Coefficient b → Coefficient c
  • (a,b,c) ~ k(a,b,c), k≠0; 6x−3y=0 ⇔ 2x−y=0

Check before starting

  • Two distinct points: (x₁,y₁)≠(x₂,y₂); (x₁,y₁)=(x₂,y₂) ⇒ Math ERROR
  • Finite precision can affect nearly parallel lines, very large values or tiny differences; extreme data may give Math ERROR. This is numerical calculation, not symbolic algebra.
  • These are original DSE-style exercises.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.