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}}$
 A: 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
$$
A: I know of another method, but it may be equivalent to yours: you multiply
$A = \begin{bmatrix}cos\theta & sin\theta\\-sin\theta & cos\theta \\\end{bmatrix}$$  \begin{bmatrix}x\\ y \\\end{bmatrix}$ = $\begin{bmatrix}x' \\y' \\\end{bmatrix}$
And then sub in $(x',y')$ for $(x,y)$ in your original equation, set the $xy$ terms equal to $0$. The solution is the angle $\theta$ by which you must rotate the plane so that the $xy$-terms disappear. 
A: $\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.
