Parallel and Perpendicular Lines

In this tutorial, we’ll look at an important concept – parallel and perpendicular lines, in the context of analytic geometry (or coordinate geometry).

So let’s get started.

Two lines are said to be parallel if they are in the same plane and never intersect. They always remain at the same distance from one another.

Parallel and Perpendicular Lines

Parallel lines
Parallel lines
Perpendicular lines
Perpendicular lines

Two lines are said to be perpendicular if they intersect at right angles (90o).

Slopes of Parallel and Perpendicular Lines

In analytic geometry, we often track the angles using the slopes of the involved lines. So it’s only natural that we use slopes (generally denoted by the letter m) when working with parallel and perpendicular lines too.

While it’s better if you know how to find the slope of a line, it’s okay if you don’t. I’ll try to include the steps when we get to the examples.

Slopes of Parallel Lines

Lines parallel to one another have the same slope.

Slopes of Perpendicular Lines

If two lines are perpendicular to one another, the product of their slopes equals -1.

Parallel and Perpendicular Lines – Examples

Alright, let’s use what we have learned so far to solve some example problems involving parallel and perpendicular lines.

Example

Are the lines AB and PQ parallel or perpendicular to each other?

(i)A=(0,0)B=(7,6)P=(12,34)Q=(2,1)\begin{align*} (\text{i}) \hspace{0.75em} &\text{A} = (0,0) \, \hspace{0.75em} \text{B} = (7, 6) \\[1.3em] &\text{P} = \left (\frac{1}{2},-\frac{3}{4}\right ) \, \hspace{0.75em} \text{Q} = (2, 1) \end{align*}
(ii)A=(1,4)B=(5,2)P=(3,3)Q=(7,11)\begin{align*} (\text{ii}) \hspace{0.75em} &\text{A} = (1,4) \, \hspace{0.75em} \text{B} = (5, 2) \\[1.3em] &\text{P} = (3,3) \, \hspace{0.75em} \text{Q} = (7, 11) \end{align*}

Solution (i)

The question gives us two points on each line. So we will need to use the following formula for slope.

m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}

Here (x1,y1)\hspace{0.2em} (x_1, y_1) \hspace{0.2em} and (x2,y2)\hspace{0.2em} (x_2, y_2) \hspace{0.2em} are two points on a line.

So the slope of the line AB would be

m1=6070=67\begin{align*} m_1 &= \frac{6 - 0}{7 - 0} \\[1.3em] &= \frac{6}{7} \end{align*}

And the slope of PQ would be

m2=2121(34)m_2 = \frac{2 - \frac{1}{2}}{1 - \left ( -\frac{3}{4}\right )}

It looks a little hairy but simplifying it, we have

m2=67m_2 = \frac{6}{7}

Clearly, the two slopes are equal. So the lines must be parallel.


Solution (ii)

Again, using the same formula to find the slope of AB –

m1=2451=24=12\begin{align*} m_1 &= \frac{2 - 4}{5 - 1} \\[1.3em] &= \frac{-2}{4} \, = \, -\frac{1}{2} \end{align*}

Next, for PQ, we have

m2=11373=84=2\begin{align*} m_2 &= \frac{11 - 3}{7 - 3} \\[1.3em] &= \frac{8}{4} \, = \, 2 \end{align*}

In this case, the two slopes are not equal. So let’s multiply them and see what we get.

m1m2=122=1\begin{align*} m_1 \cdot m_2 &= - \frac{1}{2} \cdot 2 \\[1.3em] &= -1 \end{align*}

The product of the slopes is -1. So the lines AB and PQ are perpendicular to each other.

Example

Are the following pairs of lines parallel or perpendicular?

(i)y=4x13,y=4x+5(ii)y=9x+2,y=7x+3(iii)yx6=0,3x+3y=4\begin{align*} (\text{i}) \hspace{0.75em} &y = 4x - \frac{1}{3}, \hspace{0.75em} y = 4x + 5 \\[1em] (\text{ii}) \hspace{0.75em} &y = 9x + 2, \hspace{0.75em} y = 7x + 3 \\[1em] (\text{iii}) \hspace{0.75em} &y - x - 6 = 0, \hspace{0.75em} 3x + 3y = 4 \end{align*}

Are the following pairs of lines parallel or perpendicular?

Solution (i)

Again, first, we need to find the slopes of the two lines. But this time, the question gives us the lines’ equations instead of points on them.

So we need a different approach. We need to make sure it’s in the slope-intercept form (shown below) and take the x-coefficient.

y=mx+by = {\color{Red} m} x + b

Slope-intercept form

In this example, both the equations are already in the slope-intercept form. So, we don’t need to do anything to transform them.

Okay, so if m1\hspace{0.2em} m_1 \hspace{0.2em} is the slope of the first line,

