Lemonmath
Tiếng Việt

Equation of a line

Lesson 7.1 · 18 min read · Updated

A GPS gives you a starting point and a heading. Together they determine a straight road, with no further information. That is exactly how we describe a line in coordinates: a point on the line and a direction. This lesson turns that idea into equations in three useful forms.

Direction vector and normal vector

A direction vector u⃗=(a,b)≠0⃗\vec{u}=(a, b)\neq\vec{0} of a line is a vector parallel to the line. A normal vector n⃗=(A,B)≠0⃗\vec{n}=(A, B)\neq\vec{0} is perpendicular to the line. Since u⃗⊥n⃗\vec{u}\perp\vec{n}, rotating u⃗=(a,b)\vec{u}=(a, b) gives n⃗=(−b,a)\vec{n}=(-b, a) (or (b,−a)(b, -a)). Any non-zero multiple of u⃗\vec{u} (or n⃗\vec{n}) works too.

Three forms of the equation

In the general form the coefficients (A,B)(A, B) are a normal vector of the line. If B≠0B\neq 0, the slope is k=−ABk=-\frac{A}{B}.

A line through two points

For A(xA,yA)A(x_A, y_A) and B(xB,yB)B(x_B, y_B) take AB→\overrightarrow{AB} as a direction vector, then a normal vector, then the general form.

-2-1123456-2246810xyOAB
The line through AA and BB

Converting and sketching

-2-112345-2-11234xyO(3, 0)(0, 2)
The line 2x+3y−6=02x+3y-6=0

Parallel and perpendicular lines

A line parallel to Ax+By+C=0Ax+By+C=0 is Ax+By+C′=0Ax+By+C'=0 (same n⃗\vec{n}). A line perpendicular to it has n⃗′=u⃗=(B,−A)\vec{n}'=\vec{u}=(B, -A) as its normal vector, i.e. it is Bx−Ay+C′′=0Bx-Ay+C''=0.

Key terms

Summary

  • A line is fixed by a point and a direction vector u⃗\vec{u} or a normal vector n⃗\vec{n}.
  • Parametric: x=x0+atx=x_0+at, y=y0+bty=y_0+bt. General: A(x−x0)+B(y−y0)=0A(x-x_0)+B(y-y_0)=0 with n⃗=(A,B)\vec{n}=(A, B).
  • Slope form y=kx+my=kx+m with k=−ABk=-\frac{A}{B} for Ax+By+C=0Ax+By+C=0 and B≠0B\neq0.
  • Parallel lines share n⃗\vec{n}; perpendicular lines swap (A,B)→(B,−A)(A, B)\to(B, -A).

Practice

Show solutions
  1. (x−2)−3(y−1)=0(x-2)-3(y-1)=0, so x−3y+1=0x-3y+1=0.
  2. {x=1+2ty=1+t\begin{cases}x=1+2t\\ y=1+t\end{cases}. n⃗=(1,−2)\vec{n}=(1, -2): (x−1)−2(y−1)=0(x-1)-2(y-1)=0, so x−2y+1=0x-2y+1=0.
  3. AB→=(4,−4)\overrightarrow{AB}=(4, -4), so u⃗=(1,−1)\vec{u}=(1, -1) and n⃗=(1,1)\vec{n}=(1, 1). (x+1)+(y−2)=0(x+1)+(y-2)=0, so x+y−1=0x+y-1=0.
  4. y=2x+4y=2x+4: slope 22. For y=0y=0, x=−2x=-2; for x=0x=0, y=4y=4. Intercepts (−2,0)(-2, 0) and (0,4)(0, 4).
  5. u⃗=(−1,2)\vec{u}=(-1, 2), n⃗=(2,1)\vec{n}=(2, 1), point (2,3)(2, 3): 2(x−2)+(y−3)=02(x-2)+(y-3)=0, so 2x+y−7=02x+y-7=0.
  6. 2x−y+C=02x-y+C=0 through PP: 2+2+C=02+2+C=0, so C=−4C=-4. Line: 2x−y−4=02x-y-4=0.
  7. n⃗′=(1,2)\vec{n}'=(1, 2): (x−1)+2(y+2)=0(x-1)+2(y+2)=0, so x+2y+3=0x+2y+3=0. Check: 1−4+3=01-4+3=0 ✓.
  8. x4+y−3=1\frac{x}{4}+\frac{y}{-3}=1; multiplying by 1212: 3x−4y=123x-4y=12, so 3x−4y−12=03x-4y-12=0.
  9. M(3,2)M(3, 2), n⃗=AB→=(4,2)\vec{n}=\overrightarrow{AB}=(4, 2): 4(x−3)+2(y−2)=04(x-3)+2(y-2)=0, so 2x+y−8=02x+y-8=0. Check MM: 6+2−8=06+2-8=0 ✓.
  10. MM is the midpoint: a+02=2\frac{a+0}{2}=2 and 0+b2=3\frac{0+b}{2}=3, so a=4a=4, b=6b=6. The line is x4+y6=1\frac{x}{4}+\frac{y}{6}=1, i.e. 3x+2y−12=03x+2y-12=0.