I recently talked about finding out the angle between two lines. A useful application of this formula is to determine whether two lines are parallel or perpendicular. Let’s see how.
Parallel Lines
Suppose two lines are parallel. Then, the angle between them must be 0. That is, θ = 0, which makes tanθ = 0.
Now, if the slopes of the lines are m1 and m2, then using the formula that we derived here, we’ll get:
tanθ = (m1 – m2)/(1 + m1m2)
Since tanθ = 0, the numerator on the RHS also must equal 0. That is,
m1 – m2 = 0 or m1 = m2
In other words, the slopes of the two parallel lines must be equal. This seems obvious, as two parallel lines must make the same angle with a transversal, i.e. the X-axis. Take a look.
Conversely, if the slopes of two lines are equal, then they must be parallel.
There’s one small result which you might want to remember.
Suppose the lines a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 are parallel. Then, equating the slopes of these lines, we’ll get:
-a1/b1 = -a2/b2 or a1/a2 = b1/b2
Let’s move to perpendicular lines now.
Perpendicular Lines
In this case, θ = 90°, or cotθ = 0. Using our formula we have,
cotθ = (1 + m1m2)/(m1 – m2)
Since cotθ = 0, the numerator above must equal 0. This means that:
1 + m1m2 = 0 or m1m2 = -1
That is, the product of the slopes of two perpendicular lines must be equal to -1. Conversely, if the product of the slopes of two lines equals -1, then the lines must be perpendicular.
Another small result which you should remember, similar to the previous case.
Suppose the lines a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 are perpendicular. Then, equating the product of the slopes of these lines to -1, we’ll get:
(-a1/b1) x (-a2/b2) = -1 or a1a2 + b1b2 = 0
That’s it for now. I’ll talk a bit more about equations of parallel and perpendicular lines while covering examples in the next lesson.
Lesson Summary
- Two lines, whose slopes are m1 and m2, are parallel if m1 = m2.
- Two lines, whose slopes are m1 and m2, are perpendicular if m1m2 = -1.
- The lines a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 are parallel if a1/a2 = b1/b2.
- The lines a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 are perpendicular if a1a2 + b1b2 = 0.