# Rotation of axes

A rotation of axes is a form of Euclidean transformation in which the entire xy-coordinate system is rotated in the counterclockwise direction with respect to the origin (0, 0) through a scalar quantity denoted by θ.

With the exception of the degenerate cases, if a general second-degree equation has a $Bxy$ term, then $Ax^2\ +\ Bxy\ +\ Cy^2\ +\ Dx\ +\ Ey\ +\ F\ =\ 0$ represents one of the 3 conic sections, namely, an ellipse, hyperbola, or parabola.

## Rotation of loci

If a locus is defined on the xy-coordinate system as $\left(x,\ y\right)$, then it is denoted as $\left(x\cos \theta\ +\ y\sin \theta,\ -x\sin \theta\ +\ y\cos \theta\right)$ on the rotated x'y'-coordinate system. Likewise, if a locus is defined on the x'y'-coordinate system as $\left(x^\prime ,\ y^\prime\right)$, then it is denoted as $\left(x^\prime\cos \theta\ -\ y^\prime\sin \theta,\ x^\prime\sin \theta\ +\ y^\prime\cos \theta\right)$ on the "un-rotated" xy-coordinate system.

## Elimination of the xy term by the rotation formula

For a general, non-degenerate second-degree equation $Ax^2\ +\ Bxy\ +\ Cy^2\ +\ Dx\ +\ Ey\ +\ F\ =\ 0$, the $Bxy$ term can be removed by rotating the xy-coordinate system by an angle $\theta$, where

$\cot 2\theta\ =\ \frac{A\ -\ C}{B}$ or $\tan 2\theta\ =\ \frac{B}{A\ -\ C}$,

i.e.:

$\theta\ =\ \frac{1}{2} \arctan \frac{B}{A\ -\ C}$.

If $A\ =\ C$ then $\theta\ =\ \frac{\pi}{4}$.

## Derivation of the rotation formula

$Ax^2\ +\ Bxy\ +\ Cy^2\ +\ Dx\ +\ Ey\ +\ F\ =\ 0,\ B \ne\ 0$.

Now, the equation is rotated by a quantity $\theta$, hence

$A\left(x^\prime\cos \theta\ -\ y^\prime\sin \theta\right)^2\ +\ B\left(x^\prime\cos \theta\ -\ y^\prime\sin \theta\right)\left(x^\prime\sin \theta\ + y^\prime\cos \theta\right)\ +\ C\left(x^\prime\sin \theta\ +\ y^\prime\cos \theta\right)^2$

$\ +\ D\left(x^\prime\cos \theta\ -\ y^\prime\sin \theta\right)\ +\ E\left(x^\prime\sin \theta\ +\ y^\prime\cos \theta\right)\ +\ F\ =\ 0$

Expanding, the equation becomes

$A{x^\prime}^2\cos ^2\theta\ -\ 2Ax^\prime y^\prime\sin \theta\cos \theta\ +\ A{y^\prime}^2\sin ^2\theta\ +\ B{x^\prime}^2\sin \theta\cos \theta\ +\ Bx^\prime y^\prime\cos ^2\theta$

$\ -\ Bx^\prime y^\prime\sin ^2\theta\ -\ B{y^\prime}^2\sin \theta\cos \theta\ +\ C{x^\prime}^2\sin ^2\theta\ +\ 2Cx^\prime y^\prime\sin \theta\cos \theta\ +\ C{y^\prime}^2\cos ^2\theta$
$\ +\ Dx^\prime\cos \theta\ -\ Dy^\prime\sin \theta\ +\ Ex^\prime\sin \theta\ +\ Ey^\prime\cos \theta\ +\ F\ =\ 0$

Collecting like terms,

${x^\prime}^2\left(A\cos ^2\theta\ +\ B\sin \theta\cos \theta\ +\ C\sin ^2\theta\right)\ +\ x^\prime y^\prime\left\{B\left(\cos ^2\theta\ -\ \sin ^2\theta\right)\ - 2\left(A\ -\ C\right)\left(\sin \theta\cos \theta\right)\right\}$

$\ +\ {y^\prime}^2\left(A\sin ^2\theta\ -\ B\sin \theta\cos \theta\ +\ C\cos ^2\theta\right)\ +\ x^\prime\left(D\cos \theta\ +\ E\sin \theta\right)$
$\ +\ y^\prime\left(-D\sin \theta\ +\ E\cos \theta\right)\ +\ F\ =\ 0$

In order to eliminate the x'y'-term, the coefficient of the x'y'-term must be set equal to 0.

If $A\ -\ C\neq\ 0$

$\begin{matrix}B\left(\cos ^2\theta\ -\ \sin ^2\theta\right)\ -\ 2\left(A\ -\ C\right)\sin \theta\cos \theta\ &=& 0 \\ \\ B\cos 2\theta\ -\ \left(A\ -\ C\right)\sin 2\theta &=& 0 \\ \\ B\cos 2\theta &=& \left(A\ -\ C\right)\sin 2\theta \\ \\ \cos 2\theta &=& \frac{\left(A\ -\ C\right)\sin 2\theta}{B} \\ \\ \cot 2\theta &=& \frac{A\ -\ C}{B} \end{matrix}$

If $A\ -\ C\ =\ 0$

$\begin{matrix}B\left(\cos ^2\theta\ -\ \sin ^2\theta\right) &=& 0 \\ \\ B\cos 2\theta &=& 0 \\ \\ 2\theta &=& \frac{\pi}{2} \\ \\ \theta &=& \frac{\pi}{4}\end{matrix}$

## Identifying rotated conic sections

A non-degenerate conic section with the equation $Ax^2\ +\ Bxy\ +\ Cy^2\ +\ Dx\ +\ Ey\ +\ F\ =\ 0$ can be identified by evaluating the value of $B^2\ -\ 4AC$:

$\begin{cases}\mbox{An ellipse or a circle},\ \mbox{if}\ B^2\ -\ 4AC\ <\ 0 \\ \mbox{A parabola},\ \mbox{if}\ B^2\ -\ 4AC\ =\ 0 \\ \mbox{A hyperbola},\ \mbox{if}\ B^2\ -\ 4AC\ >\ 0\end{cases}$