Finding the angle between two lines using a formula is the goal of this lesson. When two lines intersect in a plane, their intersection forms two pairs of opposite angles called vertical angles.

If the two lines are not perpendicular and have slopes m_{1} and m_{2}, then you can use the following formula to find the angle between the two lines.

$$ tan \ θ = \left\lvert \frac{m_2 - m_1}{1 + m_1m_2} \right\rvert $$

How to derive the formula to find the measure of the angle between two lines

First, notice that when two lines intersect, one of the two pairs is acute and the other pair is obtuse. The angle between two lines is defined as the smallest of these angles or the acute angle denoted by θ.

We are going to use the inclinations of the two lines to find the angle between the two lines. You may need to review the lesson about inclination of line.

Second, we need to show that θ = θ_{2} - θ_{1}

Using triangle ABC, we know that the sum of the angles in that tiangle is equal to 180 degrees.

θ + θ_{1} + x = 180 (equation 1)

Furthermore, x + θ_{2} = 180 (equation 2) since x and θ_{2} form a straight line.

Replace 180 with x + θ_{2} in equation 1.

We get θ + θ_{1} + x = x + θ_{2}

Subtract x from both sides

θ + θ_{1} + x - x = x - x + θ_{2}

θ + θ_{1} = θ_{2}

Subtract θ_{1} from both sides

θ + θ_{1} - θ_{1} = θ_{2 }- θ_{1}

θ = θ_{2 }- θ_{1}

Now, you can use the formula for the tangent of the difference of two angles.

tan θ = tan ( θ_{2 }- θ_{1})

$$ tan \ θ = \frac{tan \ θ_2 - tan \ θ_1}{1 + tan \ θ_1 \ tan \ θ_2 } $$

Third, in the lesson about inclination of a line, we learned that tan θ = m

Thus, tan θ_{1} = m_{1} and tan θ_{2} = m_{2}

After substituting m_{1} for tan θ_{1} and m_{2} for tan θ_{2} in the equation immediately above, we get:

$$ tan \ θ = \left\lvert \frac{m_2 - m_1}{1 + m_1m_2} \right\rvert $$

Notice the use of the absolute value to ensure that tan θ is equal to a positive number.

Exercises about finding the angle between two lines

**1)** Find the angle between the following two lines.

Line 1: 3x -2y = 4

Line 2: x + 4y = 1

Solution

Put 3x - 2y = 4 into slope-intercept form so you can clearly identify the slope.

3x - 2y = 4

2y = 3x - 4

y = 3x / 2 - 4/2

y = (3/2)x - 2

Put x + 4y = 1 into slope-intercept form so you can clearly identify the slope.

x + 4y = 1

4y = -x + 1

y = -x/4 + 1/4

y = (-1/4)x + 1/4

The slopes are 3/2 and -1/4 or 1.5 and -0.25. It does not matter which one is m_{1} or m_{2}. You will get the same answer.

Let m_{1} = 1.5 and m_{2} = -0.25

$$ tan \ θ = \frac{1.5 - -0.25}{1 + 1.5 \times -0.25} $$

$$ tan \ θ = \frac{1.5 + 0.25}{1 + -0.375} $$

$$ tan \ θ = \frac{1.75}{0.625} = 2.8 $$

θ = tan^{-1}(2.8) = 70.35 degrees

**2)** Find the angle between the following two lines.

Line 1: x - 4y + 4 = 0

Line 2: 3x - 4y - 8 = 0

Solution

Put x - 4y + 4 = 0 into slope-intercept form so you can clearly identify the slope.

x - 4y + 4 = 0

4y = x + 4

y = x / 4 + 4/4

y = (1/4)x + 1

Put 3x - 4y - 8 = 0 into slope-intercept form so you can clearly identify the slope.

3x - 4y - 8 = 0

4y = 3x - 8

y = 3x/4 - 8/4

y = (3/4)x - 2

The slopes are 3/4 and 1/4 or 0.75 and 0.25. Again, it does not matter which one is m_{1} or m_{2}. You will get the same answer.

Let m_{1} = 0.75 and m_{2} = 0.25

$$ tan \ θ = \frac{0.25 - 0.75}{1 + 0.25 \times 0.75} $$

$$ tan \ θ = \frac{- 0.50}{1 + 0.1875} $$

$$ tan \ θ = \frac{- 0.50}{1.1875} = -0.4211 $$

tan θ = |-0.4211| = 0.4211

θ = tan^{-1}(0.4211) = 22.84 degrees