y=4x13m1=4\begin{align*} y &= {\color{Red} 4} x - \frac{1}{3} \\[1.3em] m_1 &= {\color{Red} 4} \end{align*}

Similarly, for the second line

y=4x+5m2=4\begin{align*} y &= {\color{Red} 4} x + 5 \\[1.3em] m_2 &= {\color{Red} 4} \end{align*}

We can see that

m1=m2m_1 = m_2

And so the two lines are parallel.


Solution (ii)

Again, we follow the same steps. Here’s the slope for the first line.

y=9x+2m1=9\begin{align*} y &= {\color{Red} 9} x + 2 \\[1.3em] m_1 &= {\color{Red} 9} \end{align*}

And now for the second line.

y=7x+3m1=7\begin{align*} y &= {\color{Red} 7} x + 3 \\[1.3em] m_1 &= {\color{Red} 7} \end{align*}

This time, clearly,

m1m2m_1 \neq m_2

Also,

m1m21m_1 \cdot m_2 \neq -1

So, the lines are neither parallel nor perpendicular.


Solution (iii)

Unlike the previous examples, for this one, the equations given to us are not in their slope-intercept forms. So first, we need to do some rearranging so we have them in the required form.

Here’s the first equation.

yx6=0y - x - 6 = 0

Let’s add x+6\hspace{0.2em} x + 6 \hspace{0.2em} to both sides, so we have y\hspace{0.2em} y \hspace{0.2em} alone on the left side.

y=x+6y = x + 6

And now we have the equation in the slope-intercept form. The coefficient of x is 1. So,

m1=1m_1 = 1

Similarly, for the second equation –

3x+3y=43y=3x+4\begin{align*} 3x + 3y &= 4 \\[1em] 3y &= -3x + 4 \end{align*}

Okay, we have isolated y on the left side but it’s coefficient isn’t 1. So let’s divide the whole equation by 3.

3y3=3x3+43y=x+43\begin{align*} \frac{3y}{3} &= \frac{-3x}{3} + \frac{4}{3} \\[1.3em] y &= -x + \frac{4}{3} \end{align*}

Here, the coefficient of x is -1. So

m2=1m_2 = 1

We can see that the product of the two slopes is -1.

m1m2=11=1\begin{align*} m_1 \cdot m_2 &= 1 \cdot -1 \\[1em] &= -1 \end{align*}

Hence, the given lines are perpendicular to each other.

Writing Equations of Parallel and Perpendicular Lines

Sometimes, instead of checking whether two lines are parallel or perpendicular, we need to find a line that is parallel/perpendicular to a certain line (in addition to satisfying some other condition).

Let’s do a couple of examples involving such cases.

Writing Equations of Parallel and Perpendicular Lines

Example

Find the equation of the line that passes through the point (1,3)\hspace{0.2em} (-1, -3) \hspace{0.2em} and is parallel to the line y=3x2\hspace{0.2em} y = 3x - 2 \hspace{0.2em}.

Solution

We know that if the two lines are to be parallel, their slopes must be equal.

But what is the slope of the given line? Well, the given equation is in the slope-intercept form. So the x-coefficient gives us the slope.

y=3x2y = {\color{Red} 3} x - 2

That means the slope of the required line must also be 3.

Next, the question tells us that the line passes through the point (-3, -1). Now, the equation of a line with slope m and passing through the point (x1, y1) is –

yy1=m(xx1)y - {\color{Teal} y_1} = {\color{Red} m} (x - {\color{Teal} x_1} )

Substituting the values for the required line in the above equation, we have

y(1)=3(x(3))y+1=3(x+3)y+1=3x+9y=3x+8\begin{align*} y - {\color{Teal} (-1)} &= {\color{Red} 3} (x - {\color{Teal} (-3)} ) \\[1em] y + 1 &= 3(x + 3) \\[1em] y + 1 &= 3x + 9 \\[1em] y &= 3x + 8 \end{align*}

And that’s the answer.

Equation of a Line Perpendicular to a Given Line

Example

Find the equation of the line that is perpendicular to the line 2x – 5y = 7, and passes through the origin.

Solution

Here again, the first step is the find the slope of the given line (let’s call it m’). And for that, we will start by transforming the given equation into the slope-intercept form.

2x5y=75y=2x7y=25x75\begin{align*} 2x - 5y &= 7 \\[1.3em] 5y &= 2x - 7 \\[1.3em] y &= \frac{2}{5} x - \frac{7}{5} \end{align*}

So, the slope would be

m=25m' = \frac{2}{5}

Now we are in a position to find the slope of the required line. Let’s call it m. And remember because the two lines (given and required) are perpendicular, the product of their slopes must be -1.

mm=1m25=1m=52\begin{align*} m \cdot m' &= -1 \\[1.3em] m \cdot \frac{2}{5} &= -1 \\[1.3em] m &= -\frac{5}{2} \end{align*}

Great! Now we know the slope of our line. And we know it passes through the origin, meaning (0,0).

