# Mathematics: Generating an equation from 3 cartesian point values

**URL:** <https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398>\
**Category:** Factual Questions\
**Created:** [February 10, 2004, 6:07am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398 "2004-02-10T06:07:53Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [February 11, 2004, 5:06am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/21 "2004-02-11T05:06:44Z")

</div>

**tinactin** , your equation is, of course, the general equation for a conic section. Though I have never seen it stated, I believe that five points uniquely determine a conic; you don’t need six. It’s easy to disprove this, though. Simply draw two conic sections that intersect at five points. Try as I might, I could do no such thing. I admit that hyperbolae are tricky to work with, though.

---

<div class="post-metadata">

**Author:** ![tinactin](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tinactin](https://boards.straightdope.com/u/tinactin)\
**Post date:** [February 11, 2004, 5:34am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/22 "2004-02-11T05:34:35Z")

</div>

> [@Achernar](#):
>
> **tinactin** , your equation is, of course, the general equation for a conic section. Though I have never seen it stated, I believe that five points uniquely determine a conic; you don’t need six. It’s easy to disprove this, though. Simply draw two conic sections that intersect at five points. Try as I might, I could do no such thing. I admit that hyperbolae are tricky to work with, though.

Do you know if such a conic always exists? ie if I give you five points then  
such a conic can always be found, no matter what the points are.

It is impossible for two conics to intersect in five points unless they are equal.  
This is a consequence of something known as Bezout’s theorem.

Roughly it is this :

f(x,y) and g(x,y) are polynomials in two variables of degrees d and e respectively  
then the zero loci, provided they are distinct have de intersection points. However  
this is not quite true like this. One needs to first consider intersections over the  
complex numbers counted with multiplicity. eg y=x^2 and y=0 intersect with  
multiplicity two. Finally one needs to add a line at infinity to the plane and consider  
intersections in the space thus obtained. (Called the projective plane.)

---

<div class="post-metadata">

**Author:** ![tinactin](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tinactin](https://boards.straightdope.com/u/tinactin)\
**Post date:** [February 11, 2004, 6:09am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/23 "2004-02-11T06:09:20Z")

</div>

A little linear algebra shows that such a conic exists and is unique.

---

<div class="post-metadata">

**Author:** ![ccwaterback](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@ccwaterback](https://boards.straightdope.com/u/ccwaterback)\
**Post date:** [February 11, 2004, 6:26am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/24 "2004-02-11T06:26:01Z")

</div>

I would think you could always define a continuous periodic function that would contain all of the points in an n-point-set, as long as no two points had the same x-coordinate.

---

<div class="post-metadata">

**Author:** ![ccwaterback](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@ccwaterback](https://boards.straightdope.com/u/ccwaterback)\
**Post date:** [February 11, 2004, 6:57am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/25 "2004-02-11T06:57:15Z")

</div>

Hmm, come to think of it, I guess two points could have the same x-coordinate, just rotate your periodic function about the y-axis as needed.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [February 11, 2004, 1:25pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/26 "2004-02-11T13:25:16Z")

</div>

> [@tinactin](#):
>
> A little linear algebra shows that such a conic exists and is unique.

I guess I’m curious about this. I can’t find, for instance, a conic section that intersects the following five points: Take the five vertices of a regular pentagon, but bump one of them toward or away from the center a little.

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [February 11, 2004, 2:24pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/27 "2004-02-11T14:24:54Z")

</div>

> [@Achernar](#):
>
> I guess I’m curious about this. I can’t find, for instance, a conic section that intersects the following five points: Take the five vertices of a regular pentagon, but bump one of them toward or away from the center a little.

Without specifying the bump, I think I can imagine a circle centered on the line joining the “bumped point” and the center of the pentagon, and the figure is symmetric about that line. Now, enlarge the circular figure, making it more elliptical while still touching all three points. Eventually it’ll touch a fourth point, and, because of symmetry, the fifth.

---

<div class="post-metadata">

**Author:** ![tinactin](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tinactin](https://boards.straightdope.com/u/tinactin)\
**Post date:** [February 11, 2004, 3:21pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/28 "2004-02-11T15:21:33Z")

</div>

> [@Achernar](#):
>
> I guess I’m curious about this. I can’t find, for instance, a conic section that intersects the following five points: Take the five vertices of a regular pentagon, but bump one of them toward or away from the center a little.

You are right. I should have checked my answer before posting it. Here is a  
simple example to show that 5 is not always possible: Consider

(0,0) , (1,0) , (2,0) , (0,1) and (1,1).

Starting with our degree two

ax^2 + bxy + cy^2 + dx +ey + f =0 ,

(0,0) forces f = 0

(1,0) and (2,0) force a + d = 4a + 2d = 0 , ie a=d=0.

So we are left with  
y(bx + cy)=0

(0,1) forces c =0 .

Sadly, bxy = 0 cannot pass through (1,1).

Ok, so we know that for 5 points that if there exists a conic through  
them it is unique but such a conic may not exist. Can one give  
necessary and sufficent conditions on the 5 points in order for the  
conic to exist? It is too early in the morning for me to be  
thinking about this.

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [February 11, 2004, 5:24pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/29 "2004-02-11T17:24:46Z")

</div>

> [@tinactin](#):
>
> ax^2 + bxy + cy^2 + dx +ey + f =0 ,
> 
> (0,0) forces f = 0
> 
> (1,0) and (2,0) force a + d = 4a + 2d = 0 , ie a=d=0.
> 
> So we are left with  
> y(bx + cy)=0

Nope.

y(bx + cy + e) = 0

> [@](#):
>
> (0,1) forces c =0 .

(0,1) implies c + e = 0, but (1,1) implies b + c + e = 0, so b=0

And we’re done.

c = N and e = -N

Two parallel lines, y=0 and y=1–a “degenerate” conic

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [February 11, 2004, 5:36pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/30 "2004-02-11T17:36:50Z")

</div>

Take  
ax^2 + bxy + cy^2 + dx +ey + f =0  
and divide through by f, as **tinactin** suggests.

Then  
Ax^2 + Bxy + Cy^2 + Dx +Ey + 1 =0

Each of the five points gives an equation in the  
five variables A, B, C, D, and E. But the polynomials  
x^2, xy, y^2, x and y are independent, so should the  
resulting equations.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [February 11, 2004, 7:43pm UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/31 "2004-02-11T19:43:36Z")

</div>

I take back what I said earlier. You _can_ in general construct a conic section from any five points, no three of which are collinear. If you allow degenerate conics, you can do it for _any_ five points. Apparently it’s called [Braikenridge-Maclaurin Construction](http://mathworld.wolfram.com/Braikenridge-MaclaurinConstruction.html).

---

<div class="post-metadata">

**Author:** ![wolf\_meister](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wolf_meister/32/15202_2.png) [@wolf\_meister](https://boards.straightdope.com/u/wolf_meister)\
**Post date:** [February 21, 2004, 8:05am UTC](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398/32 "2004-02-21T08:05:23Z")

</div>

Just to let you folks know, here is a calculator derived from this discussion:  
[www.1728.com/threepts.htm](http://www.1728.com/threepts.htm)

I’d have to give a lot of credit to **Cabbage** for the procedure on which this is based.  
Any comments would be welcome and at least you know this discussion actually resulted in a completed equation generator.

[Previous page](https://boards.straightdope.com/t/mathematics-generating-an-equation-from-3-cartesian-point-values/228398.md?page=1)
