How to put $2x^2 + 4xy + 6y^2 + 6x + 2y = 6$ in canonical form We are given the equation $2x^2 + 4xy + 6y^2 + 6x + 2y = 6$
We did an example of this in class but the equation had less terms.
I took a note in class that says : if there are linear terms, I have to rotate...
This is what I think I have to do. 


*

*Put the coefficients of this equation in a matrix $A$, then $B =
    det(A - I \lambda)$

*$det(B)$ must be $ = 0$

*Evaluating this determinant will give me a value for lambda that is
the root of the equation.

*I can then go on and find eigen lines or eigen vectors.


My questions : 


*

*Am I right about the steps to solve it ? Shouldn't it give me a canonical form at the end ? because it my notes, it doesn't.

*How do I place the coefficients in the matrix A ?
this is my try : 
$A = \begin{bmatrix}2 & 2\\2 & 6 \\\end{bmatrix}$
the first 2 is for the $2x^2$ term, the second 2 next are for the $4xy$ term which I divided by 2...( I dont really know why btw :\ ) and the 6 is for the $6y^2$ term. Now how do I place the 6x and 2y terms ?
$A = \begin{bmatrix}2 & 2\\2 & 6\\3 & 1 \\\end{bmatrix}$
I add another line with those 2 divided by 2 ?
edit :
Here's my current work
I rewrote A as :
$ \begin{bmatrix} x & y \\\end{bmatrix} $ 
$ A = \begin{bmatrix}2 & 2\\2 & 6 \\\end{bmatrix}$
$ \begin{bmatrix} x \\ y \\\end{bmatrix} $ +
$ \begin{bmatrix} 6 & 2 \\\end{bmatrix} $
$ \begin{bmatrix} x \\ y \\\end{bmatrix} $ - 6 
$B = \begin{bmatrix}2 - \lambda & 2\\2 & 6 - \lambda \\\end{bmatrix}$
$det(B) = (2 - \lambda)(6 - \lambda) - 4$
$det(B) = 12 - 2 \lambda - 6 \lambda + \lambda^2 - 4 $
And I'm stuck here. How do I factor this ?
$\lambda^2 - 8 \lambda + 8$
edit : so with the quadration formula I found two roots.
$4 + \sqrt{\frac{32}{2}}$ and 
$4 - \sqrt{\frac{32}{2}}$

Not knowing what exactly "canonical form" is, here is what I get.
Translating to get rid of the linear terms:
$$
2(x+2)^2+4(x+2)(y-1/2)+6(y-1/2)^2=\frac{23}{2}\tag{1}
$$
With $P=\dfrac{\sqrt{2+\sqrt2}}{2}\begin{bmatrix}1&1-\sqrt2\\-1+\sqrt2&1\end{bmatrix}=\begin{bmatrix}\cos(\pi/8)&-\sin(\pi/8)\\\sin(\pi/8)&\hphantom{+}\cos(\pi/8)\end{bmatrix}$ we have
$$
\begin{bmatrix}2&2\\2&6\end{bmatrix}
=P^T
\begin{bmatrix}4-\sqrt8&0\\0&4+\sqrt8\end{bmatrix}
P\tag{2}
$$
Therefore,
$$
\begin{bmatrix}x+2\\y-1/2\end{bmatrix}^TP^T
\begin{bmatrix}4-\sqrt8&0\\0&4+\sqrt8\end{bmatrix}
P\begin{bmatrix}x+2\\y-1/2\end{bmatrix}
=\frac{23}2
$$
Thus, the curve is an ellipse with its center at $(-2,1/2)$ and its major axis tilted $\pi/8$ clockwise from the $x$-axis. The major and minor axes are
$$
\sqrt{\frac{23}8(2\pm\sqrt2)}
$$

To get $(1)$, we translated to get rid of the linear terms. So
$$
2(x+h)^2+4(x+h)(y+k)+6(y+k)^2\\
=(2x^2+4hx+2h^2)+(4xy+4kx+4hy+4hk)+(6y^2+12ky+6k^2)\\
=(2x^2+4xy+6y^2)+(4h+4k)x+(4h+12k)y+(2h^2+4hk+6k^2)
$$
To match the linear terms, we need $4h+4k=6$ and $4h+12k=2$. Thus, $h=2$ and $k=-1/2$:
$$
2(x+2)^2+4(x+2)(y-1/2)+6(y-1/2)^2\\
=2x^2+4xy+6y^2+6x+2y+\frac{11}2=6+\frac{11}2=\frac{23}2
$$

To get $(2)$, we diagonalized $\begin{bmatrix}2&2\\2&6\end{bmatrix}$. The matrix $P$ rotates counterclockwise by $\pi/8$. After translating by $(2,-1/2)$ and rotating $\pi/8$ counterclockwise, we are left with the ellipse
$$
(4-\sqrt8)x^2+(4+\sqrt8)y^2=\frac{23}2
$$
