Lines in the Plane

Read this section and work through practice problems 1-9.

Equations of Lines

Every line has the property that the slope of the segment between any two points on the line is the same, and this constant slope property of straight lines leads to ways of finding equations to represent nonvertical lines.

Point–Slope Equation

In calculus, we will usually know a point on the line and the slope of the line so the point–slope form will be the easiest to apply, and the other forms of equations for straight lines can be derived from the point–slope form.

If L is a nonvertical line through a known point P = (x_1,y_1) with a known slope m (Fig. 10), then the equation of the line L is


Point-Slope: y – y_1 = m(x – x_1)

Example 7: Find the equation of the line through (2,–3) with slope 5.
Solution: The solution is simply a matter of knowing and using the point–slope formula. m = 5,  y_1 = –3 and x_1 = 2 so y – (–3) = 5(x – 2). This equation simplifies to y = 5x –13 (Fig. 11).



The equation of a vertical line through a point P = (a,b) is x = a. The only points Q = (x,y) on the vertical line through the point P have the same x–coordinate as P.

Two–Point and Slope–Intercept Equations

If two points P = (x_1,y_1) and Q = (x_2,y_2) are on the line L, then we can calculate the slope between them and use the first point and the point–slope equation to get the equation of L:

Two Points: y – y_1 = m(x – x_1) where m =\dfrac{y_2 – y_1}{x_2 – x_1}

Once we have the slope m, it does not matter whether we use P or Q as the point. Either choice will give the same simplified equation for the line.

It is common practice to rewrite the equation of the line in the form y = mx + b, the slope-intercept form of the line. The line y = mx + b has slope m and crosses the y-axis at the point ( 0, b ).

Practice 7: Use the ∆y/∆x definition of slope to calculate the slope of the line y = mx + b.

The point-slope and the two-point formulas are usually more useful for finding the equation of a line, but the slope-intercept form is usually the most useful form for an answer because it allows us to easily picture the graph of the line and to quickly calculate y-values.


Angles Between Lines

The angle of inclination of a line with the x-axis is the smallest angle θ which the line makes with the positive x-axis as measured from the x-axis counterclockwise to the line (Fig. 12). Since the slope m = ∆y/∆x and since tan(θ) = opposite/adjacent, we have that m = tan(θ).
The slope of the line is the tangent of the angle of inclination of the line.



Parallel and Perpendicular Lines

Two parallel lines L_1 and L_2 make equal angles with the x-axis so their angles of inclination will be equal (Fig. 13) and so will their slopes. Similarly, if their slopes m_1 and m_2 are equal, then the equations of the lines will always differ by a constant:


y_1 – y_2  = {m_1x+b_1} – {m_2x+b_2}

  = (m_1–m_2)x + (b_1–b_2)

  = b_1 – b_2

which is a constant so the lines will be parallel. These two ideas can be combined into a single statement:

Two nonvertical lines L_1 and L_2 with slopes m_1 and m_2 are parallel if and only if m_1 = m_2.

Practice 8: Find the equation of the line in Fig. 14 which contains the point (–2,3) and is parallel to the line 3x + 5y = 17.


If two lines are perpendicular and neither line is vertical, the situation is a bit more complicated (Fig. 15).


Assume L_1 and L_2 are two nonvertical lines that intersect at the origin (for simplicity) and that P = (x_1,y_1) and Q = (x_2,y_2) are points away from the origin on L_1 and L_2 , respectively. Then the slopes of L_1 and L_2 will be m_1 = y_1/x_1 and m_2 =  y_2/x_2 . The line connecting P and Q forms the third side of the triangle OPQ , and this will be a right triangle if and only if L_1 and L_2 are perpendicular. In particular, L_1 and L_2 are perpendicular if and only if the triangle OPQ satisfies the Pythagorean theorem:

{dist(O,P) }^2 + {dist(O,Q) }^2 = {dist(P,Q) }^2 or

( x_1–0)^2 + (y_1–0)^2 + ( x_2–0)^2 + (y_2–0)^2

= ( x_1 – x_2)^2 + (y_1 – y_2)^2.

By squaring and simplifying, this last equation reduces to

0 = –2x_1x_2 – 2y_1y_2 so y_2/x_2 = – x_1/y_1 and

m_2 =  y_2/x_2 =  –  x_1/y_1 = –\dfrac{1}{(y_1/x_1)}   = –\dfrac{1}{m_1}.

We have just proved the following result:

Two nonvertical lines L_1 and L_2 with slopes m_1 and m_2 are perpendicular if and only if their slopes are negative reciprocals of each other: m_2 = –\dfrac{1}{m_1}

Practice 9: Find the line which goes through the point (2,–5) and is perpendicular to the line 3y – 7x = 2.

Example 8: Find the distance (the shortest distance) from the point (1,8) to the line L: 3y – x = 3.

Solution: This is a sophisticated problem which requires several steps to solve.

First we need a picture of the problem (Fig. 16). We will find the line L* through the point (1,8) and perpendicular to L. Then we will find the point P where L and L* intersect, and, finally, we will find the distance from P to (1,8).


(i) L has slope 1/3 so L* has slope m =  –\dfrac{1}{1/3}   =  –3 , and L* has the equation y – 8 = –3(x – 1) which simplifies to y = –3x + 11.

(ii) We can find the point of intersection of L and L* by replacing the y in the equation for L with the y from L* so 3(–3x + 11) – x = 3. Then x = 3 so y = –3x + 11 = –3(3) + 11 = 2 , so L and L* intersect at P = (3,2).

(iii) Finally, the distance from L to (1,8) is just the distance from the point (1,8) to the point P = (3,2) which is \sqrt{(1 – 3)^2 + (8 – 2)^2}    = \sqrt{ 40}    ≈ 6.325.

Angle Formed by Intersecting Lines

If two lines which are not perpendicular intersect at a point and neither line is vertical, then we can use some geometry and trigonometry to determine the angles formed by the intersection of the lines (Fig. 17). Since θ2 is an exterior angle of the triangle ABC, θ2 is equal to the sum of the two opposite interior angles so θ_2 = θ_1 + θ and θ = θ_2 – θ_1. Then, from trigonometry,


tan(θ) =  tan(θ_2 – θ_1) =  \dfrac{tan (θ_2) – tan (θ_1)}{1 + tan (θ_2)tan (θ_1)}    =  \dfrac{m_2 – m_1}{1 + m_2m_1}

The inverse tangent of an angle is between –π/2 and π/2 ( –90o and 90o) so θ =  arctan(\dfrac{m_2 – m_1}{1 + m_2m_1}) always gives the smaller of the angles.

The larger angle is π – θ or 180o – θo.

The smaller angle θ formed by two nonperpendicular lines with slopes m_1 and m_2 is

θ  = arctan(\dfrac{m_2 – m_1}{1 + m_2m_1}).


Example 9: Find the point of intersection and the angle between y = x + 3 and y = 2x + 1. (Fig. 18)


Solution: Solving the first equation for y and then substituting into the second equation, (x + 3) = 2x + 1 so x = 2. Putting this back into either equation, we get y = 5. Each of the lines is in the slope–intercept form so it is easy to see that m_1 = 1 and m_2 = 2 . Then

tan(θ) =  \dfrac{m_2 – m_1}{1 + m_2m_1}   = \dfrac{2 – 1}{1 + (2)(1)}  = 1/3 and

θ = arctan(1/3) = .322 \; radians  ≈  18.435^o