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}}$

$\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$\ds{2x^{2} + 4xy + 6y^{2} + 6x + 2y = 6\,,\quad{\large ?}}$

\begin{align}
6&=2x^{2} + 4xy + 6y^{2} + 6x + 2y
=
\pars{x \quad y}
\pars{\begin{array}{cc}2 & 2 \\ 2 & 6\end{array}}{x \choose y}
+
\pars{3 \quad 1}{x \choose y} + \pars{x \quad y}{3 \choose 1}
\\[3mm]&=
{\bf v}^{\sf T}A{\bf v} + {\bf a}^{\sf T}{\bf v} + {\bf v}^{\sf T}{\bf a}
\qquad\mbox{where}\qquad
A \equiv \pars{\begin{array}{cc}2 & 2 \\ 2 & 6\end{array}}\,,\quad
{\bf v} \equiv  {x \choose y}\,,\quad {\bf a} \equiv {3 \choose 1} 
\end{align}

$$
{\bf v}^{\sf T}A{\bf v} + {\bf a}^{\sf T}{\bf v} + {\bf v}^{\sf T}{\bf a} = 6
$$
Let ${\bf v} = {\bf r} + {\bf b}$ where ${\bf r}$ represent the 'new coordinates' and ${\bf b}$ is a constant vector which let us to 'remove' the linear term:

\begin{align}
6&=\pars{{\bf r}^{\sf T} + {\bf b}^{\sf T}}A\pars{{\bf r} + {\bf b}}
+
{\bf a}^{\sf T}\pars{{\bf r} + {\bf b}} + \pars{{\bf r}^{\sf T} + {\bf b}^{\sf T}}
{\bf a}
=
{\bf r}^{\sf T}A{\bf r} + {\bf b}^{\sf T}{\bf b}
+ {\bf r}^{\sf T}\pars{A{\bf b} + {\bf a}}
\\[3mm]&+
\pars{{\bf b}^{\sf T}A + {\bf a}^{\sf T}}{\bf r} + {\bf a}^{\sf T}{\bf b}
+ {\bf b}^{\sf T}{\bf a} 
\end{align}
We choose
${\bf b}$ such that $\quad A{\bf b} + {\bf a} = 0\quad\imp\quad{\bf b} = -A^{-1}a.\quad$ Then,

$$
{\bf r}^{\sf T}A{\bf r}=
6 - {\bf b}^{\sf T}{\bf b} - {\bf a}^{\sf T}{\bf b} - {\bf b}^{\sf T}{\bf a}
$$
\begin{align}
{\bf b} &= -A^{-1}a =-\,{1 \over 4}
\pars{\begin{array}{c}3 & -1 \\ -1 & 1\end{array}}{3 \choose 1}
=
{-2 \choose 1/2}\,,\qquad
\left\lbrace%
\begin{array}{rcl}
{\bf b}^{\sf T}{\bf b} & = & {17 \over 4}
\\
{\bf a}^{\sf T}{\bf b} & = & {\bf b}^{\sf T}{\bf a} = -\,{11 \over 2}
\end{array}\right.
\end{align}
and $\ds{{\bf r}^{\sf T}A{\bf r} = {51 \over 4}}$. With
$\ds{{\bf r} = {\bf v} - {\bf b} = {x + 2 \choose y - 1/2}}$
$$
\pars{x + 2 \quad y - \half}\pars{\begin{array}{cc}2 & 2 \\ 2 & 6\end{array}}
{x + 2 \choose y - \half} = {51 \over 4}
$$

It remains the task of diagonalizing $A$ which amounts to perform a rotation. We hope you can take from here.
