# Home > Algebra > Coordinate Geometry > Angle between two lines

# Angle between two lines

Given two lines

l1 : a1x + b1y + c1  =  0,  and  l2 : a2x + b2y + c2  =  0,  we can arrange the equation of the lines in the form:

l1 : y  =  m1x + c1,  and

l2 : y  =  m2x + c2  =  0

where m1 and m2 are gradients of the two given lines, making an angle of and respectively with x-axis in a positive direction i.e. m1 and  m2 = We use the difference of angles formula for tangent to get the angle between the lines:

tan (x – y)  =  Let the angle between two lines l1 and l2 be . Using the property of exterior angle of a triangle, we get – Using tan(x – y) formula – = where =  m1  (gradient of line l1), and =  m2  (gradient of line l2).

Hence = We get the acute angle between the two lines in the positive direction of x-axis as: = Example 1: Find the acute angle between the two lines x + 2y = 5 and x – 3y = 5.

We first need to find the gradients of the two lines.

Rearranging the first equation x + 2y = 5, we get

y  = So the gradient of the first equation m1 = . Or Now rearranging the second equation x – 3y = -3, we get

y  = So the gradient of the second equation m2 = . Or If is the angle between two lines, then =     =  -1

For acute angle, = = =  1

So tan =  1

Hence = =  45°

So the acute angle between two lines given is 45°

Example 2: Find the angle between two lines x – 2y = 6 and y = 3x – 1

Here line x – 2y = 6  has a gradient m1 = ,  and

line y = 3x – 1  has a gradient m2 =  3

If is the angle between two lines, then =     =  -1

tan =  -1

Hence = =  135°

So the angle between two lines given is 135°