Suppose we have a quaratic form  {jatex options:inline}Ax_1^2+Bx_1x_2+Cx^2_2=k{/jatex}.
We can write this in matrix form as  {jatex{jatex options:inline}(x_1,x_2) \left( \begin{array}{ccc} A & B/2 \\ B/2 & C \end{array} \right) \begin{pmatrix}x_1\\x_2\end{pmatrix}=k {/jatex}.
If the eigenvalues are both positive then the curve is an ellipse. The points furthest from the origin will be at either end of the longest axis. The axes are in the directions of the eigenvalues, and the longest axis will be in the direction of the smallest eigenvalue.
We can find the eigenvalues  {jatex options:inline}\lambda_1 , \: \lambda_2{/jatex}  and corresponding eigenvectors of the matrix above and express the conic in the canonical form  {jatex options:inline}\lambda_1 y_1^2+ \lambda_2 y_2^2=C'{/jatex}.
The least distance of the curve from the origin will be  {jatex options:inline}\sqrt{C'/ \lambda'}{/jatex}  where  {jatex options:inline}\lambda'{/jatex}  is the smallest eigenvalue, and the least distance will be  {jatex options:inline}\sqrt{C'/ \lambda''}{/jatex}  where  {jatex options:inline}\lambda''{/jatex}  is the largest eigenvalue.
Example: Write the conic  {jatex options:inline}5x_1^2+4x_1x_2+8x_2^2=9{/jatex}  in canonical form.
We find the eigenvalues and eigenvectors of the matrix  {jatex options:inline}A=\left( \begin{array}{cc} 5 & 4/2 \\ 4/2 & 8 \end{array} \right)=\left( \begin{array}{cc} 5 & 2 \\ 2 & 8 \end{array} \right) {/jatex}
{jatex options:inline}\begin{aligned} \left| \begin{array}{cc} 5- \lambda & 2 \\ 2 & 8- \lambda \end{array} \right| & =(5-- \lambda)(8- \lambda )-2^2 \\ &=\lambda^2-13 \lambda-36 \\ & =(\lambda-4)(\lambda-9)=0 \end{aligned}{/jatex}
Hence  {jatex options:inline}\lambda=4, \: 9{/jatex}
{jatex options:inline}\lambda=4{/jatex}:
{jatex options:inline}\begin{aligned}\left( \begin{array}{cc} 5-4 & 2 \\ 2 & 8-4 \end{array} \right) \begin{pmatrix}x_1\\x_2\end{pmatrix}&=\left( \begin{array}{cc} 1 & 2 \\ 2 & 4 \end{array} \right) \begin{pmatrix}x_1\\x_2\end{pmatrix}\\ &=\begin{pmatrix}x_1+2x_2\\2x_1+4x_2\end{pmatrix} \\ &= \begin{pmatrix}0\\0\end{pmatrix} \end{aligned}{/jatex}
We can take  {jatex options:inline}x_1=-2, \: x_2=1{/jatex}
Normalising gives  {jatex options:inline}x_1=-\frac{2}{\sqrt{5}}, \: x_2=\frac{1}{\sqrt{5}}{/jatex}
The first eigenvector is  {jatex options:inline}\begin{pmatrix}-\frac{2}{\sqrt{5}}\\ \frac{1}{\sqrt{5}}\end{pmatrix}{/jatex}
{jatex options:inline}\lambda=9{/jatex}:
{jatex options:inline}\begin{aligned} \left( \begin{array}{cc} 5-9 & 2 \\ 2 & 8-9 \end{array} \right) \begin{pmatrix}x_1\\x_2\end{pmatrix} &= \left( \begin{array}{cc} -4 & 2 \\ 2 & -1 \end{array} \right) \begin{pmatrix}x_1\\x_2\end{pmatrix} \\ &= \begin{pmatrix}-4x_1+2x_2\\2x_1-x_2\end{pmatrix} \\ &= \begin{pmatrix}0\\0\end{pmatrix}\end{aligned}{/jatex}
We can take  {jatex options:inline}x_1=1, \: x_2=2{/jatex}
Normalising gives  {jatex options:inline}x_1=-\frac{1}{\sqrt{5}}, \: x_2=\frac{2}{\sqrt{5}}{/jatex}
The second eigenvector is  {jatex options:inline}\begin{pmatrix}\frac{1}{\sqrt{5}}\\ \frac{2}{\sqrt{5}}\end{pmatrix}{/jatex}
The matrix of eigenvectors is  {jatex options:inline}\left( \begin{array}{cc} -\frac{2}{\sqrt{5}} & -\frac{1}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{array} \right){/jatex}
Now define the transformation  {jatex options:inline}\mathbf{x}=P \mathbf{y}{/jatex}  then  {jatex options:inline}\mathbf{x}^TA \mathbf{x}=9{/jatex}  becomes  {jatex options:inline}(P \mathbf{y})^TA(P \mathbf{x})=\mathbf{y}^TP^TAP=\mathbf{y}D\mathbf{y}=9{/jatex}
We have  {jatex options:inline}(y_1.y_2)\left( \begin{array}{cc} 4 & 0 \\ 0 & 9 \end{array} \right)\begin{pmatrix}y_1\\y_2\end{pmatrix}=4y_1^2+9y_2^2=9 {/jatex}
The greatest distance is  {jatex options:inline}\sqrt{9/4}=3/2{/jatex}  and the least distance is  {jatex options:inline}\sqrt{9/9}=1{/jatex}