The Journal of Online Mathematics and Its Applications, Volume 8 (2008)
The Most Marvelous Theorem in Mathematics, Dan Kalman

## General Equation of an Ellipse

The standard equation for an ellipse, x2 / a2 + y2 / b2 = 1, represents an ellipse centered at the origin and with axes lying along the coordinate axes. ĀIn general, an ellipse may be centered at any point, or have axes not parallel to the coordinate axes. ĀBut such an ellipse can always be obtained by starting with one in the standard position, and applying a rotation and/or a translation. ĀFor the most general formulation, we can include rotations through an angle of 0 (that is, no rotation at all) and translations by the zero vector (no translation at all). ĀThen every ellipse can be obtained by rotating and translating an ellipse in the standard position. ĀAccordingly, we can find the equation for any ellipse by applying rotations and translations to the standard equation of an ellipse.

It is a matter of choice whether we rotate and then translate, or the opposite. ĀTo see this, let R represent a rotation, and consider what happens to a point x = (x, y) if we first translate by vector v, and then apply R. ĀThe result will be R(x + v) = Rx + Rv, because R is linear. ĀBut this is the same as first rotating x, and then translating by Rv. ĀThis shows that every ellipse can be obtained from one in the standard position by either a rotation followed by a translation, or a translation followed by a rotation. ĀIn developing a general equation for ellipses, we will use rotate then translate.

Rotation counterclockwise about the origin through an angle α carries (x, y) to (x cos αysin α, ycos α+x sin α) (derived here). The inverse operation can be obtained by rotating through 2π − α, and hence carries (x, y) to (x cos α + y sin α, y cos αx sin α). Applying the methods of ĀEquation of a Transformed Ellipse now leads to the following equation for a standard ellipse which has been rotated through an angle α. Expanding the binomial squares and collecting like terms gives

 (1) which is in the form Ax2 + Bxy + Cy2 = 1, with A and C positive. ĀIn this way we see that the equation for a rotated ellipse, centered at the origin is a quadratic with a nonzero xy term.

There is more to say. In the formĀAx2 + Bxy + Cy2 = 1, we recognize Āa generic quadratic equation. ĀIf we factor out y2, we obtainĀ(At2 + Bt + C) = 1 / y2, where t = x / y is the reciprocal of the slope from the origin to the point (x, y). This is valid for any point on the ellipse, except the x intercepts where y = 0. ĀAt any other point,Ā1 / y2 is positive. Meanwhile t takes on all real values as the point (x, y) traces the ellipse between the two x intercepts.ĀThis shows that At2 + Bt + C can never equal 0. Ā Since At2 + Bt + C therefore has no real roots, we conclude that B2 − 4AC < 0. ĀAnd this conclusion is easily verified by computing B2 − 4AC = −4 / (ab)2 using the coefficients in equation (1).

We have seen that a rotated ellipse, centered at the origin, is always given by an equation of the form Ax2 + Bxy + Cy2 = 1, where A and C are positive, and B2 − 4AC < 0. ĀTo complete the analysis of the general equation of an ellipse, note that translating a curve by a fixed vector (h, k) simply has the effect of replacing x by xh and y by yk in the equation for that curve (see ĀEquation of a Transformed Ellipse). ĀAccordingly, the general equation for a rotated ellipse centered at (h, k) has the form A(xh)2 + B(xh)(yk) + C(yk)2 = 1, again where A and C are positive, and B2 − 4AC < 0. ĀMust such an equation always represent an ellipse? ĀThe answer is yes, as shown here. ĀNote also that expanding the general form of the translated ellipse will introduce, for the first time, x and y terms. ĀIn fact the expanded version is

Ax2 + Bxy + Cy2 − (2Ah + kB)x − (2Ck + Bh)y +Ā(Ah2 + Bhk + Ck2 − 1) = 0.

This reveals that the equation of an ellipse is always given by a quadratic polynomial in x and y, and that it is the presence of nonzero x or y terms that indicates a center other than at the origin.