Learning goals
Use a direction vector u ⃗ \vec{u} u and a normal vector n ⃗ \vec{n} n of a line.
Write parametric, general and slope forms of a line and convert between them.
Find the equation of a line through two points, and of parallel and perpendicular lines.
Use intercepts to sketch a line.
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} u = ( a , b ) = 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} n = ( A , B ) = 0 is perpendicular to the line. Since u ⃗ ⊥ n ⃗ \vec{u}\perp\vec{n} u ⊥ n , rotating u ⃗ = ( a , b ) \vec{u}=(a, b) u = ( a , b ) gives n ⃗ = ( − b , a ) \vec{n}=(-b, a) n = ( − b , a ) (or ( b , − a ) (b, -a) ( b , − a ) ). Any non-zero multiple of u ⃗ \vec{u} u (or n ⃗ \vec{n} n ) works too.
Definition Equations of a line
Let the line pass through M 0 ( x 0 , y 0 ) M_0(x_0, y_0) M 0 ( x 0 , y 0 ) .
Parametric: with direction vector u ⃗ = ( a , b ) \vec{u}=(a, b) u = ( a , b ) ,
{ x = x 0 + a t y = y 0 + b t ( t ∈ R ) . \begin{cases}x=x_0+at\\ y=y_0+bt\end{cases}\quad(t\in\mathbb{R}). { x = x 0 + a t y = y 0 + b t ( t ∈ R ) .
General: with normal vector n ⃗ = ( A , B ) \vec{n}=(A, B) n = ( A , B ) ,
A ( x − x 0 ) + B ( y − y 0 ) = 0 , i.e. A x + B y + C = 0. A(x-x_0)+B(y-y_0)=0,\ \text{ i.e. }\ Ax+By+C=0. A ( x − x 0 ) + B ( y − y 0 ) = 0 , i.e. A x + B y + C = 0.
Slope form: a non-vertical line is y = k x + m y=kx+m y = k x + m , where k k k is the slope.
In the general form the coefficients ( A , B ) (A, B) ( A , B ) are a normal vector of the line. If B ≠ 0 B\neq 0 B = 0 , the slope is k = − A B k=-\frac{A}{B} k = − B A .
Example From a point and a normal vector
Write the equation of the line through M ( 1 , 2 ) M(1, 2) M ( 1 , 2 ) with normal vector n ⃗ = ( 3 , − 2 ) \vec{n}=(3, -2) n = ( 3 , − 2 ) , and give a direction vector.
Solution. 3 ( x − 1 ) − 2 ( y − 2 ) = 0 3(x-1)-2(y-2)=0 3 ( x − 1 ) − 2 ( y − 2 ) = 0 , so 3 x − 3 − 2 y + 4 = 0 3x-3-2y+4=0 3 x − 3 − 2 y + 4 = 0 , i.e. 3 x − 2 y + 1 = 0 3x-2y+1=0 3 x − 2 y + 1 = 0 . A direction vector is u ⃗ = ( 2 , 3 ) \vec{u}=(2, 3) u = ( 2 , 3 ) (swap the coordinates of n ⃗ \vec{n} n and change one sign). Check: 3 ⋅ 1 − 2 ⋅ 2 + 1 = 0 3\cdot 1-2\cdot 2+1=0 3 ⋅ 1 − 2 ⋅ 2 + 1 = 0 ✓.
A line through two points
For A ( x A , y A ) A(x_A, y_A) A ( x A , y A ) and B ( x B , y B ) B(x_B, y_B) B ( x B , y B ) take A B → \overrightarrow{AB} A B as a direction vector, then a normal vector, then the general form.
-2 -1 1 2 3 4 5 6 -2 2 4 6 8 10 x y O A B The line through A A A and B B B Example Two points
Find the equation of the line through A ( 1 , 3 ) A(1, 3) A ( 1 , 3 ) and B ( 4 , 9 ) B(4, 9) B ( 4 , 9 ) .
Solution. A B → = ( 3 , 6 ) \overrightarrow{AB}=(3, 6) A B = ( 3 , 6 ) , so u ⃗ = ( 1 , 2 ) \vec{u}=(1, 2) u = ( 1 , 2 ) works, and n ⃗ = ( 2 , − 1 ) \vec{n}=(2, -1) n = ( 2 , − 1 ) . The line: 2 ( x − 1 ) − ( y − 3 ) = 0 2(x-1)-(y-3)=0 2 ( x − 1 ) − ( y − 3 ) = 0 , i.e. 2 x − y + 1 = 0 2x-y+1=0 2 x − y + 1 = 0 , or y = 2 x + 1 y=2x+1 y = 2 x + 1 with slope k = 2 k=2 k = 2 . Check B B B : 2 ⋅ 4 − 9 + 1 = 0 2\cdot 4-9+1=0 2 ⋅ 4 − 9 + 1 = 0 ✓.
Converting and sketching
Example Intercept form
Sketch 2 x + 3 y − 6 = 0 2x+3y-6=0 2 x + 3 y − 6 = 0 and find its slope.
Solution. For y = 0 y=0 y = 0 : x = 3 x=3 x = 3 . For x = 0 x=0 x = 0 : y = 2 y=2 y = 2 . The line passes through ( 3 , 0 ) (3, 0) ( 3 , 0 ) and ( 0 , 2 ) (0, 2) ( 0 , 2 ) , so in intercept form x 3 + y 2 = 1 \frac{x}{3}+\frac{y}{2}=1 3 x + 2 y = 1 . Solving for y y y : y = − 2 3 x + 2 y=-\frac23x+2 y = − 3 2 x + 2 , slope k = − 2 3 k=-\frac23 k = − 3 2 .
-2 -1 1 2 3 4 5 -2 -1 1 2 3 4 x y O (3, 0) (0, 2) The line 2 x + 3 y − 6 = 0 2x+3y-6=0 2 x + 3 y − 6 = 0 Example Parametric to general
Convert { x = 1 + 2 t y = − 1 + 3 t \begin{cases}x=1+2t\\ y=-1+3t\end{cases} { x = 1 + 2 t y = − 1 + 3 t to a general equation.
Solution. The direction vector is u ⃗ = ( 2 , 3 ) \vec{u}=(2, 3) u = ( 2 , 3 ) , so n ⃗ = ( 3 , − 2 ) \vec{n}=(3, -2) n = ( 3 , − 2 ) , and the line passes through ( 1 , − 1 ) (1, -1) ( 1 , − 1 ) : 3 ( x − 1 ) − 2 ( y + 1 ) = 0 3(x-1)-2(y+1)=0 3 ( x − 1 ) − 2 ( y + 1 ) = 0 , i.e. 3 x − 2 y − 5 = 0 3x-2y-5=0 3 x − 2 y − 5 = 0 .
Parallel and perpendicular lines
A line parallel to A x + B y + C = 0 Ax+By+C=0 A x + B y + C = 0 is A x + B y + C ′ = 0 Ax+By+C'=0 A x + B y + C ′ = 0 (same n ⃗ \vec{n} n ). A line perpendicular to it has n ⃗ ′ = u ⃗ = ( B , − A ) \vec{n}'=\vec{u}=(B, -A) n ′ = u = ( B , − A ) as its normal vector, i.e. it is B x − A y + C ′ ′ = 0 Bx-Ay+C''=0 B x − A y + C ′′ = 0 .
Example Parallel and perpendicular
Find the line through P ( 2 , − 1 ) P(2, -1) P ( 2 , − 1 ) (a) parallel and (b) perpendicular to 3 x − 4 y + 5 = 0 3x-4y+5=0 3 x − 4 y + 5 = 0 .
Solution.
(a) 3 x − 4 y + C ′ = 0 3x-4y+C'=0 3 x − 4 y + C ′ = 0 through P P P : 6 + 4 + C ′ = 0 6+4+C'=0 6 + 4 + C ′ = 0 , so C ′ = − 10 C'=-10 C ′ = − 10 . The line is 3 x − 4 y − 10 = 0 3x-4y-10=0 3 x − 4 y − 10 = 0 .
(b) 4 x + 3 y + C ′ ′ = 0 4x+3y+C''=0 4 x + 3 y + C ′′ = 0 through P P P : 8 − 3 + C ′ ′ = 0 8-3+C''=0 8 − 3 + C ′′ = 0 , so C ′ ′ = − 5 C''=-5 C ′′ = − 5 . The line is 4 x + 3 y − 5 = 0 4x+3y-5=0 4 x + 3 y − 5 = 0 .
Example A perpendicular bisector
Find the perpendicular bisector of A B AB A B with A ( 1 , 1 ) A(1, 1) A ( 1 , 1 ) and B ( 5 , 3 ) B(5, 3) B ( 5 , 3 ) .
Solution. The midpoint is M ( 3 , 2 ) M(3, 2) M ( 3 , 2 ) and A B → = ( 4 , 2 ) \overrightarrow{AB}=(4, 2) A B = ( 4 , 2 ) is a normal vector of the bisector. So 4 ( x − 3 ) + 2 ( y − 2 ) = 0 4(x-3)+2(y-2)=0 4 ( x − 3 ) + 2 ( y − 2 ) = 0 , i.e. 2 x + y − 8 = 0 2x+y-8=0 2 x + y − 8 = 0 .
Key terms
Key terms
English Tiếng Việt direction vector vectơ chỉ phương normal vector vectơ pháp tuyến parametric equation phương trình tham số general equation phương trình tổng quát slope hệ số góc intercept giao điểm với trục parallel song song perpendicular bisector đường trung trực
Summary
A line is fixed by a point and a direction vector u ⃗ \vec{u} u or a normal vector n ⃗ \vec{n} n .
Parametric: x = x 0 + a t x=x_0+at x = x 0 + a t , y = y 0 + b t y=y_0+bt y = y 0 + b t . General: A ( x − x 0 ) + B ( y − y 0 ) = 0 A(x-x_0)+B(y-y_0)=0 A ( x − x 0 ) + B ( y − y 0 ) = 0 with n ⃗ = ( A , B ) \vec{n}=(A, B) n = ( A , B ) .
Slope form y = k x + m y=kx+m y = k x + m with k = − A B k=-\frac{A}{B} k = − B A for A x + B y + C = 0 Ax+By+C=0 A x + B y + C = 0 and B ≠ 0 B\neq0 B = 0 .
Parallel lines share n ⃗ \vec{n} n ; perpendicular lines swap ( A , B ) → ( B , − A ) (A, B)\to(B, -A) ( A , B ) → ( B , − A ) .
Practice
Practice
Write the equation of the line through A ( 2 , 1 ) A(2, 1) A ( 2 , 1 ) with normal vector n ⃗ = ( 1 , − 3 ) \vec{n}=(1, -3) n = ( 1 , − 3 ) .
Write the parametric equations and the general equation of the line through A ( 1 , 1 ) A(1, 1) A ( 1 , 1 ) with direction vector u ⃗ = ( 2 , 1 ) \vec{u}=(2, 1) u = ( 2 , 1 ) .
Find the line through A ( − 1 , 2 ) A(-1, 2) A ( − 1 , 2 ) and B ( 3 , − 2 ) B(3, -2) B ( 3 , − 2 ) .
Find the slope and the two intercepts of 4 x − 2 y + 8 = 0 4x-2y+8=0 4 x − 2 y + 8 = 0 .
Convert { x = 2 − t y = 3 + 2 t \begin{cases}x=2-t\\ y=3+2t\end{cases} { x = 2 − t y = 3 + 2 t to a general equation.
Find the line through P ( 1 , − 2 ) P(1, -2) P ( 1 , − 2 ) parallel to 2 x − y + 3 = 0 2x-y+3=0 2 x − y + 3 = 0 .
Find the line through P ( 1 , − 2 ) P(1, -2) P ( 1 , − 2 ) perpendicular to 2 x − y + 3 = 0 2x-y+3=0 2 x − y + 3 = 0 .
Write the line through ( 4 , 0 ) (4, 0) ( 4 , 0 ) and ( 0 , − 3 ) (0, -3) ( 0 , − 3 ) in general form.
Challenge. Find the perpendicular bisector of A ( 1 , 1 ) A(1, 1) A ( 1 , 1 ) and B ( 5 , 3 ) B(5, 3) B ( 5 , 3 ) and check that it passes through the midpoint.
Challenge. A line through M ( 2 , 3 ) M(2, 3) M ( 2 , 3 ) meets the axes at A ( a , 0 ) A(a, 0) A ( a , 0 ) and B ( 0 , b ) B(0, b) B ( 0 , b ) with M M M the midpoint of A B AB A B . Find its equation.
Show solutions
( x − 2 ) − 3 ( y − 1 ) = 0 (x-2)-3(y-1)=0 ( x − 2 ) − 3 ( y − 1 ) = 0 , so x − 3 y + 1 = 0 x-3y+1=0 x − 3 y + 1 = 0 .
{ x = 1 + 2 t y = 1 + t \begin{cases}x=1+2t\\ y=1+t\end{cases} { x = 1 + 2 t y = 1 + t . n ⃗ = ( 1 , − 2 ) \vec{n}=(1, -2) n = ( 1 , − 2 ) : ( x − 1 ) − 2 ( y − 1 ) = 0 (x-1)-2(y-1)=0 ( x − 1 ) − 2 ( y − 1 ) = 0 , so x − 2 y + 1 = 0 x-2y+1=0 x − 2 y + 1 = 0 .
A B → = ( 4 , − 4 ) \overrightarrow{AB}=(4, -4) A B = ( 4 , − 4 ) , so u ⃗ = ( 1 , − 1 ) \vec{u}=(1, -1) u = ( 1 , − 1 ) and n ⃗ = ( 1 , 1 ) \vec{n}=(1, 1) n = ( 1 , 1 ) . ( x + 1 ) + ( y − 2 ) = 0 (x+1)+(y-2)=0 ( x + 1 ) + ( y − 2 ) = 0 , so x + y − 1 = 0 x+y-1=0 x + y − 1 = 0 .
y = 2 x + 4 y=2x+4 y = 2 x + 4 : slope 2 2 2 . For y = 0 y=0 y = 0 , x = − 2 x=-2 x = − 2 ; for x = 0 x=0 x = 0 , y = 4 y=4 y = 4 . Intercepts ( − 2 , 0 ) (-2, 0) ( − 2 , 0 ) and ( 0 , 4 ) (0, 4) ( 0 , 4 ) .
u ⃗ = ( − 1 , 2 ) \vec{u}=(-1, 2) u = ( − 1 , 2 ) , n ⃗ = ( 2 , 1 ) \vec{n}=(2, 1) n = ( 2 , 1 ) , point ( 2 , 3 ) (2, 3) ( 2 , 3 ) : 2 ( x − 2 ) + ( y − 3 ) = 0 2(x-2)+(y-3)=0 2 ( x − 2 ) + ( y − 3 ) = 0 , so 2 x + y − 7 = 0 2x+y-7=0 2 x + y − 7 = 0 .
2 x − y + C = 0 2x-y+C=0 2 x − y + C = 0 through P P P : 2 + 2 + C = 0 2+2+C=0 2 + 2 + C = 0 , so C = − 4 C=-4 C = − 4 . Line: 2 x − y − 4 = 0 2x-y-4=0 2 x − y − 4 = 0 .
n ⃗ ′ = ( 1 , 2 ) \vec{n}'=(1, 2) n ′ = ( 1 , 2 ) : ( x − 1 ) + 2 ( y + 2 ) = 0 (x-1)+2(y+2)=0 ( x − 1 ) + 2 ( y + 2 ) = 0 , so x + 2 y + 3 = 0 x+2y+3=0 x + 2 y + 3 = 0 . Check: 1 − 4 + 3 = 0 1-4+3=0 1 − 4 + 3 = 0 ✓.
x 4 + y − 3 = 1 \frac{x}{4}+\frac{y}{-3}=1 4 x + − 3 y = 1 ; multiplying by 12 12 12 : 3 x − 4 y = 12 3x-4y=12 3 x − 4 y = 12 , so 3 x − 4 y − 12 = 0 3x-4y-12=0 3 x − 4 y − 12 = 0 .
M ( 3 , 2 ) M(3, 2) M ( 3 , 2 ) , n ⃗ = A B → = ( 4 , 2 ) \vec{n}=\overrightarrow{AB}=(4, 2) n = A B = ( 4 , 2 ) : 4 ( x − 3 ) + 2 ( y − 2 ) = 0 4(x-3)+2(y-2)=0 4 ( x − 3 ) + 2 ( y − 2 ) = 0 , so 2 x + y − 8 = 0 2x+y-8=0 2 x + y − 8 = 0 . Check M M M : 6 + 2 − 8 = 0 6+2-8=0 6 + 2 − 8 = 0 ✓.
M M M is the midpoint: a + 0 2 = 2 \frac{a+0}{2}=2 2 a + 0 = 2 and 0 + b 2 = 3 \frac{0+b}{2}=3 2 0 + b = 3 , so a = 4 a=4 a = 4 , b = 6 b=6 b = 6 . The line is x 4 + y 6 = 1 \frac{x}{4}+\frac{y}{6}=1 4 x + 6 y = 1 , i.e. 3 x + 2 y − 12 = 0 3x+2y-12=0 3 x + 2 y − 12 = 0 .