Q: Finding quadric's rotation matrix I want to know how to find the rotation matrix of a quadric in general and the eigenvalues and eigen-vectors, in particular I am given
$$
Q(x,y,z)=18x^2+9y^2+14z^2+8xy+8xz−4yz−2x−6y−14z+6=0
$$
and I'm asked to translate, rotate, find eigenvalues and eigenvectors, determine its singularities and its intersection with the plane at infinity.

A: $18x^2+9y^2+14z^2+8xy+8xz−4yz−2x−6y−14z+6=0$
can be written
$\begin{pmatrix}x&y&z \end{pmatrix}
\begin{pmatrix}18&4&4\\4&9&-2\\4&-2&14\end{pmatrix}
\begin{pmatrix}x\\y \\z \end{pmatrix}
+\begin{pmatrix}-2&-6&-14 \end{pmatrix}
\begin{pmatrix}x\\y \\z \end{pmatrix}
+6={\bf x}^TA{\bf x}+K{\bf x}+6=0$
$\begin{pmatrix}18&4&4\\4&9&-2\\4&-2&14\end{pmatrix}$ has eigenvalues 6, 14 and 21 and the eigenvector matrix is 
$P=\begin{pmatrix}
-\frac{\sqrt{6}}{6}&-\frac{\sqrt{14}}{14}&\frac{4\sqrt{21}}{21}\\
\frac{\sqrt{6}}{3}&-\frac{\sqrt{14}}{7}&\frac{\sqrt{21}}{21}\\
\frac{\sqrt{6}}{6}&\frac{3\sqrt{14}}{14}&\frac{2\sqrt{21}}{21}\end{pmatrix}$
Now substitute ${\bf x}=P{\bf x}'$ and get ${\bf x}'^TP^TAP{\bf x}'+KP{\bf x}'+6=0$ where
$P^T AP=\begin{pmatrix}6&0&0\\0&14&0\\0&0&21\end{pmatrix}$
$KP= \begin{pmatrix}-4\sqrt{6}&-2\sqrt{14}&-2\sqrt{21} \end{pmatrix}$
$x''=x'-\frac{\sqrt{6}}{3}, y''=y'-\frac{\sqrt{14}}{14}, z''=z'-\frac{\sqrt{21}}{21}$
$6x''^2+14y''^2+21z''^2=0$
The real points of which seem to be the point ${\bf x}''=0$.
Indeed if we plug in $P\begin{pmatrix}\frac{\sqrt{6}}{3}\\\frac{\sqrt{14}}{14} \\\frac{\sqrt{21}}{21} \end{pmatrix}=\begin{pmatrix}-\frac{3}{14}\\\frac{4}{7} \\\frac{9}{14} \end{pmatrix}$ we do get $0$.
