Spectral theorem and Quadrics The task is to convert a quadric equation to a normal form.
$Q \equiv 3x_1^2 + 3x_2^2+3x_3^2+ 2x_1x_2+ 2x_1x_3 + 2x_2x_3+4x_1+4x_2+2x_3 +1=0$
What I've done is the following: 


*

*Create a matrix A from the variables with degree 1 and 2  


$$\begin{bmatrix}
x_1 & x_2 & x_3\\
3 & 1 & 1 & x_1\\
1 & 3 & 1& x_2\\
1 & 1 & 3& x_3\\
\end{bmatrix}$$


*Determine the determinant of $A- \lambda I_3 = -\lambda^3 +9\lambda^2 -24\lambda+20= (\lambda-2)^2(-\lambda + 5)  $

*Determine the eigenvalues of $A- \lambda I_3$ 
$E_2= \operatorname{vect}\begin{pmatrix} 
1\\
1\\
1\\
\end{pmatrix}$ 
$E_5=  \operatorname{vect}\begin{pmatrix} 
1\\
1\\
1\\
\end{pmatrix}$ 
but $\dim(E_2(A))+\dim(E_5(A)) \ne 3$.  So a symmetrical matrix can't be constructed. Does this imply that there is no normal form? Can you maybe see if I made a mistake?
 A: You are wrong about $E_2$ and $E_5$:$$E_5=\left\langle\begin{pmatrix}1\\1\\1\end{pmatrix}\right\rangle$$and$$E_2=\left\langle\begin{pmatrix}-1\\0\\1\end{pmatrix},\begin{pmatrix}-1\\1\\0\end{pmatrix}\right\rangle.$$So, $\dim E_5=1$ and $\dim E_2=2$.
A: You should’ve noticed for yourself that you’d done something wrong when you ended up with the same eigenvector for two different eigenvalues. $E_5$ is clearly correct by inspection—multiplying $A$ by this vector sums the rows—and let’s assume that you’re correct about that eigenspace being one-dimensional. By using the fact that the eigenspaces of a symmetric real matrix are mutually orthogonal, you can produce eigenvectors of $2$ with almost no work: $(-1,1,0)^T$, $(0,-1,1)^T$ and $(1,0,-1)^T$ are all clearly orthogonal to $(1,1,1)^T$. Any two of these, together with $E_5$, will do for diagonalizing the matrix. If you want an orthogonal basis, pick one of these and generate the other vector via a cross product, further normalizing everything if you’d like to end up with an orthonormal basis.  
I’ll note that it looks like you’re trying to construct the canonical form rather than a normal form. The latter doesn’t really require finding eigenvalues/eigenvectors.
A: The normal form should be like this$$Q=x^TAx+x^Tb$$where$$A=\begin{bmatrix}3&2&2\\2&3&0\\2&0&3\end{bmatrix}$$and $$b=\begin{bmatrix}4\\4\\2\end{bmatrix}$$