So, again, using the equation of a line in point-slope form, we have

yy1=m(xx1)y0=52(x0)y=52x\begin{align*} y - y_1 &= m(x - x_1) \\[1em] y - 0 &= - \frac{5}{2} (x - 0) \\[1em] y &= -\frac{5}{2}x \end{align*}

Horizontal and Vertical Lines

Things get a little tricky when we are dealing with horizontal or vertical lines.

The slope of a horizontal line is 0 and so you can’t divide by it. And the slope of a vertical line is undefined, and hence has its own issues.

So here are a few ideas that can help. But before anything else, the basics.

Horizontal Lines

The equation of a horizontal line – a line parallel to the x-axis\hspace{0.2em} x\text{-axis} \hspace{0.2em} – is always of the form y=a\hspace{0.2em} y = a \hspace{0.2em}, where a\hspace{0.2em} a \hspace{0.2em} is some constant (it’s the distance of the line from the x-axis\hspace{0.2em} x\text{-axis} \hspace{0.2em}).

Vertical Lines

The equation of a vertical line – a line parallel to the y-axis\hspace{0.2em} y\text{-axis} \hspace{0.2em} – is always of the form x=a\hspace{0.2em} x = a \hspace{0.2em}, where a\hspace{0.2em} a \hspace{0.2em} is some constant (it’s the distance of the line from the y-axis\hspace{0.2em} y\text{-axis} \hspace{0.2em}).

Now, a few points to keep in mind.

  • Only horizontal lines are parallel to other horizontal lines.
  • Only vertical lines are parallel to other vertical lines.
  • In a plane (2-D geometry), only vertical lines are perpendicular to horizontal lines and vice-versa.
Example

Find the equation of the line that passes through the point (2,5)\hspace{0.2em} (-2, 5) \hspace{0.2em} and is perpendicular to the line x=7\hspace{0.2em} x = 7 \hspace{0.2em} .

Solution

Here, the line given to us is x=7\hspace{0.2em} x = 7 \hspace{0.2em}. So, a vertical line – x\hspace{0.2em} x \hspace{0.2em} is constant.

Now, since the required line is to be perpendicular to the given line, it must be a horizontal line. So, our line will be of the form y=a\hspace{0.2em} y = a \hspace{0.2em}.

All we need to do now is figure out what “a\hspace{0.2em} a \hspace{0.2em} ” is. It’s the y\hspace{0.2em} y \hspace{0.2em}-coordinate of every point of our new line. So if we can get the y\hspace{0.2em} y \hspace{0.2em}-coordinate of one point on the line, we would know what “a\hspace{0.2em} a \hspace{0.2em} ” is. Following so far?

Now, the question tells us that the line passes through the point (2,5)\hspace{0.2em} (-2, 5) \hspace{0.2em}. So we know the y-coordinate of one point on the line, 5\hspace{0.2em} 5 \hspace{0.2em}. That means a=5\hspace{0.2em} a = 5 \hspace{0.2em}.

Hence, the required line is y=5\hspace{0.2em} {\color{Red} y = 5} \hspace{0.2em}.

Parallel Lines or the Same Line

Having the same slope does not necessarily mean there are two different and parallel lines. It could also be that those are equations of the same line, even though they look different.

For example, look at these two equations (standard form equations of a line).

6x+2y=1012x+4y=20\begin{align*} 6x + 2y = 10 \\[1em] 12x + 4y = 20 \end{align*}

They look different and each of them gives the same slope. So you might conclude that they are equations of parallel lines.

However, in reality, they represent the same line (or coincident lines) and not two parallel lines.

So how can we tell if two lines are coincident?

If corresponding coefficients (x-coefficients, y-coefficients, and the constants) in the two equations are in proportion, the lines are coincident. Otherwise, they aren’t.

If we test the two equations in our example above. First, let me rewrite the equations with corresponding coefficients in the same color.

6x+2y=1012x+4y=20\begin{align*} {\color{Red} 6} x + {\color{Teal} 2} y = {\color{Orchid} 10} \\[1em] {\color{Red} 12} x + {\color{Teal} 4} y = {\color{Orchid} 20} \end{align*}

Next, we can divide the coefficients in one equation by the coefficients in the other to see if the ratios are equal (and hence the coefficients are in proportion).

612=?24=?102012=12=12\begin{align*} {\color{Red} \frac{6}{12}} &\stackrel{?}{=} {\color{Teal} \frac{2}{4}} &\stackrel{?}{=} {\color{Orchid} \frac{10}{20}} \\[1.3em] {\color{Red} \frac{1}{2}} &= {\color{Teal} \frac{1}{2}} &= {\color{Orchid} \frac{1}{2}} \end{align*}

Clearly, they are in proportion. That means the equations represent coincident lines.

And with that, we come to the end of this tutorial on parallel and perpendicular lines. Until next time.