# Rotated Ellipse

It is well known that the equation $$\frac {(x\cos\alpha+y\sin\alpha)^2}{a^2}+\frac {(x\sin\alpha-y\cos\alpha)^2}{b^2}=1\tag{1}$$ (where $$\beta\neq\alpha$$) represents an ellipse centred at the origin with semimajor/minor axes $$a,b$$, and rotated by $$\alpha$$.

Question

The equation $$\frac {(x\cos\alpha+y\sin\alpha)^2}{a^2}+\frac {(x\sin\beta-y\cos\beta)^2}{b^2}=1\tag{2}$$ represents a rotated ellipse centred at the origin, but its semimajor/minor axes are no longer $$a,b$$.

How can this be transformed into a form similar to $$(1)$$, such that the semimajor/minor axes and angle of rotation can be easily determined?

• Search for "canonical form parameters" in the Wikipedia entry on the ellipse. Jun 24 '19 at 16:47

If you rewrite your equation as $$ux^2 + vy^2 +2wxy = 1$$ then the squared reciprocal lengths of the semimajor/semiminor axes of the ellipse are the eigenvalues of the matrix $$\begin{pmatrix} u & w \\ w & v \end{pmatrix}$$ You get $$\begin{eqnarray*} u & = & \frac{\cos^2 \alpha}{a^2} + \frac{\sin^2 \beta}{b^2} \\ v & = & \frac{\sin^2 \alpha}{a^2} + \frac{\cos^2 \beta}{b^2} \\ w & = & \frac{\cos\alpha\sin\alpha}{a^2} - \frac{\cos\beta\sin\beta}{b^2} \end{eqnarray*}$$ The eigenvalues of the matrix are $$\lambda_{1,2} = \frac{u+v}{2} \pm \sqrt{\left(\frac{u-v}{2}\right)^2+w^2}$$ Using $$\sin(\alpha+\beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta \\ \cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta \\ \cos^2\alpha+\sin^2\alpha = 1$$ this simplifies a lot: $$\lambda_{1,2} = \frac{1}{2}\left(\frac{1}{a^2}+\frac{1}{b^2}\right) \pm\frac{1}{2}\sqrt{\frac{1}{a^4} - \frac{2\cos(2\alpha-2\beta)}{a^2b^2} +\frac{1}{b^4}}$$ The length of the semimajor axis is $$1/\sqrt{\lambda_2},$$ and the length of the semiminor axis is $$1/\sqrt{\lambda_1}.$$

• Note that when $\lvert\alpha-\beta\rvert=\pi/2$, one of the eigenvalues is $0$—the equation is that of a pair of parallel lines.
– amd
Jun 25 '19 at 1:12
• Thanks. Nice answer (+1). Jun 25 '19 at 17:48