If $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$ , why $cot(2\theta) =\dfrac{{A}-{B}}{C}$ in conic sections? I  would like to know why 
$$
cot(2\theta) =\dfrac{{A}-{B}}{C}
$$
given $$ 
Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 
$$
Thank You!
 A: This is a question that is covered in a typical high school discussion of analytic geometry.
First, we note that we can perform a simple translation of the coordinate system so that the origin is located at the center of symmetry of the conic section; i.e., we may assume that $D = E = 0$.  In such a case, we suppose that after some rotation of the conic section by some counterclockwise angle $\theta$, the equation $$Ax^2 + Bxy + Cy^2 + F = 0$$ becomes $$A'u^2 + C' v^2 + F' = 0$$ for suitable constants $A', C', F'$ that depend on $A, B, C, F$ through $\theta$.  Such a rotation has the matrix form $$\begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}\cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix}.$$  Written explicitly, we have $$\begin{align*} x &= u \cos \theta + v \sin \theta, \\ y &= u \sin \theta - v \cos \theta, \end{align*}$$ hence
$$\begin{align*}
-F &= A(u \cos \theta + v \sin \theta)^2 + B(u \cos \theta + v \sin \theta)(u \sin \theta - v \cos \theta) + C(u \sin \theta - v \cos \theta)^2 \\
&= (A \cos^2 \theta + B \cos \theta \sin \theta + C \sin^2 \theta) u^2 \\
&\quad + (2A \cos \theta \sin \theta + B(\sin^2 \theta - \cos^2\theta) - 2C \sin \theta \cos \theta) uv \\
&\quad + (A \sin^2 \theta - B \cos \theta \sin \theta + C \cos^2 \theta) v^2.
\end{align*}$$
We want to choose $\theta$ such that the coefficient of the $uv$ term will be zero; i.e., $$(A-C) \sin 2\theta - B \cos 2\theta = 0,$$ or simply, $$\cot 2\theta = \frac{A-C}{B}.$$  This is the origin of the desired relationship.
