So I have this ellipse equation:
$$5x^2+10y^2-12xy=14$$
I'm asked to get the lengh of the semi-major and semi-minor axis, and it's orientation.
Considering $Ax^2+Bxy+Cy^2+Dx+Ey+F=0$, I know I can manipulate the equation to get the general formula of an ellipse to get $a$ and $b$ (both the axis), and I also know there is a "formula" to get the orientation ($\theta$, the incline), which I think is $\theta=\frac{1}{2}\tan^{-1}(\frac{|B|}{|A-C|})$.
For this situation, I've calculated $a=\sqrt{14}$, $b=1$ and $\theta=33.69$ยบ.
My problem is that I did all this algebraically, but I was supposed to do both processes using matrices and I have no clue on how to. I've seen a few answers here and there, but I haven't found one that fully helps me. Can someone help me or guide me to the solution?
Best Answer
$5 x^2 + 10 y^2 - 12 xy = 14 $
When this is translated into matrix-vector form, we define the position vector as $p = \begin{bmatrix} x \\ y \end{bmatrix}$, then we write the equation as
$ p^T A p + b^T p + c = 0 $
Where $A$ is a symmetric $2 \times 2 $ matrix, $b$ is a $2 \times 1$ vector, and $c$ is a scalar.
The first term is $p^T A p = x^2 A_{11} + y^2 A_{22} + 2 xy A_{12} $
Comparing with the given equation, one finds that
$A = \begin{bmatrix} 5 && - 6 \\ -6 && 10 \end{bmatrix} $
The second term is $ b^T p = b_1 x + b_2 y $
Comparing with the given equation, we find that $ b $ is the zero vector.
Finally, taking $14$ to the left hand side, we deduce that $c = -14$
Therefore, the equation in matrix-vector form is
$ p^T A p + c = 0 $
The next thing you need to do is diagonlize matrix $A$, i.e. find a rotation matrix $R$ and a diagonal matrix $D$ such that $A = R D R^T $
There is a standard way to do this diagonalization that you should memorize
Calculate $\theta = \frac{1}{2} \tan^{-1} \dfrac{ 2 A_{12} }{ A_{11} - A_{22} } $
Calculate the rotation matrix $R = \begin{bmatrix} \cos \theta && - \sin \theta \\ \sin \theta && \cos \theta \end{bmatrix} $
Calculate the diagonal matrix $D = \begin{bmatrix} D_{11} && 0 \\ 0 && D_{22} \end{bmatrix} $ where
$D_{11} = A_{11} \cos^2 \theta + A_{22} \sin^2 \theta + A_{12} \sin 2 \theta $
$D_{22} = A_{11} \sin^2 \theta + A_{22} \cos^2 \theta - A_{12} \sin 2 \theta $
Following the above steps, we find that $\theta = \dfrac{1}{2} \tan^{-1} \dfrac{-12}{-5} $
Therefore $\theta $ (and $(2 \theta) $ are in the first quadrant. Using the trigonometric identities
$\cos^2 \theta = \dfrac{1}{2} ( 1 + \cos 2 \theta ) $ and $\sin^2 \theta = \dfrac{1}{2} (1 - \cos 2 \theta )$
Since $\tan (2 \theta) = \dfrac{12}{5} $ then $\cos (2 \theta ) = \dfrac{5}{13} $
Hence $\cos \theta = \sqrt{ \dfrac{1}{2} \left( \dfrac{18}{13} \right) } = \dfrac{3}{\sqrt{13}} $ and $\sin \theta = \sqrt{ \dfrac{1}{2} \left( \dfrac{8}{13} \right) } = \dfrac{2}{\sqrt{13}}$
Thus for the second step, we have the rotation matrix as
$R = \dfrac{1}{\sqrt{13}} \begin{bmatrix} 3 && - 2 \\ 2 && 3 \end{bmatrix} $
For the third step, we have for diagonal matrix
$D_{11} = 5 \left( \dfrac{9}{13} \right) + 10 \left( \dfrac{4}{13} \right) - 6 (2) \left( \dfrac{6}{13} \right) = 1 $
$D_{22} = 5 \left( \dfrac{4}{13} \right) + 10 \left( \dfrac{9}{13} \right) + 6 (2) \left( \dfrac{6}{13} \right) = 14 $
With all these calculations, we can now write the equation of the ellipse as
$ p^T R D R^T + c = 0 $
To put this in the standard form divide by $(-c) = - (-14) = 14 $, then
$ p^T R E R^T p = 1 $
where the matrix $E = (D/14)$ is equal to
$E = D / 14 = \begin{bmatrix} \dfrac{1}{14} && 0 \\ 0 && 1 \end{bmatrix} $
Now define the vector $q = R^T p $ so that $p = R q $, then it follows that
$ q^T E q = 1 $
Hence $q_1^2 E_{11} + q_2^2 E_{22} = \dfrac{q_1^2 }{14} + \dfrac{q_2^2}{1} = 1 $
Thus the coordinate vector of $q$ lies on an ellipse (in standard orientation) with semi-major axis $= \sqrt{14}$, and semi-minor axis $= \sqrt{1} = 1 $. Our ellipse which is in terms of the vector $p$ is just a rotation of $q$-ellipse by the angle $\theta$ because $p = R q $, and $R$ is a rotation matrix by angle $\theta$ (counter clockwise).