TOPICS
Search

Ellipse Equations


The Cartesian equation of an ellipse follows from the constant sum of its distances from its two foci. The general quadratic equation also gives its center, axis lengths, and orientation (Casey 1893).

Let an ellipse lie along the x-axis and find the equation of the ellipse defined by the focal distance sum 2a where F_1 and F_2 are at (-c,0) and (c,0). In Cartesian coordinates,

 sqrt((x+c)^2+y^2)+sqrt((x-c)^2+y^2)=2a.
(1)

Bring the second term to the right side and square both sides,

 (x+c)^2+y^2=4a^2-4asqrt((x-c)^2+y^2)+(x-c)^2+y^2.
(2)

Now solve for the square root term and simplify

sqrt((x-c)^2+y^2)=-1/(4a)(x^2+2xc+c^2+y^2-4a^2-x^2+2xc-c^2-y^2)
(3)
=-1/(4a)(4xc-4a^2)
(4)
=a-c/ax.
(5)

Square one final time to clear the remaining square root,

 x^2-2xc+c^2+y^2=a^2-2cx+(c^2)/(a^2)x^2.
(6)

Grouping the x terms then gives

 x^2(a^2-c^2)/(a^2)+y^2=a^2-c^2,
(7)

which can be written in the simple form

 (x^2)/(a^2)+(y^2)/(a^2-c^2)=1.
(8)

Defining a new constant

 b^2=a^2-c^2
(9)

puts the equation in the particularly simple form

 (x^2)/(a^2)+(y^2)/(b^2)=1.
(10)

The general quadratic curve

 ax^2+2bxy+cy^2+2dx+2fy+g=0
(11)

is an ellipse when, after defining

Delta=|a b d; b c f; d f g|
(12)
J=|a b; b c|
(13)
I=a+c,
(14)

Delta!=0, J>0, and Delta/I<0. These conditions include a circle, which occurs iff a=c and b=0. For the formulas below, multiply all six coefficients by -1 if necessary so that I>0. The center of the ellipse (x_0,y_0) is given by

x_0=(cd-bf)/(b^2-ac)
(15)
y_0=(af-bd)/(b^2-ac),
(16)

the semimajor axis and semiminor axis lengths are

a^'=sqrt((2(af^2+cd^2+gb^2-2bdf-acg))/((b^2-ac)[sqrt((a-c)^2+4b^2)-(a+c)]))
(17)
b^'=sqrt((2(af^2+cd^2+gb^2-2bdf-acg))/((b^2-ac)[-sqrt((a-c)^2+4b^2)-(a+c)])).
(18)

The counterclockwise angle of rotation from the x-axis to the major axis of the ellipse is given modulo pi by

 phi={0   for b=0 and a<=c; 1/2pi   for b=0 and a>c; 1/2cot^(-1)((a-c)/(2b))   for b!=0 and a<c; pi/2+1/2cot^(-1)((a-c)/(2b))   for b!=0 and a>c; pi/4   for b<0 and a=c; (3pi)/4   for b>0 and a=c,
(19)

where the inverse cotangent takes values in (-pi/2,pi/2]. For a circle, the angle of rotation is arbitrary, and phi=0 has been chosen.


See also

Cartesian Coordinates, Conic Section, Ellipse, Quadratic Curve

Explore with Wolfram|Alpha

References

Casey, J. "The Ellipse." Ch. 6 in A Treatise on the Analytical Geometry of the Point, Line, Circle, and Conic Sections, Containing an Account of Its Most Recent Extensions, with Numerous Examples, 2nd ed., rev. enl. Dublin, Ireland: Hodges, Figgis, & Co., pp. 201-249, 1893.

Cite this as:

Weisstein, Eric W. "Ellipse Equations." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/EllipseEquations.html

Subject classifications