Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Ellipse Equation

Date: 03/11/99 at 10:24:25
From: Patrick Roberts
Subject: Equation of an Ellipse

How do I get the equation of an ellipse from four points and an 

Date: 03/11/99 at 15:19:48
From: Doctor Rob
Subject: Re: Equation of an Ellipse

I am a little confused about the word 'orientation' in this context. I 
will assume you mean the inclination of the major axis of the ellipse. 
Denote the angle the major axis of the ellipse with the positive x-axis 
by alpha. Then you can rotate your system of coordinates about the 
origin by an angle alpha using the transformation

   x = X*cos(alpha) - Y*sin(alpha),
   y = X*sin(alpha) + Y*cos(alpha).

Then, because the new coordinate axes are parallel to the major and 
minor axes of the ellipse, the equation of the ellipse has the form

   A*X^2 + C*Y^2 + D*X + E*Y + F = 0   (A*C > 0)

Substitute in the new coordinates of your four points, and you will 
have a system of four equations in the five unknowns A, C, D, E, and F. 
Solve them for C, D, E, and F in terms of A. Set A equal to any 
convenient nonzero value. That gives you the equation of the ellipse 
with numerical values for the coefficients. Now undo the coordinate 
rotation by substituting

   X =  x*cos(alpha) + y*sin(alpha)
   Y = -x*sin(alpha) + y*cos(alpha)

Expand and simplify, and you will have the equation of the ellipse you 

Example: (11,0), (11,-12), (19/5,42/5), (-53/5, -54/5), inclination 
36.8699 degrees. Then, cos(alpha) = 4/5 and sin(alpha) = 3/5. In the 
rotated coordinate system, the four points become (44/5,33/5), (16,-3), 
(-2,9), and (-2,-15), respectively. The four linear equations are

   (1936/25)*A + (1089/25)*C + (44/5)*D + (33/5)*E + F = 0
         256*A +         9*C +     16*D -      3*E + F = 0
           4*A +        81*C -      2*D +      9*E + F = 0
           4*A +       225*C -      2*D -     15*E + F = 0

Solving, I got

   C =     (9/4)*A
   D =         4*A
   E =    (27/2)*A
   F = (-1199/4)*A

Setting A = 4 to make all values integers,

   A = 4
   C = 9
   D = 16
   E = 54
   F = -1199
   4*X^2 + 9*Y^2 + 16*X + 54*Y - 1199 = 0
   4*(X+2)^2 + 9*(Y+3)^2 = 1296
   (X+2)^2/18^2 + (Y+3)^2/12^2 = 1

Unrotating the coordinate system, the equation of this ellipse in the 
old coordinate system becomes

   29*x^2 + 24*x*y + 36*y^2 + 226*x + 168*y - 5995 = 0

You can check that the four points given do satisfy this equation.

- Doctor Rob, The Math Forum

Date: 03/11/99 at 16:01:18
From: Patrick Roberts
Subject: Equation of an ellipse

Earlier, I asked how to get the equation of an ellipse from 4 points 
and an orientation, and you replied, but I needed it for an ellipse 
*not* necessarily centred at the origin. Please show me how to do 

Date: 03/16/99 at 16:29:35
From: Doctor Rob
Subject: Re: Equation of an ellipse

This answer does apply to an ellipse *not* centered at the origin. If
the ellipse were centered at the origin, you would have D = E = 0, that
is, no first-degree terms in x or y appearing. Since I allow nonzero
values of D and E in the above answer, and those first-degree terms
can appear, the ellipse is not necessarily centered at the origin.

The example above was centered at (-2,-3), not the origin.

- Doctor Rob, The Math Forum
Associated Topics:
High School Conic Sections/Circles
High School Coordinate Plane Geometry
High School Equations, Graphs, Translations
High School Geometry

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994-2013 The Math Forum