Acute angle θ between the two lines of ax² + 2hxy + by² = 0 (or the general pair). Uses the identity tan θ = (m₁−m₂)/(1+m₁m₂) with m₁−m₂ expressed via the discriminant.
The angle θ \theta θ between lines with slopes m 1 m_1 m 1 and m 2 m_2 m 2 :
tan θ = ∣ m 1 − m 2 1 + m 1 m 2 ∣ \tan\theta = \left|\frac{m_1-m_2}{1+m_1m_2}\right| tan θ = 1 + m 1 m 2 m 1 − m 2
Now:
( m 1 − m 2 ) 2 = ( m 1 + m 2 ) 2 − 4 m 1 m 2 = 4 h 2 b 2 − 4 a b = 4 ( h 2 − a b ) b 2 (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} ( m 1 − m 2 ) 2 = ( m 1 + m 2 ) 2 − 4 m 1 m 2 = b 2 4 h 2 − b 4 a = b 2 4 ( h 2 − ab )
m 1 − m 2 = 2 h 2 − a b b ( h 2 > a b ) m_1-m_2 = \frac{2\sqrt{h^2-ab}}{b} \quad (h^2 > ab) m 1 − m 2 = b 2 h 2 − ab ( h 2 > ab )
1 + m 1 m 2 = 1 + a b = a + b b 1+m_1m_2 = 1 + \frac{a}{b} = \frac{a+b}{b} 1 + m 1 m 2 = 1 + b a = b a + b
Therefore:
tan θ = ∣ 2 h 2 − a b / b ( a + b ) / b ∣ = 2 h 2 − a b ∣ a + b ∣ \tan\theta = \left|\frac{2\sqrt{h^2-ab}/b}{(a+b)/b}\right| = \frac{2\sqrt{h^2-ab}}{|a+b|} tan θ = ( a + b ) / b 2 h 2 − ab / b = ∣ a + b ∣ 2 h 2 − ab
tan θ = 2 h 2 − a b a + b \tan\theta = \frac{2\sqrt{h^2-ab}}{a+b} tan θ = a + b 2 h 2 − ab
(taking the acute angle, so ∣ a + b ∣ |a+b| ∣ a + b ∣ in the denominator — sign of a + b a+b a + b does not matter for tan θ > 0 \tan\theta > 0 tan θ > 0 ).
Special cases:
a + b = 0 a+b = 0 a + b = 0 : tan θ → ∞ ⇒ θ = 90 ° \tan\theta \to \infty \Rightarrow \theta = 90° tan θ → ∞ ⇒ θ = 90° — perpendicular lines
h 2 = a b h^2 = ab h 2 = ab : tan θ = 0 ⇒ θ = 0 ° \tan\theta = 0 \Rightarrow \theta = 0° tan θ = 0 ⇒ θ = 0° — coincident lines
This formula applies equally to the general pair a x 2 + 2 h x y + b y 2 + 2 g x + 2 f y + c = 0 ax^2+2hxy+by^2+2gx+2fy+c=0 a x 2 + 2 h x y + b y 2 + 2 g x + 2 f y + c = 0 — the angle between the lines depends only on a a a , h h h , b b b .