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
Worked examples
Example 1
Line L passes through A(1,2) and B(4,8). Which equation describes L?
Answer
A — 2x−y=0
Standard solution (without a calculator)
- Rewrite: (x₁,y₁)=(1,2), (x₂,y₂)=(4,8)
- Calculate: a=8−2=6; b=1−4=−3; c=−6(1)−(−3)(2)=0
- Rewrite: 6x−3y=0 ⇒ 2x−y=0
- Check: 2(1)−2=0; 2(4)−8=0
- Therefore: Answer A; (a,b,c)=(6,−3,0)
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)
- Rewrite: (x₁,y₁)=(−2,1), (x₂,y₂)=(−2,7)
- Calculate: a=7−1=6; b=−2−(−2)=0; c=−6(−2)−0(1)=12
- Rewrite: 6x+12=0 ⇒ x+2=0
- Calculate: m=(7−1)/(−2+2)=6/0 ⇒ Undefined
- Therefore: x=−2; Vertical line
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?
Answer
A — 4x−y−7=0
Standard solution (without a calculator)
- Calculate: Midpoint: N=((0+6)/2,(7+3)/2)=(3,5)
- Substitute: (x₁,y₁)=(2,1), (x₂,y₂)=(3,5)
- Calculate: a=5−1=4; b=2−3=−1; c=−4(2)−(−1)(1)=−7
- Check: P: 4(2)−1−7=0; N: 4(3)−5−7=0
- Therefore: Answer A; 4x−y−7=0
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.
Checking access…