Angle Between Two Lines
For a line given in standard form ax + by = c, the slope of the line is -a/b (∞ or undefined if b = 0). The angle that this line makes with the x-axis is
arctan(-a/b).
If the slope is undefined, i.e., vertical, then the angle is 90°.
Similarly, given a second line dx + ey = f, the angle made with the x-axis is
arctan(-d/e).
When two lines intersect, they form two angles that add up to 180°. The angle between two lines is the difference between the angles that they make with the x-axis:
|arctan(-a/b) - arctan(-d/e)|.
This expression gives one of the two angles of intersection. To find the supplementary angle, just subtract your answer from 180°. Notice that you don't need to find the intersection point in order to calculate the intersection angle.
Example 1:
Consider the two lines 5x + 3y = 71 and x - 10y = 4. The first line has a slope of -5/3 and the second line has a slope of 1/10. Using the formula above, we can calculate the angle of intersection as
|arctan(-5/3) - arctan(1/10)| = |120.96° - 5.71°| = 115.25°
The other angle is 64.75°.
Example 2:
Consider the two lines x = 7 and x - y = 40. The first line has a slope of ∞ since it is vertical. The second line has a slope of 1. The angle of intersection is
|arctan(∞) - arctan(1)| = |90° - 45°| = 45°
The other angle is 135°.
© Had2Know 2010