LEAVE A COMMENT FOR US

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 theta_1 and theta_2 respectively with x-axis in a positive direction i.e. m1tan theta_1 and  m2 = tan theta_2

We use the difference of angles formula for tangent to get the angle between the lines:

tan (x – y)  =  {~tanx~-~tany~}/{1~-~tanx~tany}

angle_between_two_lines

Let the angle between two lines l1 and l2 be theta. Using the property of exterior angle of a triangle, we get –

theta~=~theta_1~-~theta_2

Using tan(x – y) formula –

tan theta~=~tan(theta_1~-~theta_2)

=  {~tan theta_1~-~tan theta_2~}/{1~+~tan theta_1~tan theta_2} where

tan theta_1  =  m1  (gradient of line l1), and

tan theta_2  =  m2  (gradient of line l2).

Hence tan theta  =  {~m_1~-~m_2~}/{1~+~m_1m_2}

We get the acute angle between the two lines in the positive direction of x-axis as:

tan theta  =  delim{|}{{~m_1~-~m_2~}/{~1~+~m_1m_2~}}{|}

 

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  =  {-1/2}x~+~{5/2}

So the gradient of the first equation m1 = -1/2. Or

tan theta_1~=~-~1/2

Now rearranging the second equation x – 3y = -3, we get

y  =  {1/3}x~+~1

So the gradient of the second equation m2 = 1/3. Or

tan theta_2~=~1/3

If theta is the angle between two lines, then

tan theta  =  {~tan theta_1~-~tan theta_2~}/{1~+~tan theta_1~tan theta_2}

{~m_1~-~m_2~}/{1~+~m_1m_2}

{~-{1/2}~-~{1/3}~}/{1~+~(-1/2)(1/3)}

{~-{5/6}~}/{1~-~{1/6}}

{~-{5/6}~}/{5/6}

=  -1

For acute angle, tan theta  =  delim{|}{{~m_1~-~m_2~}/{~1~+~m_1m_2~}}{|}

=  delim{|}{-1}{|}

=  1

So tantheta  =  1

Hence theta  =  tan^-1(1)

=  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 =  1/2,  and

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

If theta is the angle between two lines, then

tan theta  =  {~tan theta_1~-~tan theta_2~}/{1~+~tan theta_1~tan theta_2}

{~m_1~-~m_2~}/{1~+~m_1m_2}

{~{1/2}~-~3~}/{1~+~(1/2)~*~3}

{~-{5/2}~}/{1~+~{3/2}}

{~-{5/2}~}/{5/2}

=  -1

tantheta  =  -1

Hence theta  =  tan^-1(-1)

=  135°

So the angle between two lines given is 135°