Angle between pair of lines

by Abcd   Last Updated September 22, 2017 22:20 PM

The most general form of a quadratic is: $ax^2 + by^2 + 2gx + 2fy + c + 2hxy= 0 $ and that for a homogeneous second degree equation is : $ax^2 + by^2 + 2hxy=0$

I derived the formula $$\tan \theta = \left|\dfrac{2\sqrt{h^2 - ab}}{a+b}\right|$$

but later, author claimed that the same formula is applicable for the general form too.

But I (and he too) derived it for the homogeneous case only. How can he claim this then?

Answers 2

One can write $$0 = ax^2+by^2+2gx+2fy+c+2hxy = (a_1x+b_1y+c_1)(a_2x+b_2y+c_1)$$

So, the angle between two lines is $$\tan \theta = |\frac{\tan \alpha -\tan \beta}{1+\tan\alpha\tan\beta}| = |\frac{-\frac{a_1}{b_1}+\frac{a_2}{b_2}}{1+\frac{a_1a_2}{b_1b_2}}| = |\frac{-a_1b_2+b_1a_2}{a_1a_2+b_1b_2}|= |\frac{\sqrt{(a_1b_2+a_2b_1)^2-4a_1a_2b_1b_2}}{a+b}| = |\frac{\sqrt{4h^2-4ab}}{a+b}|.$$

September 22, 2017 16:42 PM

The slopes of the lines are unaffected by the linear and constant terms of the equation. To see this, find the intersection point of the lines and translate the origin to this point. Doing so will eliminate the linear terms of the equation. This intersection can be found in various ways†, such as setting the partial derivatives to zero, yielding $$x_0={bg-fh\over h^2-ab}, y_0={af-gh\over h^2-ab}.$$ Setting $x=x'+x_0$ and $y=y'+y_0$ in the general equation produces $$ax'^2+by'^2+2hx'y'+{abc-af^2-bg^2+2fgh-ch^2\over h^2-ab}=0.$$ The numerator of the constant term is equal to the determinant of $$\begin{bmatrix}a&h&g\\h&b&f\\g&f&c\end{bmatrix}$$ which vanishes since this is a degenerate conic, leaving $$ax'^2+by'^2+2hx'y'=0.$$

† Another way is to perform Gaussian elimination on the above coefficient matrix. This will both give you the center point and also show that the constant term in the transformed equation must vanish for this null space to be non-trivial.

September 22, 2017 21:41 PM

Related Questions

What If It's Zero?

Updated May 08, 2017 03:20 AM

Does a screen saver have to repeat its motion?

Updated June 01, 2019 06:20 AM