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.

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.

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

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.

Lines parallel to one another have the same slope.

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

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?

$\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*}$

$\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 = \frac{y_2 - y_1}{x_2 - x_1}$

Here $\hspace{0.2em} (x_1, y_1) \hspace{0.2em}$ and $\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

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

And the slope of PQ would be

$m_2 = \frac{2 - \frac{1}{2}}{1 - \left ( -\frac{3}{4}\right )}$

It looks a little hairy but simplifying it, we have

$m_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 –

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

Next, for PQ, we have

$\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.

$\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?

$\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 = {\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 $\hspace{0.2em} m_1 \hspace{0.2em}$ is the slope of the first line,

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

Similarly, for the second line

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

We can see that

$m_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.

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

And now for the second line.

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

This time, clearly,

$m_1 \neq m_2$

Also,

$m_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.

$y - x - 6 = 0$

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

$y = x + 6$

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

$m_1 = 1$

Similarly, for the second equation –

$\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.

$\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

$m_2 = 1$

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

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

Hence, the given lines are perpendicular to each other.

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.

Example

Find the equation of the line that passes through the point $\hspace{0.2em} (-1, -3) \hspace{0.2em}$ and is parallel to the line $\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 = {\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 –

$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

$\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.

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.

$\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' = \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.

$\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

$\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*}$

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.

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 $\hspace{0.2em} (-2, 5) \hspace{0.2em}$ and is perpendicular to the line $\hspace{0.2em} x = 7 \hspace{0.2em}$ .

Solution

Here, the line given to us is $\hspace{0.2em} x = 7 \hspace{0.2em}$. So, a vertical line – $\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 $\hspace{0.2em} y = a \hspace{0.2em}$.

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

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

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

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).

$\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.

$\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).

$\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.

We use cookies to provide and improve our services. By using the site you agree to our use of cookies. Learn more