# Thread: Trying to figure out how to rotate an ellipse...

1. ## Trying to figure out how to rotate an ellipse...

Hi,

So, I have been trying to figure out how to rotate an ellipse in the form of:

$x^2/a^2 + y^2/b^2 = 1$

My guess is that making a translate vector of T<x^2, y^2> will do the trick. My goal is simply to make the ellipse not vertical or horizontal. My reasoning is because ^2 will have moved the numbers farther away from zero more than the numbers closer to zero resulting in a rotation. Is my reasoning correct? And, how could I find the equation of an ellipse if I wanted to rotate it x degrees?

2. Use the transformation:

$\begin{bmatrix}{x}\\{y}\end{bmatrix}=\begin{bmatri x}{\cos \alpha}&{-\sin \alpha}\\{\sin \alpha}&{\;\;\;\cos \alpha}\end{bmatrix}\begin{bmatrix}{x'}\\{y'}\end{ bmatrix}$

(rotation around the origin and angle $\alpha$)

Fernando Revilla

3. @Fernando Revilla: Thanks for the response. But, I am confused how does it work? (I am taking Algebra 2 this year). Or would it be to complicated for someone with my math knowledge to understand right now?

4. it might help if you post a specific conic that you have. centered at (0,0).

5. Originally Posted by thyrgle
@Fernando Revilla: Thanks for the response. But, I am confused how does it work? (I am taking Algebra 2 this year). Or would it be to complicated for someone with my math knowledge to understand right now?

I don't know if you have covered the equation of a rotation. For example, if $\aplha=\pi/6$ then:

$\begin{bmatrix}{x}\\{y}\end{bmatrix}=\begin{bmatri x}{\sqrt{3}/2}&{-1/2}\\{1/2}&{\;\;\;\sqrt{3}/2}\end{bmatrix}\begin{bmatrix}{x'}\\{y'}\end{bmatr ix}\Leftrightarrow \begin{Bmatrix} x=(\sqrt{3}/2)x'-(1/2)y'\\y=(1/2)x'+(\sqrt{3}/2)y' \end{matrix}$

Substitute $x,y$ for example in

$E\equiv \dfrac{x^2}{9}+\dfrac{y^2}{4}=1$

and you'll obtain the equation of $E$ by means of a rotation.

Fernando Revilla

6. What Fernando Revilla gave is a matrix multiplication. Another way to say essentially the same thing is to use the "coordinate transformation" $x= x'cos(\theta)- y' sin(\theta)$, $y= x'sin(\theta)+ y' cos(\theta)$ where I have just written out the result of the matrix multiplication. Here, $\theta$ is the angle of rotation (about the origin), x and y are the original coordinates, and x' and y' are the rotated coordinates.

For example, if the original ellipse were $x^2+ 2y^2= 1$, that transformation would give, for any angle, $\theta$,
$(x'cos(\theta)- y'sin(\theta))^2+ 2(x' sin(\theta)+ y'cos(\theta))^2= cos^2(\theta)x'^2- 2sin(\theta)cos(\theta)x'y'+ sin^2(\theta)y'^2$ $+ 2sin^2(\theta)x'^2+ 4sin(\theta)cos(\theta)x'y'+ cos^2(\theta)y'^2$
$= (cos^2(\theta)+ 2sin^2(\theta))x'^2+ 2sin(\theta)cos(\theta)x'y'+ (sin^2(\theta)+ 2cos^2(\theta))y'^2= 1$.

Notice a few thing about that- all terms are still quadratic. Linear terms signal a translation of the center of the figure but rotating keeps the center at (0, 0). There is, however, an " x'y' " term that is not in the "standard" form for a conic section. That signals a rotation. If, say, the angle of rotation were $\pi/4$, then the equation would be
$\frac{3}{2}x'^2+ x'y'+ \frac{3}{2}y'^2= 1$.

However, $sin(\pi/2)= 1$ and $cos(\pi/2)= 0$ so that a rotation by a right angle would give math]
$2x'^2+ y'^2= 1$ just switching "major axis" and "minor axis".

Typically, what one wants to do is the "other way around"- given a quadratic in two variables, say $xy= 1$, write it in "standard form".

Writing $x= x'cos(\theta)- y' sin(\theta)$, $y= x'sin(\theta)+ y' cos(\theta)$, $xy= (x'cos(\theta)- y'sin(\theta))(x'sin(\theta)+ y'cos(\theta))$ $= sin(\theta)cos(\theta)x'^2+ (cos^2(\theta)- sin^2(\theta))x'y'+ sin(\theta)cos(\theta)y'^2= 1$.

Now, to remove the x'y' turn, which never appears in the "standard form", I have to choose $\theta$ to make $cos^2(\theta)- sin^2(\theta)= 0$. That's easy. Either replace $sin^2(\theta)$ with $1- cos^2(\theta)$ to get $2cos^2(\theta)- 1= 0$ so that $cos^2(\theta)= \frac{1}{2}$ or recognize that $cos^2(\theta)- sin^2(\theta)= cos(2\theta)$ so that we must have $cos(2\theta)= 0$.

Either gives $\theta= \pi/4$ so that $sin(\theta)= cos(\theta)= \frac{1}{\sqrt{2}}$ and the equation becomes $\frac{1}{2}x'^2- \frac{1}{2}y'^2= 1$. That shows that the graph of xy= 1 (or y= 1/x) is a hyperbola with the lines y= x and y= -x as axes, the x and y axes as asymptotes.