# How to convert the general form of ellipse equation to the standard form?

How to convert the general form of ellipse equation to the standard form? $$-x+2y+x^2+xy+y^2=0$$

-
You really need to provide some context for this question if you are hoping that users here will be able to help you: What progress have you made so far? What exactly is causing you problems? Is the question homework? – Old John Dec 6 '13 at 21:11
en.wikipedia.org/wiki/Matrix_representation_of_conic_sections is a reference I have found to be very useful for this sort of question. – DanielV Jan 1 '15 at 8:16

$% Predefined Typography \newcommand{\paren} [1]{\left({#1}\right)} \newcommand{\bparen}[1]{\bigg({#1}\bigg)} \newcommand{\brace} [1]{\left\{{#1}\right\}} \newcommand{\bbrace}[1]{\bigg\{{#1}\bigg\}} \newcommand{\floor} [1]{\left\lfloor{#1}\right\rfloor} \newcommand{\bfloor}[1]{\bigg\lfloor{#1}\bigg\rfloor} \newcommand{\mag} [1]{\left\lVert{#1}\right\rVert} \newcommand{\bmag} [1]{\bigg\Vert{#1}\bigg\Vert} \newcommand{\abs} [1]{\left\vert{#1}\right\vert} \newcommand{\babs} [1]{\bigg\vert{#1}\bigg\vert} % \newcommand{\labelt}[2]{\underbrace{#1}_{\text{#2}}} \newcommand{\label} [2]{\underbrace{#1}_{#2}} \newcommand{\ulabelt}[2]{\overbrace{#1}_{\text{#2}}} \newcommand{\ulabel} [2]{\overbrace{#1}_{#2}} % \newcommand{\setcomp}[2]{\left\{~{#1}~~\middle \vert~~ {#2}~\right\}} \newcommand{\bsetcomp}[2]{\bigg\{~{#1}~~\bigg \vert~~ {#2}~\bigg\}} % \newcommand{\iint}[2]{\int {#1}~{\rm d}{#2}} \newcommand{\dint}[4]{\int_{#3}^{#4}{#1}~{\rm d}{#2}} \newcommand{\pred}[2]{\frac{\rm d}{{\rm d}{#2}}#1} \newcommand{\ind} [2]{\frac{{\rm d} {#1}}{{\rm d}{#2}}} \newcommand{\predp}[2]{\frac{\partial}{\partial {#2}}#1} \newcommand{\indp} [2]{\frac{{\partial} {#1}}{\partial {#2}}} \newcommand{\predn}[3]{\frac{\rm d}^{#3}{{\rm d}{#2}^{#3}}#1} \newcommand{\indn} [3]{\frac{{\rm d}^{#3} {#1}}{{\rm d}{#2}^{#3}}} % \newcommand{\ii}{{\rm i}} \newcommand{\ee}{{\rm e}} \newcommand{\exp}[1] { {\rm e}^{\large{#1}} } % \newcommand{\and} {~\text{and}~} \newcommand{\or} {~\text{or}~} % \newcommand{\red} [1]{\color{red}{#1}} \newcommand{\blue} [1]{\color{blue}{#1}} \newcommand{\green}[1]{\color{green}{#1}}$ If you have a conic section characterized by :

$$f(x, y) = A_0x^2 + 2B_0xy + C_0y^2 + 2D_0x + 2E_0y + F_0 = 0$$

Then the center will occur where $\indp{f}{x} = 0$ and $\indp{f}{y} = 0$, and solving the linear equations (2x2 matrix) you get the center $c$ at:

$$c_x = \frac{C_0D_0 - B_0E_0}{B_0^2 - A_0C_0}$$ $$c_y = \frac{A_0E_0 - B_0D_0}{B_0^2 - A_0C_0}$$

So the conic section shifted to be at the center will occur at

$$g(x, y) = f(x + x_c, y + y_c) = Ax^2 + 2Bxy + Cy^2 + F = 0$$

for some new coefficients $A,~ B,~ C,~ \text{and } F$:

\begin{align} A &= A_0(A_0C_0 - B_0^2) \\ B &= B_0(A_0C_0 - B_0^2) \\ C &= C_0(A_0C_0 - B_0^2) \\ F &= F_0(A_0C_0-B_0^2) -A_0E_0^2 - C_0D_0^2 +2B_0D_0E_0 \\ \end{align}

Now you must rotate the values of $x, y$ to align the axises, so you need to introduce two new variables $u, v$ under the constraint:

$$u = cx - sy$$ $$v = sy + cx$$ $$s^2 + c^2 = 1$$

Where $s$ and $c$ represent the sine and cosine of the rotation (although we will avoid trig functions like the plague).

Solving the transform for $x$ and $y$ and plugging into the definition for $g$ we get

$$h(u, v) = (Ac^2 -2Bcs+ Cs^2)u^2 + 2(Acs + Bc^2 -Bs^2 -Ccs )uv + (As^2 -2Bcs+ Cc^2)v^2 + F = 0$$

To obtain axial alignment, we need to choose $c$ and $s$ in a way that the coefficient of $uv$ is $0$ while maintaining $s^2 + c^2 = 1$.

$$Acs + Bc^2 -Bs^2 -Ccs = 0$$ $$c^2 + s^2 = 1$$

which solves to $$c^2 = \frac{\pm(C - A)\sqrt{M} + M}{2M}$$ $$s^2 = \frac{\mp(C - A)\sqrt{M} + M}{2M}$$ $$M = A^2 + C^2 + 4B^2 - 2AC$$

which is enough information to back substitute and get either an analytical expression or computational computation for a centered axial aligned conic section.

For your example: $$f(x, y) = -x+2y+x^2+xy+y^2=0$$

So $A_0 = 1$, $B_0 = 1/2$, $C _0= 1$, $D_0 = -1/2$, $E_0 = 1$, $F_0 = 0$.

So the center occurs at

$$c = \begin{bmatrix} \frac 43 \\ -\frac 53 \end{bmatrix}$$

and the origin centered shifted conic section is:

$$g(x, y) = \frac 34 x^2 + \frac 34 y^2 + \frac 34 xy - \frac 74 = 0$$

with the new $A = \frac 34$, $B = \frac 38$, $C = \frac 34$, $F = -\frac 74$.

So with yours, $M = \frac {9}{16}$, and $c = s = \pm \frac{1}{\sqrt{2}}$ (your conic section was rotated by $\frac 18$ of a revolution).

So the centered axially aligned transform of your example is:

$$9v^2 + 3u^2 - 14=0$$

-

The idea is to rotate your axes , so that the $xy$ term disappears. Define a transformation ( a rotation ) $x'=rcos\theta, y'=rsin\theta$ , sub-in in your equation, and set the mixed $x'y'$-terms equal to $0$. This will give you the necessary angle of rotation to make the $xy$ terms disappear.

See this post: How to put $2x^2 + 4xy + 6y^2 + 6x + 2y = 6$ in canonical form for another example.

-
Thank you for your guidance! if I want plot it, how can do this even without standard form? – user113962 Dec 6 '13 at 20:56
Only way I can think of is: take standard form, draw it and then rotate back to the original form by the same angle $\theta$. But let me see if I can think of something else. – user99680 Dec 6 '13 at 21:11
I would be grateful if you help help me in this case. – user113962 Dec 7 '13 at 7:27
Sure; have you found the rotated form yet ? – user99680 Dec 7 '13 at 7:45
yes, but it is difficult way to show it if I want change parameters and then I obtain the standard form for each changing! – user113962 Dec 7 '13 at 7:55