Academy
Formulas/maths/Straight Lines/Angle Between a Pair of Lines

Angle Between a Pair of Lines

Acute angle between the two lines represented by ax²+2hxy+by²=0.
Derivation

For the pair ax2+2hxy+by2=0ax^2+2hxy+by^2=0 with slopes m1,m2m_1, m_2, use the angle formula:

tanθ=m1m21+m1m2\tan\theta = \left|\frac{m_1-m_2}{1+m_1m_2}\right|

From Vieta's: m1+m2=2h/bm_1+m_2 = -2h/b and m1m2=a/bm_1m_2 = a/b.

Compute (m1m2)2(m_1-m_2)^2:

(m1m2)2=(m1+m2)24m1m2=4h2b24ab=4(h2ab)b2(m_1-m_2)^2 = (m_1+m_2)^2 - 4m_1m_2 = \frac{4h^2}{b^2} - \frac{4a}{b} = \frac{4(h^2-ab)}{b^2}

And:

1+m1m2=1+ab=a+bb1 + m_1m_2 = 1 + \frac{a}{b} = \frac{a+b}{b}

Substituting:

tanθ=2h2abba+bb=2h2aba+b\tan\theta = \frac{\frac{2\sqrt{h^2-ab}}{b}}{\frac{a+b}{b}} = \frac{2\sqrt{h^2-ab}}{a+b} tanθ=2h2aba+b\boxed{\tan\theta = \frac{2\sqrt{h^2-ab}}{a+b}}

The formula requires h2abh^2 \geq ab for real lines and a+b0a+b \neq 0 (otherwise the lines are perpendicular and tanθ\tan\theta is undefined).