## Angle between two lines

This lesson will be focused on deriving the expression for the angle between two given lines.

Suppose we have two lines whose slopes are known, say m_{1} and m_{2}. Then we are to find the angle between these lines, in terms of m_{1} and m_{2}. (Note that we do not require the equation of the lines for finding out this angle. We only need the slopes.)

The idea is to express the angle in terms of the angles made by the lines with the X-axis. (and then the slopes). This is pretty simple. Look the figure below.

Suppose the lines make angles θ_{1} and θ_{2} with the X-axis, and let θ be the angle between them. Using some basic geometry, one can tell that the angle between the lines (θ) will be θ_{1} – θ_{2}.

Then tanθ = tan(θ_{1} – θ_{2}), which leads to tanθ = \(\frac{tanθ_1 – tanθ_2}{1+tanθ_1tanθ_2}\).

Now, replacing tanθ_{1} and tanθ_{2} by m_{1} and m_{2} respectively, we get tanθ = \(\frac{m_1 – m_2}{1+m_1m_2}\).

This expression will change its sign depending upon whether we take m_{1} as the slope of the first line or the second.

But the change of sign won’t matter, because the positive / negative values will give supplementary angles (as tan(π-θ)=-tanθ). For example, values 1 and -1 will mean an angle of 45° and 135°, both of which correspond to the same situation geometrically. Here’s what I mean..

To get rid of this sign issue, we use a modulus sign on the previous expression, which will always give a positive value (or an acute angle). The final formula looks something like this: **\(tanθ = |\frac{m_1 – m_2}{1+m_1m_2}|\)**

## Lesson Summary

- The angle θ
_{1}and m_{2}is given by \(tanθ = |\frac{m_1 – m_2}{1+m_1m_2}|\).

Now this expression will lead us to the condition for two lines to be parallel or perpendicular. I’ll cover this in the next lesson.

Pingback: Equations of a Circle