TITLE: What is the general equation of the ellipse that is not in the origin and rotated by an angle?
QUESTION [59 upvotes]: I have the equation not in the center, i.e.
$$\frac{(x-h)^2}{a^2}+\frac{(y-k)^2}{b^2}=1.$$
But what will be the equation once it is rotated?

REPLY [5 votes]: If you came here looking for how
$$c_0x^2 + c_1y^2 + c_2xy + c_3x + c_4y + c_5 = 0$$
relates to $h, k, a, b, A$ its the following:
\begin{eqnarray}
c_0&=&\frac{\cos^2(A)}{a^2} + \frac{\sin^2(A)}{b^2}\\
c_1&=&\frac{\sin^2(A)}{a^2} + \frac{\cos^2(A)}{b^2}\\
c_2&=&\frac{\sin(2A)}{a^2} - \frac{\sin(2A)}{b^2}\\
c_3&=&-\frac{2 h \cos^2(A)}{a^2} - \frac{k\sin(2A)}{a^2} - \frac{2 h \sin^2(A)}{b^2} + \frac{k \sin(2A)}{b^2}\\
c_4&=&-\frac{h \sin(2A)}{a^2} - \frac{2k\sin^2(A)}{a^2} + \frac{h \sin(2A)}{b^2} - \frac{2k \cos^2(A)}{b^2}\\
\end{eqnarray}
$$c_5 = \frac{h^2 \cos^2(A)}{a^2} + \frac{h k \sin(2A)}{a^2} + \frac{k^2 \sin^2(A)}{a^2}  + \frac{h^2 \sin^2(A)}{b^2} - \frac{ h k \sin(2A)}{b^2} + \frac{k^2 \cos^2(A)}{b^2} - 1
$$