# Angle Between Two Lines

The acute angle $\theta$ between two straight lines is given by:

$\tan { \theta } =\left| \cfrac { { m }_{ 1 }-{ m }_{ 2 } }{ 1+{ m }_{ 1 }{ m }_{ 2 } } \right|$

where ${ m }_{ 1 }$ and ${ m }_{ 2 }$ are the gradients of the lines.

### Examples

1. Find the acute angle between the lines $3x-2y+1=0$ and $x-3y=0$.

$\tan { \theta } =\left| \cfrac { { m }_{ 1 }-{ m }_{ 2 } }{ 1+{ m }_{ 1 }{ m }_{ 2 } } \right| \\ \\ \tan { \theta } =\left| \cfrac { \cfrac { 3 }{ 2 } -\cfrac { 1 }{ 3 } }{ 1+\cfrac { 3 }{ 2 } \times \cfrac { 1 }{ 3 } } \right| \\ \\ \tan { \theta } =\cfrac { 7 }{ 9 } \\ \\ \theta =\tan ^{ -1 }{ \left( \cfrac { 7 }{ 9 } \right) } \\ \\ \theta =37^{ \circ }52'$

2. If the angle between the lines $2x-y-7=0$ and $y=mx+3$ is $25^\circ$, find two possile values of m, correct to 1 decimal place.

$2x-y-7=0\\ y=2x-7\\ \therefore \quad { m }_{ 1 }=2\\ \\ y=mx+3\\ \therefore \quad { m }_{ 2 }=m\\ \\ \tan { \theta } =\left| \cfrac { { m }_{ 1 }-{ m }_{ 2 } }{ 1+{ m }_{ 1 }{ m }_{ 2 } } \right| \\ \\ \tan { 25^{ \circ } } =\left| \cfrac { 2-{ m } }{ 1+2{ m } } \right|$

There are two possibilities:

$\tan { 25^{ \circ } } =\cfrac { 2-{ m } }{ 1+2{ m } } \\ \\ \tan { 25^{ \circ } } \left( 1+2{ m } \right) =2-m\\ \tan { 25^{ \circ } } +2{ m }\tan { 25^{ \circ } } =2-m\\ 2{ m }\tan { 25^{ \circ } } +m=2-\tan { 25^{ \circ } } \\ m\left( 2\tan { 25^{ \circ } } +1 \right) =2-\tan { 25^{ \circ } } \\ \\ m=\cfrac { 2-\tan { 25^{ \circ } } }{ 2\tan { 25^{ \circ } } +1 } \\ \\ m\approx 0.8$

...OR...

$2x-y-7=0\\ y=2x-7\\ \therefore \quad { m }_{ 1 }=2\\ \\ y=mx+3\\ \therefore \quad { m }_{ 2 }=m\\ \\ \tan { \theta } =\left| \cfrac { { m }_{ 1 }-{ m }_{ 2 } }{ 1+{ m }_{ 1 }{ m }_{ 2 } } \right| \\ \\ \tan { 25^{ \circ } } =\left| \cfrac { 2-{ m } }{ 1+2{ m } } \right| \\ \\ \\ -\tan { 25^{ \circ } } =\cfrac { 2-{ m } }{ 1+2{ m } } \\ \\ -\tan { 25^{ \circ } } \left( 1+2{ m } \right) =2-m\\ -\tan { 25^{ \circ } } -2{ m }\tan { 25^{ \circ } } =2-m\\ -2{ m }\tan { 25^{ \circ } } +m=2+\tan { 25^{ \circ } } \\ m\left( -2\tan { 25^{ \circ } } +1 \right) =2+\tan { 25^{ \circ } } \\ \\ m=\cfrac { 2+\tan { 25^{ \circ } } }{ -2\tan { 25^{ \circ } } +1 } \\ \\ m\approx 36.6$

## A Point Between an Interval

The coordinates of a point P that divides the interval between points $({x}_{1}, {y}_{1})$ and $({x}_{2}, {y}_{2})$ in the ratio m:n respectively are given by:

$x=\cfrac { m{ x }_{ 2 }+n{ x }_{ 1 } }{ m+n } and y=\cfrac { m{ y }_{ 2 }+n{ y }_{ 1 } }{ m+n }$

If the point P divides the interval externally in the ratio m:n, then the ratio is negative and P lies outside AB.

### Examples

1. Divide AB into the ratio 3:4 where A is (6 -2) and B is (-7, 5).

$x=\cfrac { 3(-7)+4(6) }{ 3+4 } \\ \\ x=\cfrac { 3 }{ 7 } \\ \\ y=\cfrac { 3(5)+4(-2) }{ 3+4 } \\ \\ y=\cfrac { 7 }{ 7 } =1\\ \\ \therefore \quad P=\left( \cfrac { 3 }{ 7 } ,1 \right)$

2. If A is (-2, -1) and B is (1, 5), find the coordinates of the point P that divides AB externally in the ratio 2:5.

Let the ratio be 2:-5 (you can also use -2:5, with the same result).

$x=\cfrac { 2(1)+-5(-2) }{ 2+(-5) } \\ \\ x=\cfrac { 12 }{ -3 } =-4\\ \\ y=\cfrac { 2(5)+-5(--1) }{ 2+(-5) } \\ \\ y=\cfrac { 15 }{ -3 } =-5\\ \\ \therefore \quad P=\left( -4,-5 \right)$

### Extension: Angle Between 2 Curves

To measure the angle between two curves, measure the angle between the tangents to the curves at that point.

$\tan { \theta } =\left| \cfrac { { m }_{ 1 }-{ m }_{ 2 } }{ 1+{ m }_{ 1 }{ m }_{ 2 } } \right|$ where ${m}_{1}$ and ${m}_{2}$ are the gradients of the tangents to the curves at the point of intersection.

For example...

Find the acute angle formed at the intersection of the curves $y={x}^{2}$ and $y={(x-2)}^{2}$.