Angle Between Two Lines

In this lesson, you will learn

  • what the angle between two lines is
  • the formula that finds this angle from the slopes of the two lines
  • where the formula comes from
  • how to use it when the lines are given as equations

The Formula for the Angle Between Two Lines

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 m1 and m2, then you can use the following formula to find the angle between the two lines.

tan θ =m2 − m11 + m1m2
Two intersecting lines with inclinations θ1 and θ2 measured from the x-axis, and the angle θ between the lines
Remember

If m1m2 = −1, the bottom of the fraction is 0 and the formula can't be used. That happens when the lines are perpendicular, so the angle between them is 90°. The formula also needs both slopes, so neither line can be vertical.

What is the angle between y = 4x + 1 and y = −14x + 3?

Show answer

90°. 4 × (−14) = −1, so the lines are perpendicular.

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

Definition

The angle between two lines is the acute angle θ that they form where they intersect.

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 a line.

Second, we need to show that θ = θ2 − θ1

Triangle ABC formed by the two lines and the x-axis, with θ1 at A, x at C, θ at B, and θ2 outside the triangle next to x

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

θ + θ1 + x = 180  (equation 1)

Furthermore, x + θ2 = 180 (equation 2) since x and θ2 together form a straight angle.

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 θ =tan θ2 − tan θ11 + tan θ1 tan θ2

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

Thus, tan θ1 = m1 and tan θ2 = m2

After substituting m1 for tan θ1 and m2 for tan θ2 in the equation immediately above, we get:

tan θ =m2 − m11 + m1m2

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

A line has an inclination of 25° and a second line has an inclination of 70°. What is the angle between the two lines?

Show answer

45°. θ = θ2 − θ1 = 70° − 25° = 45°.

How to Find the Angle Between Two Lines Step by Step

  1. Write each equation in slope-intercept form, y = mx + b, and read the slopes m1 and m2.
  2. Put the slopes into the formula and take the absolute value to get tan θ.
  3. Use the inverse tangent, tan−1, on a calculator set to degrees to find θ.
Worked example: Find the angle between y = 2x + 1 and y = −3x + 4.
  1. The slopes are m1 = 2 and m2 = −3.
  2. tan θ = −3 − 21 + 2 × (−3) = −5−5 = 1
  3. θ = tan−1(1) = 45°

The angle between the two lines is 45°.

Common mistake

Forgetting the absolute value. Without it, tan θ can be negative, and tan−1 then gives a negative angle. The angle between two lines is always between 0° and 90°, so make tan θ positive first.

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 = 3x2 − 42

y = 32x − 2

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

x + 4y = 1

4y = −x + 1

y = −x4 + 14

y = −14x + 14

The slopes are 32 and −14 or 1.5 and −0.25. It does not matter which one is m1 or m2. You will get the same answer.

Let m1 = −0.25 and m2 = 1.5

tan θ = 1.5 − (−0.25)1 + 1.5 × (−0.25)

tan θ = 1.5 + 0.251 + (−0.375)

tan θ = 1.750.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 = x4 + 44

y = 14x + 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 = 3x4 − 84

y = 34x − 2

The slopes are 34 and 14 or 0.75 and 0.25. Again, it does not matter which one is m1 or m2. You will get the same answer.

Let m1 = 0.75 and m2 = 0.25

tan θ = 0.25 − 0.751 + 0.25 × 0.75

tan θ = −0.501 + 0.1875

tan θ = −0.501.1875 = −0.4211

tan θ = |−0.4211| = 0.4211

θ = tan−1(0.4211) = 22.84 degrees

Find the angle between y = x + 3 and the horizontal line y = 5.

Show answer

45°. The slopes are 1 and 0, so tan θ = 0 − 11 + 0 = 1, and tan−1(1) = 45°.

Summary

  • The angle between two lines is the acute angle θ they form where they intersect.
  • If the slopes are m1 and m2, then tan θ = m2 − m11 + m1m2.
  • The formula comes from θ = θ2 − θ1, the difference of the two inclinations, and tan θ1 = m1, tan θ2 = m2.
  • The absolute value makes tan θ positive, so θ is between 0° and 90°.
  • Equal slopes give 0° (parallel lines), and m1m2 = −1 gives 90° (perpendicular lines).

Test Yourself: Interactive 10-Question Quiz

Now check what you learned about the angle between two lines. Every answer is explained, and each time you play you get new numbers.

Question 1 of 10Score: 0