Skip to content
The Lumenary
Grades 9–12Ages 14–18 75 min

Conic sections

Slice a cone and you get the curves of satellite dishes, whispering galleries and planetary orbits — each with a focus that gives it its power.

Formally verified · 12 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review

Your guides: Chloe, Margaret, Gideon

MotivationH

Curves with a secret point

A solar cooker is a shiny dish that gathers sunlight onto a pot. Families in sunny regions from India to Bolivia use them to cook without firewood. The dish is not just any bowl: its cross-section is a parabola, and every ray of sunlight that enters parallel to its axis is reflected through a single point, the focus. Satellite dishes and radio telescopes work the same way, in reverse for car headlights.

In some hospitals, kidney stones are shattered without surgery by a lithotripter: a shock wave is produced at one focus of a reflector shaped like part of an ellipsoid, and every reflected wave arrives together at the other focus — where the stone has been placed. And when Johannes Kepler studied the orbit of Mars, he found it was an ellipse with the Sun at one focus. In 2017 astronomers tracked the object ʻOumuamua passing the Sun on a hyperbola: it came from interstellar space and is leaving for good.

Parabolas, ellipses and hyperbolas are the conic sections: the curves you get by slicing a cone. In this lesson we meet three descriptions of them — slices of a cone, sets of points defined by distances, and second-degree equations — and prove that they agree.

IntuitionH

Slicing a cone

Take a double cone: two ice-cream cones joined at their tips, extending forever. Slice it with a flat plane.

  • A plane perpendicular to the axis gives a circle.
  • Tilt the plane a little: the slice is a closed oval, an ellipse.
  • Tilt it until it is parallel to a line on the cone (a generator): the curve no longer closes up. It is a parabola.
  • Tilt it further, so that it cuts both halves of the cone: you get the two branches of a hyperbola.
  • A plane through the tip gives a point, a single line or a pair of crossing lines: the degenerate conics.
circleellipseparabolahyperbola
A side view of the double cone and four cutting planes (seen edge-on). The horizontal plane gives a circle, the tilted one an ellipse, the one parallel to a generator a parabola, and the steep one, which cuts both halves, a hyperbola.

Slices are hard to compute with, so the ancient Greek geometers also described the curves by distances. You can draw an ellipse with two pins and a loop of string: put the pins at two points, keep the string taut with a pencil, and move round. The total length from the pencil to the two pins never changes. Gardeners lay out oval flower beds this way.

DefinitionsH

Definitions

Definition— ellipse

Given two points F1F_1, F2F_2 (the foci) and a length 2a2a greater than the distance F1F2F_1F_2, the ellipse is the set of points PP with

PF1+PF2=2a.PF_1 + PF_2 = 2a.

Definition— parabola

Given a point FF (the focus) and a line ℓ\ell (the directrix) not through FF, the parabola is the set of points equidistant from FF and from ℓ\ell.

Definition— hyperbola

Given two foci F1F_1, F2F_2 and a length 2a2a with 0<2a<F1F20 \lt 2a \lt F_1F_2, the hyperbola is the set of points PP with

∣PF1−PF2∣=2a.\left|PF_1 - PF_2\right| = 2a.

Definition— eccentricity

For a point FF, a line ℓ\ell not through FF, and a number e>0e > 0, the set of points PP with PF=e⋅(distance from P to ℓ)PF = e \cdot (\text{distance from } P \text{ to } \ell) is an ellipse if e<1e \lt 1, a parabola if e=1e = 1 and a hyperbola if e>1e > 1 (we prove this below). The number ee is the eccentricity. A circle is the limiting case e=0e = 0; it has no directrix.

Placing the foci symmetrically on the xx-axis gives the standard equations. In each row, aa, bb, cc are positive (for the parabola, p≠0p \ne 0):

CurveFociEquationRelationEccentricity
Ellipse(±c,0)(\pm c, 0)x2a2+y2b2=1\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1b2=a2−c2b^2 = a^2 - c^2e=c/a<1e = c/a \lt 1
Hyperbola(±c,0)(\pm c, 0)x2a2−y2b2=1\dfrac{x^2}{a^2} - \dfrac{y^2}{b^2} = 1b2=c2−a2b^2 = c^2 - a^2e=c/a>1e = c/a > 1
Parabola(0,p)(0, p); directrix y=−py = -px2=4pyx^2 = 4py—e=1e = 1

For the ellipse, aa is the semi-major axis and bb the semi-minor axis. The hyperbola has asymptotes y=±baxy = \pm\tfrac{b}{a}x: its branches get closer and closer to these lines without meeting them. The ellipse with a=ba = b (so c=0c = 0) is the circle x2+y2=a2x^2 + y^2 = a^2.

Worked examplesH

Worked examples

Example— The equation of a parabola from its focus and directrix

Take the focus F=(0,2)F = (0, 2) and the directrix y=−2y = -2. A point P=(x,y)P = (x, y) is at distance x2+(y−2)2\sqrt{x^2 + (y - 2)^2} from FF and ∣y+2∣|y + 2| from the line. Setting them equal and squaring: x2+y2−4y+4=y2+4y+4x^2 + y^2 - 4y + 4 = y^2 + 4y + 4, so x2=8yx^2 = 8y, or y=18x2y = \tfrac18 x^2. In general, focus (0,p)(0, p) and directrix y=−py = -p give x2=4pyx^2 = 4py.

Example— Finding the foci of an ellipse

9x2+25y2=2259x^2 + 25y^2 = 225. Divide by 225225: x225+y29=1\dfrac{x^2}{25} + \dfrac{y^2}{9} = 1, so a=5a = 5, b=3b = 3 and c=25−9=4c = \sqrt{25 - 9} = 4. The foci are (±4,0)(\pm 4, 0), the eccentricity is 45\tfrac45, and every point of the ellipse has distances to the foci adding up to 2a=102a = 10. Check at the top point (0,3)(0, 3): both distances are 16+9=5\sqrt{16 + 9} = 5.

Example— Completing the square

What is 4x2+9y2−16x+54y+61=04x^2 + 9y^2 - 16x + 54y + 61 = 0? Group and complete the squares (see quadratics):

4(x2−4x)+9(y2+6y)+61=4(x−2)2−16+9(y+3)2−81+61,4(x^2 - 4x) + 9(y^2 + 6y) + 61 = 4(x - 2)^2 - 16 + 9(y + 3)^2 - 81 + 61,

so the equation is 4(x−2)2+9(y+3)2=364(x - 2)^2 + 9(y + 3)^2 = 36, that is,

(x−2)29+(y+3)24=1:\frac{(x - 2)^2}{9} + \frac{(y + 3)^2}{4} = 1:

an ellipse with centre (2,−3)(2, -3), a=3a = 3, b=2b = 2 and foci (2±5,−3)(2 \pm \sqrt5, -3). If the constant had been 9797 instead of 6161, we would have reached 4(x−2)2+9(y+3)2=04(x - 2)^2 + 9(y + 3)^2 = 0, a single point; with a larger constant, no points at all.

Example— A hyperbola in disguise

The graph of y=1/xy = 1/x, that is xy=1xy = 1, is a hyperbola whose asymptotes are the coordinate axes. Rotating it by 45∘45^\circ (substitute x=(X−Y)/2x = (X - Y)/\sqrt2, y=(X+Y)/2y = (X + Y)/\sqrt2) turns xy=1xy = 1 into X2−Y2=2X^2 - Y^2 = 2, which is in standard form with a=b=2a = b = \sqrt2 and c=2c = 2. The xyxy term was hiding the standard form.

Example— Non-examples

  • x2−y2=0x^2 - y^2 = 0 factorises as (x−y)(x+y)=0(x - y)(x + y) = 0: a pair of crossing lines, not a hyperbola.
  • x2+y2=0x^2 + y^2 = 0 is a single point, and x2+y2+1=0x^2 + y^2 + 1 = 0 has no real points at all.
  • A parabola is not half of a hyperbola and has no asymptotes: on y=x2/4y = x^2/4 the slope x/2x/2 grows without bound, so no straight line y=mx+ky = mx + k stays close to it (the gap x2/4−mx−kx^2/4 - mx - k tends to infinity).
ProofH

Why the descriptions agree

Theorem— Theorem (the parabola)

A point (x,y)(x, y) is equidistant from the focus (0,p)(0, p) and the directrix y=−py = -p if and only if x2=4pyx^2 = 4py.

Proof

Both distances, x2+(y−p)2\sqrt{x^2 + (y - p)^2} and ∣y+p∣|y + p|, are non-negative, so they are equal exactly when their squares are: x2+y2−2py+p2=y2+2py+p2x^2 + y^2 - 2py + p^2 = y^2 + 2py + p^2, which simplifies to x2=4pyx^2 = 4py. ■\blacksquare

∎

Theorem— Theorem (the ellipse)

Let 0≤c<a0 \le c \lt a and b2=a2−c2b^2 = a^2 - c^2. A point P=(x,y)P = (x, y) satisfies x2a2+y2b2=1\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1 if and only if PF1+PF2=2aPF_1 + PF_2 = 2a, where F1=(c,0)F_1 = (c, 0) and F2=(−c,0)F_2 = (-c, 0). Moreover, on the ellipse

PF1=a−caxandPF2=a+cax.PF_1 = a - \frac{c}{a}x \qquad\text{and}\qquad PF_2 = a + \frac{c}{a}x.

Proof

Write d1=PF1=(x−c)2+y2d_1 = PF_1 = \sqrt{(x - c)^2 + y^2} and d2=PF2=(x+c)2+y2d_2 = PF_2 = \sqrt{(x + c)^2 + y^2}.

Equation ⇒\Rightarrow distances. On the ellipse, y2=b2(1−x2a2)=(a2−c2)(1−x2a2)y^2 = b^2\left(1 - \frac{x^2}{a^2}\right) = (a^2 - c^2)\left(1 - \frac{x^2}{a^2}\right). Substituting,

d12=x2−2cx+c2+a2−c2−x2+c2x2a2=a2−2cx+c2x2a2=(a−cax)2.d_1^2 = x^2 - 2cx + c^2 + a^2 - c^2 - x^2 + \frac{c^2x^2}{a^2} = a^2 - 2cx + \frac{c^2 x^2}{a^2} = \left(a - \frac{c}{a}x\right)^2.

Since ∣x∣≤a|x| \le a on the ellipse and c<ac \lt a, the number a−caxa - \frac{c}{a}x is positive, so d1=a−caxd_1 = a - \frac{c}{a}x. Replacing xx by −x-x gives d2=a+caxd_2 = a + \frac{c}{a}x, and d1+d2=2ad_1 + d_2 = 2a.

Distances ⇒\Rightarrow equation. Suppose d1+d2=2ad_1 + d_2 = 2a. Subtracting the squares, d22−d12=(x+c)2−(x−c)2=4cxd_2^2 - d_1^2 = (x + c)^2 - (x - c)^2 = 4cx. Since d22−d12=(d2−d1)(d2+d1)=2a(d2−d1)d_2^2 - d_1^2 = (d_2 - d_1)(d_2 + d_1) = 2a(d_2 - d_1), we get d2−d1=2cxad_2 - d_1 = \frac{2cx}{a}. Together with d1+d2=2ad_1 + d_2 = 2a this gives d1=a−caxd_1 = a - \frac{c}{a}x. Squaring, (x−c)2+y2=a2−2cx+c2x2a2(x - c)^2 + y^2 = a^2 - 2cx + \frac{c^2x^2}{a^2}, which rearranges to x2(1−c2a2)+y2=a2−c2x^2\left(1 - \frac{c^2}{a^2}\right) + y^2 = a^2 - c^2. Dividing by a2−c2=b2a^2 - c^2 = b^2 gives x2a2+y2b2=1\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1. ■\blacksquare

∎

The same algebra, with b2=c2−a2b^2 = c^2 - a^2, shows that x2a2−y2b2=1\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1 is the hyperbola ∣d1−d2∣=2a|d_1 - d_2| = 2a: on its right branch d1=cax−ad_1 = \frac{c}{a}x - a and d2=cax+ad_2 = \frac{c}{a}x + a.

Theorem— Corollary (focus and directrix of an ellipse)

If c>0c > 0, put e=c/ae = c/a. Every point of the ellipse satisfies PF1=e⋅(distance from P to the line x=a/e)PF_1 = e \cdot (\text{distance from } P \text{ to the line } x = a/e).

Proof

PF1=a−cax=e(ae−x)PF_1 = a - \frac{c}{a}x = e\left(\frac{a}{e} - x\right), and ae−x\frac{a}{e} - x is the distance from PP to the vertical line x=a/ex = a/e, because x≤a<a/ex \le a \lt a/e. ■\blacksquare

∎

Theorem— Theorem (eccentricity decides the type)

Let FF be the origin, let ℓ\ell be the line x=−kx = -k with k>0k > 0, and let e>0e > 0. The set of points with PF=e⋅(distance to ℓ)PF = e \cdot (\text{distance to } \ell) is an ellipse if e<1e \lt 1, a parabola if e=1e = 1, and a hyperbola if e>1e > 1.

Proof

Squaring x2+y2=e ∣x+k∣\sqrt{x^2 + y^2} = e\,|x + k| gives

(1−e2) x2−2e2k x+y2=e2k2.(1 - e^2)\,x^2 - 2e^2k\,x + y^2 = e^2k^2.

If e=1e = 1, the x2x^2 term vanishes and y2=2kx+k2y^2 = 2kx + k^2: a parabola (opening to the right). If e≠1e \ne 1, complete the square in xx, with h=e2k1−e2h = \frac{e^2k}{1 - e^2}: the equation becomes (1−e2)(x−h)2+y2=r(1 - e^2)(x - h)^2 + y^2 = r with r=e2k21−e2r = \frac{e^2k^2}{1 - e^2}. If e<1e \lt 1, both squares have positive coefficients and r>0r > 0: an ellipse. If e>1e > 1, the coefficients have opposite signs and r<0r \lt 0; multiplying by −1-1 gives the standard form of a hyperbola. ■\blacksquare

∎

Theorem— Theorem (Dandelin spheres: slices of a cone are ellipses)

If a plane cuts every generator of one half of a cone (and misses the tip), the curve of intersection is an ellipse.

Proof

Inscribe two spheres in the cone, one on each side of the plane, each touching the cone along a circle (C1C_1 and C2C_2) and touching the plane at a single point (F1F_1 and F2F_2). Let PP be a point of the curve. The generator through PP meets C1C_1 at Q1Q_1 and C2C_2 at Q2Q_2. Two tangent segments drawn from a point to a sphere have equal length, so PF1=PQ1PF_1 = PQ_1 (both tangent to the first sphere) and PF2=PQ2PF_2 = PQ_2. Hence

PF1+PF2=PQ1+PQ2=Q1Q2,PF_1 + PF_2 = PQ_1 + PQ_2 = Q_1Q_2,

and Q1Q2Q_1Q_2 — the distance between the two circles measured along a generator — is the same for every generator. So the sum of distances to F1F_1 and F2F_2 is constant: the curve is an ellipse, and the points where the spheres touch the plane are its foci. ■\blacksquare

∎

Germinal Pierre Dandelin found this argument in 1822. Similar arguments (with one sphere, or with spheres in both halves of the cone) handle the parabola and the hyperbola.

ProofH

The reflective properties

Light reflects from a curved mirror as it would from the tangent line at the point where it hits: the reflected ray is the mirror image, in the tangent line, of the ray that would have continued straight on.

Theorem— Reflective property of the parabola

A ray travelling parallel to the axis of a parabola is reflected through the focus.

Proof

Let the ray come straight down and hit the parabola at PP. Let DD be the foot of the perpendicular from PP to the directrix, so the ray, continued straight on, would travel from PP towards DD. By definition PF=PDPF = PD. Let tt be the perpendicular bisector of FDFD; it passes through PP, because PP is equidistant from FF and DD.

We claim tt is the tangent at PP. Take any other point QQ of tt. Then QF=QDQF = QD (as QQ is on the perpendicular bisector), and QDQD is longer than the distance from QQ to the directrix, because QDQD is not perpendicular to the directrix (only PDPD is). So QFQF is greater than the distance from QQ to the directrix, and QQ is not on the parabola. Thus tt meets the parabola only at PP and is not parallel to the axis (it is perpendicular to FDFD, which is not vertical unless PP is the vertex, where tt is the horizontal tangent): it is the tangent line.

Reflection in tt fixes PP and swaps DD and FF (that is what "perpendicular bisector of FDFD" means). So the mirror image of the ray from PP towards DD is the ray from PP towards FF: the reflected ray passes through the focus. ■\blacksquare

∎

FPDdirectrixtangent
The parabola y = x²/4 with focus F and directrix. The vertical ray hits P; the tangent at P is the perpendicular bisector of FD, so the reflected ray goes to F — the mirror image of the dashed straight-on path to D.

Theorem— Reflective property of the ellipse

A ray from one focus of an ellipse is reflected through the other focus.

Proof

Let the ray from F1F_1 hit the ellipse at PP, and let tt be the tangent at PP. Because the ellipse is an oval curve (convex), every point Q≠PQ \ne P of tt lies outside it, so QF1+QF2>2a=PF1+PF2QF_1 + QF_2 > 2a = PF_1 + PF_2. Thus PP is the point of tt with the smallest total distance to F1F_1 and F2F_2.

Now use Heron's trick: reflect F2F_2 in tt to get F2′F_2'. For every QQ on tt, QF2=QF2′QF_2 = QF_2', so QF1+QF2=QF1+QF2′QF_1 + QF_2 = QF_1 + QF_2', which is smallest when QQ lies on the straight segment F1F2′F_1F_2'. So PP is on that segment, and the angles that PF1PF_1 and PF2′PF_2' make with tt are vertically opposite, hence equal. By the symmetry of the reflection, the angle between tt and PF2′PF_2' equals the angle between tt and PF2PF_2. So PF1PF_1 and PF2PF_2 make equal angles with the tangent — which is exactly the law of reflection. ■\blacksquare

∎

Note

The hyperbola has a matching property: a ray aimed at one focus is reflected, from the outside of the near branch, towards the other focus. Large telescopes of the Cassegrain design combine a parabolic main mirror with a hyperbolic secondary mirror for this reason.

ProofH

Second-degree equations

Every conic in the plane has an equation of the form

Ax2+Bxy+Cy2+Dx+Ey+F=0,Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0,

with AA, BB, CC not all zero. Conversely, which sets does such an equation describe?

Theorem— Classification of conics

The set of real solutions of Ax2+Bxy+Cy2+Dx+Ey+F=0Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 is one of: an ellipse (possibly a circle), a parabola, a hyperbola, or a degenerate case — a single point, one line, two parallel lines, two crossing lines, or the empty set. When the curve is non-degenerate, it is

  • an ellipse if B2−4AC<0B^2 - 4AC \lt 0,
  • a parabola if B2−4AC=0B^2 - 4AC = 0,
  • a hyperbola if B2−4AC>0B^2 - 4AC > 0.

Proof sketch. (1) Rotating the axes through an angle θ\theta with cot⁡2θ=(A−C)/B\cot 2\theta = (A - C)/B (or θ=45∘\theta = 45^\circ if A=CA = C) removes the xyxy term; a computation shows that B2−4ACB^2 - 4AC does not change under rotation. (2) Without the xyxy term the discriminant is −4AC-4AC, and completing the square in xx and yy (or in just one of them, if AA or CC is zero) gives a standard form or one of the degenerate cases. The heart of the matter is the next pair of facts, which do not need any rotation. □\square

Theorem— Lemma (definite and indefinite)

  1. If A>0A > 0 and B2−4AC<0B^2 - 4AC \lt 0, then Ax2+Bxy+Cy2>0Ax^2 + Bxy + Cy^2 > 0 for every (x,y)≠(0,0)(x, y) \ne (0, 0).
  2. If B2−4AC>0B^2 - 4AC > 0, then Ax2+Bxy+Cy2Ax^2 + Bxy + Cy^2 takes both positive and negative values.

Proof

  1. Complete the square: 4A(Ax2+Bxy+Cy2)=(2Ax+By)2+(4AC−B2) y24A\left(Ax^2 + Bxy + Cy^2\right) = (2Ax + By)^2 + (4AC - B^2)\,y^2. Both terms are non-negative, and they are both zero only if y=0y = 0 and then x=0x = 0.
  2. If A≠0A \ne 0, the value at (1,0)(1, 0) is AA, and the value at (−B,2A)(-B, 2A) is AB2−2AB2+4A2C=A(4AC−B2)AB^2 - 2AB^2 + 4A^2C = A(4AC - B^2), which has the opposite sign. If A=0A = 0, then B≠0B \ne 0, and on the line y=1y = 1 the value Bx+CBx + C takes every real number. ■\blacksquare

∎

So when B2−4AC<0B^2 - 4AC \lt 0 the quadratic part grows in every direction, and the curve is bounded: an ellipse, a point or nothing. When B2−4AC>0B^2 - 4AC > 0 the quadratic part is zero along two directions — the asymptotes of a hyperbola, or the two lines of a degenerate case. The borderline case B2−4AC=0B^2 - 4AC = 0 gives a parabola (or, degenerately, two parallel lines, one line or nothing). For the eccentricity family above, A=1−e2A = 1 - e^2, B=0B = 0, C=1C = 1, so B2−4AC=4(e2−1)B^2 - 4AC = 4(e^2 - 1): negative for e<1e \lt 1, zero for e=1e = 1, positive for e>1e > 1, just as it should be.

Formal mathematicsF

Conics in Lean

Mathlib has no special theory of conic sections, so everything here is done in coordinates, with real numbers. First the parabola as a locus — the distance to the focus (0, p) equals the distance |y + p| to the directrix:

parabola_focus_directrixLean 4Proved here from basic factsFormally verified
/-- **The parabola as a locus.** A point `(x, y)` is as far from the focus `(0, p)` as from
the directrix, the line `y = −p`, exactly when `x² = 4py`. The distance to the focus is
`√(x² + (y − p)²)` and the distance to the line is `|y + p|`. Squaring both (they are
non-negative), `x² + (y − p)² = (y + p)²`, which simplifies to `x² = 4py`. -/
theorem parabola_focus_directrix (p x y : ℝ) :
    √(x ^ 2 + (y - p) ^ 2) = |y + p| ↔ x ^ 2 = 4 * p * y := by
  rw [← Real.sqrt_sq_eq_abs, Real.sqrt_inj (by positivity) (by positivity)]
  constructor <;> intro h <;> nlinarith [h]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor

Next the ellipse: the focal radius formula, and then both directions of "equation if and only if the distances add up to 2a2a", following the lesson's proof:

ellipse_focal_radiusLean 4Proved here from basic factsFormally verified
/-- **The focal radius of an ellipse.** Let `0 ≤ c < a` and `b² = a² − c²`. On the ellipse
`x²/a² + y²/b² = 1`, the distance from `(x, y)` to the focus `(c, 0)` is `a − (c/a) x`.
Proof: substitute `y² = b² (1 − x²/a²)` into `(x − c)² + y²` and simplify to `(a − cx/a)²`;
since `|x| ≤ a` and `c < a`, the number `a − cx/a` is positive, so it is the square root. -/
theorem ellipse_focal_radius (a b c x y : ℝ) (ha : 0 < a) (hc : 0 ≤ c) (hca : c < a)
    (hb : b ^ 2 = a ^ 2 - c ^ 2) (h : x ^ 2 / a ^ 2 + y ^ 2 / b ^ 2 = 1) :
    √((x - c) ^ 2 + y ^ 2) = a - c / a * x := by
  have hb2 : 0 < b ^ 2 := by nlinarith
  have hb0 : b ≠ 0 := by rintro rfl; simp at hb2
  have hy : y ^ 2 = b ^ 2 - b ^ 2 * x ^ 2 / a ^ 2 := by
    have h1 : y ^ 2 / b ^ 2 = 1 - x ^ 2 / a ^ 2 := by linarith
    have h2 : y ^ 2 = b ^ 2 * (1 - x ^ 2 / a ^ 2) := by
      rw [← h1]; field_simp
    rw [h2]; ring
  have hx : x ^ 2 ≤ a ^ 2 := by
    have : y ^ 2 / b ^ 2 ≥ 0 := by positivity
    have h2 : x ^ 2 / a ^ 2 ≤ 1 := by linarith
    rwa [div_le_one (by positivity)] at h2
  have hxa : |x| ≤ a := abs_le_of_sq_le_sq hx ha.le
  have hpos : 0 ≤ a - c / a * x := by
    have h1 : c / a * x ≤ c / a * a := by
      apply mul_le_mul_of_nonneg_left (le_trans (le_abs_self x) hxa) (by positivity)
    have h2 : c / a * a = c := by field_simp
    linarith
  rw [Real.sqrt_eq_iff_mul_self_eq (by positivity) hpos]
  rw [hy, hb]
  field_simp
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
ellipse_iff_focal_sumLean 4Proved here from basic factsFormally verified
/-- **The ellipse: equation versus foci.** With `0 ≤ c < a` and `b² = a² − c²`, a point lies on
`x²/a² + y²/b² = 1` exactly when the sum of its distances to the foci `(c, 0)` and `(−c, 0)` is
`2a`. Forwards: add the two focal radii `a − cx/a` and `a + cx/a`. Backwards: if `d₁ + d₂ = 2a`,
then `d₂² − d₁² = 4cx` gives `d₂ − d₁ = 2cx/a`, so `d₁ = a − cx/a`; squaring this and
simplifying gives the equation. -/
theorem ellipse_iff_focal_sum (a b c x y : ℝ) (ha : 0 < a) (hc : 0 ≤ c) (hca : c < a)
    (hb : b ^ 2 = a ^ 2 - c ^ 2) :
    x ^ 2 / a ^ 2 + y ^ 2 / b ^ 2 = 1 ↔
      √((x - c) ^ 2 + y ^ 2) + √((x + c) ^ 2 + y ^ 2) = 2 * a := by
  constructor
  · intro h
    have h1 := ellipse_focal_radius a b c x y ha hc hca hb h
    -- The other focus: reflect the picture in the y-axis (`x ↦ −x`).
    have h2 := ellipse_focal_radius a b c (-x) y ha hc hca hb (by rw [neg_sq]; exact h)
    rw [show (-x - c) ^ 2 = (x + c) ^ 2 by ring] at h2
    rw [h1, h2]
    ring
  · intro h
    set d₁ := √((x - c) ^ 2 + y ^ 2) with hd₁
    set d₂ := √((x + c) ^ 2 + y ^ 2) with hd₂
    have hsq₁ : d₁ ^ 2 = (x - c) ^ 2 + y ^ 2 := Real.sq_sqrt (by positivity)
    have hsq₂ : d₂ ^ 2 = (x + c) ^ 2 + y ^ 2 := Real.sq_sqrt (by positivity)
    -- `d₂² − d₁² = 4cx` and `d₁ + d₂ = 2a` give `d₂ − d₁ = 2cx/a`.
    have hdiff : (d₂ - d₁) * (2 * a) = 4 * c * x := by
      rw [← h]; nlinarith [hsq₁, hsq₂]
    have hd₁' : d₁ = a - c * x / a := by
      field_simp
      nlinarith [hdiff, h]
    have key : (a - c * x / a) ^ 2 = (x - c) ^ 2 + y ^ 2 := by rw [← hd₁', hsq₁]
    have hb2 : b ^ 2 ≠ 0 := by nlinarith
    rw [hb] at hb2 ⊢
    field_simp at key ⊢
    nlinarith [key]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor

Parametrisations: (acos⁡t,bsin⁡t)(a\cos t, b\sin t) traces the ellipse, and (acosh⁡t,bsinh⁡t)(a\cosh t, b\sinh t) a branch of the hyperbola, using the identity cosh⁡2t−sinh⁡2t=1\cosh^2 t - \sinh^2 t = 1 from Mathlib:

ellipse_paramLean 4Proved here from basic factsFormally verified
/-- The point `(a cos t, b sin t)` lies on the ellipse `x²/a² + y²/b² = 1` (for `a, b ≠ 0`):
the equation becomes `cos² t + sin² t = 1`. As `t` runs from `0` to `2π` the point goes once
round the ellipse; for `a = b` it is a circle. -/
theorem ellipse_param (a b t : ℝ) (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * cos t) ^ 2 / a ^ 2 + (b * sin t) ^ 2 / b ^ 2 = 1 := by
  rw [mul_pow, mul_pow, mul_div_cancel_left₀ _ (pow_ne_zero 2 ha),
    mul_div_cancel_left₀ _ (pow_ne_zero 2 hb), cos_sq_add_sin_sq]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
cosh_sq_sub_sinh_sqLean 4Applies a library theoremFormally verified
/-- `cosh² t − sinh² t = 1`, the hyperbolic analogue of `cos² t + sin² t = 1`. Applies
Mathlib's `Real.cosh_sq_sub_sinh_sq`. (Here `cosh t = (eᵗ + e⁻ᵗ)/2`, `sinh t = (eᵗ − e⁻ᵗ)/2`.) -/
theorem cosh_sq_sub_sinh_sq (t : ℝ) : cosh t ^ 2 - sinh t ^ 2 = 1 := Real.cosh_sq_sub_sinh_sq t
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
hyperbola_paramLean 4Proved here from basic factsFormally verified
/-- The point `(a cosh t, b sinh t)` lies on the hyperbola `x²/a² − y²/b² = 1`; as `t` runs
over all real numbers it traces the right-hand branch (`cosh t ≥ 1`). This is why `cosh` and
`sinh` are called *hyperbolic* functions. -/
theorem hyperbola_param (a b t : ℝ) (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * cosh t) ^ 2 / a ^ 2 - (b * sinh t) ^ 2 / b ^ 2 = 1 := by
  rw [mul_pow, mul_pow, mul_div_cancel_left₀ _ (pow_ne_zero 2 ha),
    mul_div_cancel_left₀ _ (pow_ne_zero 2 hb), cosh_sq_sub_sinh_sq]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor

The reflective property of the parabola, in vector form. We define the dot product and the law of reflection, and prove that the reflected vertical ray points exactly at the focus. This is a different proof from the geometric one above — a calculation rather than an argument with the perpendicular bisector:

dotpLean 4Formally verified
/-- The dot product of two vectors in the plane, `(u₁, u₂) · (v₁, v₂) = u₁ v₁ + u₂ v₂`. -/
def dotp (u v : ℝ × ℝ) : ℝ := u.1 * v.1 + u.2 * v.2
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
reflectLean 4Formally verified
/-- The **law of reflection** for a direction `v` hitting a mirror whose normal vector is `n`:
the component of `v` along `n` is reversed and the rest is kept,
`reflect v n = v − (2 (v · n)/(n · n)) n`. -/
noncomputable def reflect (v n : ℝ × ℝ) : ℝ × ℝ := v - (2 * dotp v n / dotp n n) • n
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
parabola_reflectionLean 4Proved here from basic factsFormally verified
/-- **The reflective property of the parabola** `y = x²/(4p)`. At the point
`P = (x₀, x₀²/(4p))` the tangent has direction `(2p, x₀)`, so `n = (x₀, −2p)` is a normal
vector. A ray coming straight down, with direction `(0, −1)`, is reflected to the direction
`reflect (0, −1) n`. The theorem says that this reflected direction, multiplied by the positive
number `x₀²/(4p) + p` (the distance `PF`), is exactly the vector from `P` to the focus
`F = (0, p)`: every vertical ray is reflected through the focus. -/
theorem parabola_reflection (p x₀ : ℝ) (hp : p ≠ 0) :
    (x₀ ^ 2 / (4 * p) + p) • reflect (0, -1) (x₀, -2 * p) = (0, p) - (x₀, x₀ ^ 2 / (4 * p)) := by
  have hN : x₀ ^ 2 + 4 * p ^ 2 ≠ 0 := by positivity
  have hN' : x₀ * x₀ + -(2 * p) * -(2 * p) ≠ 0 := by nlinarith [sq_nonneg x₀, sq_pos_of_ne_zero hp]
  simp only [reflect, dotp, Prod.smul_mk, Prod.mk_sub_mk, smul_eq_mul, Prod.ext_iff]
  constructor
  · field_simp
    ring
  · field_simp
    ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor

Finally, second-degree equations: completing the square for a circle, and the two halves of the lemma behind the classification:

circle_complete_squareLean 4Proved here from basic factsFormally verified
/-- **Completing the square for a circle.**
`x² + y² + Dx + Ey + F = (x + D/2)² + (y + E/2)² − r²` with `r² = (D² + E²)/4 − F`. So the
equation `x² + y² + Dx + Ey + F = 0` describes a circle with centre `(−D/2, −E/2)` if `r² > 0`,
the single point `(−D/2, −E/2)` if `r² = 0`, and no points at all if `r² < 0`. -/
theorem circle_complete_square (D E F x y : ℝ) :
    x ^ 2 + y ^ 2 + D * x + E * y + F =
      (x + D / 2) ^ 2 + (y + E / 2) ^ 2 - ((D ^ 2 + E ^ 2) / 4 - F) := by
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
definite_of_discriminant_negLean 4Proved here from basic factsFormally verified
/-- **Ellipse type.** If `A > 0` and `B² − 4AC < 0`, then `Ax² + Bxy + Cy² > 0` at every point
other than the origin. Completing the square,
`4A (Ax² + Bxy + Cy²) = (2Ax + By)² + (4AC − B²) y²`, a sum of two non-negative terms that are
both zero only when `y = 0` and then `x = 0`. So the level curves `Ax² + Bxy + Cy² = k` are
bounded: ellipses, a single point, or nothing. -/
theorem definite_of_discriminant_neg (A B C x y : ℝ) (hA : 0 < A) (hdisc : B ^ 2 - 4 * A * C < 0)
    (hxy : (x, y) ≠ (0, 0)) : 0 < A * x ^ 2 + B * x * y + C * y ^ 2 := by
  have key : 4 * A * (A * x ^ 2 + B * x * y + C * y ^ 2) =
      (2 * A * x + B * y) ^ 2 + (4 * A * C - B ^ 2) * y ^ 2 := by ring
  by_cases hy : y = 0
  · have hx : x ≠ 0 := by
      intro hx; exact hxy (by rw [hx, hy])
    subst hy
    have : 0 < x ^ 2 := by positivity
    nlinarith
  · have hy2 : 0 < y ^ 2 := by positivity
    have : 0 < (4 * A * C - B ^ 2) * y ^ 2 := mul_pos (by linarith) hy2
    nlinarith [sq_nonneg (2 * A * x + B * y)]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor
indefinite_of_discriminant_posLean 4Proved here from basic factsFormally verified
/-- **Hyperbola type.** If `B² − 4AC > 0`, then `Ax² + Bxy + Cy²` takes both positive and
negative values. If `A ≠ 0`, compare the points `(1, 0)` (value `A`) and `(−B, 2A)` (value
`A (4AC − B²)`, of the opposite sign). If `A = 0`, then `B ≠ 0`, and along the line `y = 1` the
value `Bx + C` takes every real value. So the level curves are unbounded, like hyperbolas. -/
theorem indefinite_of_discriminant_pos (A B C : ℝ) (hdisc : 0 < B ^ 2 - 4 * A * C) :
    (∃ x y : ℝ, 0 < A * x ^ 2 + B * x * y + C * y ^ 2) ∧
      (∃ x y : ℝ, A * x ^ 2 + B * x * y + C * y ^ 2 < 0) := by
  by_cases hA : A = 0
  · subst hA
    have hB : B ≠ 0 := by
      intro hB; subst hB; norm_num at hdisc
    refine ⟨⟨(1 - C) / B, 1, ?_⟩, ⟨(-1 - C) / B, 1, ?_⟩⟩
    · have h1 : B * ((1 - C) / B) = 1 - C := by field_simp
      simp only [zero_mul, zero_add, mul_one, one_pow]
      rw [h1]; linarith
    · have h1 : B * ((-1 - C) / B) = -1 - C := by field_simp
      simp only [zero_mul, zero_add, mul_one, one_pow]
      rw [h1]; linarith
  · have hval : A * (-B) ^ 2 + B * (-B) * (2 * A) + C * (2 * A) ^ 2 =
        A * (4 * A * C - B ^ 2) := by ring
    rcases lt_or_gt_of_ne hA with hneg | hpos
    · refine ⟨⟨-B, 2 * A, ?_⟩, ⟨1, 0, by nlinarith⟩⟩
      rw [hval]; nlinarith
    · refine ⟨⟨1, 0, by nlinarith⟩, ⟨-B, 2 * A, ?_⟩⟩
      rw [hval]; nlinarith
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/ConicSections.leanTry it in the Lean web editor

What is not formalised: the Dandelin-sphere proof (three-dimensional geometry of spheres and cones), the reflective property of the ellipse, and the full classification theorem with rotation of axes.

ComputationC

Tracing rays and sorting equations

Ray tracing: the reflective properties of conicsPythonNumerical approximationComputationally tested
"""Ray tracing in a parabolic dish and an elliptical room.

Parabola y = x^2 / (4p): rays come straight down, hit the curve, and are
reflected by the law of reflection (reverse the component along the normal).
We find where each reflected ray crosses the axis x = 0; the theorem says it
is always the focus (0, p). Ellipse x^2/a^2 + y^2/b^2 = 1: rays leave one
focus in many directions; after one reflection we measure how far each ray
passes from the other focus, and check that the distances to the foci add up
to 2a at every point hit. Floating-point evidence for finitely many rays.
"""

import math

def reflect(v, n):
    """Reflect the direction v in a mirror with normal vector n."""
    k = 2 * (v[0] * n[0] + v[1] * n[1]) / (n[0] ** 2 + n[1] ** 2)
    return (v[0] - k * n[0], v[1] - k * n[1])

def parabola_axis_crossing(p, x0):
    """Where the vertical ray at x = x0 crosses x = 0 after reflection."""
    point = (x0, x0 * x0 / (4 * p))
    normal = (x0, -2 * p)  # perpendicular to the tangent direction (2p, x0)
    d = reflect((0.0, -1.0), normal)
    t = -point[0] / d[0]  # requires x0 != 0
    return point[1] + t * d[1]

def ellipse_hit(a, b, start, direction):
    """First point where the ray start + t*direction (t > 0) meets the ellipse."""
    (x, y), (u, v) = start, direction
    qa = (u / a) ** 2 + (v / b) ** 2
    qb = 2 * (x * u / a ** 2 + y * v / b ** 2)
    qc = (x / a) ** 2 + (y / b) ** 2 - 1
    t = (-qb + math.sqrt(qb * qb - 4 * qa * qc)) / (2 * qa)
    return (x + t * u, y + t * v)

def distance_to_line(point, start, direction):
    """Distance from a point to the line through start with this direction."""
    dx, dy = point[0] - start[0], point[1] - start[1]
    return abs(dx * direction[1] - dy * direction[0]) / math.hypot(*direction)

def main():
    p = 1.0
    print(f"Parabola y = x^2/4, focus (0, {p:g}): reflected vertical rays cross")
    worst = 0.0
    for x0 in (-4, -3, -2, -1, 0.5, 1, 2, 3, 4):
        y = parabola_axis_crossing(p, x0)
        worst = max(worst, abs(y - p))
        print(f"  ray at x = {x0:4g} crosses the axis at y = {y:.15f}")
    print(f"  largest miss: {worst:.1e}")
    a, b = 5.0, 3.0
    c = math.sqrt(a * a - b * b)
    f1, f2 = (-c, 0.0), (c, 0.0)
    miss = sum_err = 0.0
    for k in range(12):
        angle = 2 * math.pi * (k + 0.5) / 12
        hit = ellipse_hit(a, b, f1, (math.cos(angle), math.sin(angle)))
        normal = (hit[0] / a ** 2, hit[1] / b ** 2)
        out = reflect((hit[0] - f1[0], hit[1] - f1[1]), normal)
        miss = max(miss, distance_to_line(f2, hit, out))
        sum_err = max(sum_err, abs(math.dist(hit, f1) + math.dist(hit, f2) - 2 * a))
    print("Ellipse x^2/25 + y^2/9 = 1, foci (-4, 0) and (4, 0), 12 rays from")
    print(f"(-4, 0): largest distance of a reflected ray from (4, 0): {miss:.1e}")
    print(f"  largest error in PF1 + PF2 = 2a = 10 at the points hit: "
          f"{sum_err:.1e}")
    print()
    print("Epistemic status: numerical evidence. Each ray is traced in floating")
    print("point, so 'through the focus' means within about 1e-15; only 21 rays")
    print("were traced. The reflective properties are theorems proved in the")
    print("lesson (and, for the parabola, checked in Lean).")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Every reflected ray passes through the focus, to within rounding error. That is numerical evidence for 2121 rays; the theorems cover them all.

Next, a classifier for second-degree equations. It uses the discriminant B2−4ACB^2 - 4AC together with a determinant that detects the degenerate cases, all in exact integer arithmetic:

Which curve is this second-degree equation?PythonExact computationExhaustive finite checkComputationally tested
"""Classify second-degree equations Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.

Uses three integer invariants: the discriminant B^2 - 4AC of the quadratic
part, the determinant of the 3 x 3 symmetric matrix of the equation (zero
exactly for degenerate cases such as pairs of lines), and, for degenerate
parabolic cases, a 2 x 2 invariant that separates parallel lines, a double
line and the empty set. Everything is exact integer arithmetic. We classify
some famous examples and then every equation with coefficients from -2 to 2.
"""

import itertools
from collections import Counter

def det3(m):
    """Determinant of a 3 x 3 matrix given as a list of rows."""
    (a, b, c), (d, e, f), (g, h, i) = m
    return a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g)

def classify(A, B, C, D, E, F):
    """Name the set of real solutions of Ax^2+Bxy+Cy^2+Dx+Ey+F = 0.

    Works with twice the symmetric matrix, so every entry is an integer.
    """
    if A == B == C == 0:
        raise ValueError("not a second-degree equation")
    disc = B * B - 4 * A * C
    delta = det3([[2 * A, B, D], [B, 2 * C, E], [D, E, 2 * F]])
    if delta != 0:
        if disc < 0:
            if (A + C) * delta > 0:
                return "empty"
            return "circle" if A == C and B == 0 else "ellipse"
        return "parabola" if disc == 0 else "hyperbola"
    if disc < 0:
        return "point"
    if disc > 0:
        return "two crossing lines"
    k = (4 * A * F - D * D) + (4 * C * F - E * E)
    if k < 0:
        return "two parallel lines"
    return "one line" if k == 0 else "empty"

EXAMPLES = [
    ("x^2 + y^2 - 2x + 4y + 1 = 0", (1, 0, 1, -2, 4, 1)),
    ("3x^2 + 2xy + 3y^2 - 8 = 0", (3, 2, 3, 0, 0, -8)),
    ("x^2 - 4y = 0", (1, 0, 0, 0, -4, 0)),
    ("xy - 1 = 0", (0, 1, 0, 0, 0, -1)),
    ("x^2 + y^2 + 1 = 0", (1, 0, 1, 0, 0, 1)),
    ("x^2 + y^2 = 0", (1, 0, 1, 0, 0, 0)),
    ("x^2 - y^2 = 0", (1, 0, -1, 0, 0, 0)),
    ("x^2 - 1 = 0", (1, 0, 0, 0, 0, -1)),
    ("x^2 - 2xy + y^2 = 0", (1, -2, 1, 0, 0, 0)),
    ("x^2 + 1 = 0", (1, 0, 0, 0, 0, 1)),
]

def main():
    print("Named examples:")
    for text, coeffs in EXAMPLES:
        print(f"  {text:<30} {classify(*coeffs)}")
    counts = Counter()
    for coeffs in itertools.product(range(-2, 3), repeat=6):
        if coeffs[:3] != (0, 0, 0):
            counts[classify(*coeffs)] += 1
    total = sum(counts.values())
    print(f"All {total} equations with coefficients in -2..2:")
    for name, n in counts.most_common():
        print(f"  {name:<20} {n:6d}  ({100 * n / total:4.1f}%)")
    print("Parabolas need B^2 = 4AC exactly, a borderline case, so they are")
    print("rare; a random small change turns one into an ellipse or hyperbola.")
    print()
    print("Epistemic status: exact integer computation of the standard")
    print("classification by invariants. The classification itself (that")
    print("these invariants decide the type) is a theorem explained in the")
    print("lesson; this program applies it, it does not prove it.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The named examples include all the degenerate cases from the classification theorem. Among all equations with small integer coefficients, parabolas are rare: they need B2=4ACB^2 = 4AC exactly, a single equation among the coefficients, while ellipses and hyperbolas are defined by inequalities. The program applies the classification exactly, but it does not prove that the classification is right — that is the job of the theorem.

Explore

Explore: one family of curves

In polar coordinates, with a focus at the origin, every conic has the equation r=ℓ1+ecos⁡θr = \dfrac{\ell}{1 + e\cos\theta}. Move the eccentricity ee from 00 (a circle) through values below 11 (ellipses that stretch out), to exactly 11 (a parabola), and beyond (hyperbolas, whose second branch appears as rr becomes negative). This one formula is also how astronomers describe orbits.

Eccentricity decides the shape

Each angle θ gives a distance r from the origin.

focus
  • r = ℓ/(1 + e cos θ)
  • (0.242, 0.242) · r = 0.342

Now the two-focus description. Change aa and bb and watch the foci (±a2−b2,0)(\pm\sqrt{a^2 - b^2}, 0) move: when b=ab = a they meet at the centre and the ellipse is a circle.

An ellipse and its foci

A point moves along the curve as t changes: x and y are both functions of t.

F₁F₂
  • (a cos t, b sin t)
  • (3.536, 2.121)

And a hyperbola with its asymptotes y=±baxy = \pm\tfrac{b}{a}x. Both branches hug the asymptotes far from the centre.

A hyperbola and its asymptotes

A point moves along the curve as t changes: x and y are both functions of t.

F₁F₂
  • right branch
  • left branch
  • y = (b/a) x
  • y = −(b/a) x
  • (5.006, −3.184)
  • (−5.006, −3.184)
  • (−2.813, −1.875)
  • (−2.813, 1.875)
Exercises

Exercises

1. Conic sections

Warm-upHuman

The parabola x2=12yx^2 = 12y has its focus at (0,p)(0, p). What is pp?

2. Conic sections

Warm-upHuman

For every point PP on the ellipse x249+y224=1\dfrac{x^2}{49} + \dfrac{y^2}{24} = 1, what is PF1+PF2PF_1 + PF_2, the sum of the distances to the two foci?

3. Conic sections

CoreHuman

The ellipse 16x2+25y2=40016x^2 + 25y^2 = 400 has foci at (±c,0)(\pm c, 0). Find cc.

4. Conic sections

CoreHuman

The hyperbola x29−y216=1\dfrac{x^2}{9} - \dfrac{y^2}{16} = 1 has foci at (±c,0)(\pm c, 0). Find cc.

5. Conic sections

CoreHuman

The equation 2x2+3xy+y2+x−5=02x^2 + 3xy + y^2 + x - 5 = 0 describes a non-degenerate conic. Which one?

Choose one

6. Conic sections

CoreHuman

The equation x2+y2−6x+8y=0x^2 + y^2 - 6x + 8y = 0 describes a circle. What is its radius?

7. Conic sections

StretchHuman

Which of these equations describe something other than an ellipse, parabola or hyperbola? (Choose all that apply.)

Choose all that apply

8. Conic sections

StretchHuman

In the proof of the reflective property of the parabola, DD is the foot of the perpendicular from PP to the directrix, and the tangent tt at PP is the perpendicular bisector of FDFD. Why does this show that the reflected ray passes through FF?

Choose one

9. Conic sections

StretchFormal

Which Lean statement correctly says that (x,y)(x, y) is equidistant from the focus (0,p)(0, p) and the directrix y=−py = -p exactly when x2=4pyx^2 = 4py?

Choose one

10. Conic sections

StretchComputational

Write ellipse_foci(a, b) returning the two foci of the ellipse x2a2+y2b2=1\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1 (with a,b>0a, b > 0) as a sorted list of two (x, y) tuples of floats. Careful: the major axis is horizontal only when a≥ba \ge b!

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

Common misconceptions

Misconception

"A parabola is half of a hyperbola", or "a parabola eventually becomes straight". A parabola has one piece and no asymptotes: its slope grows without bound, and the gap between y=x2/4y = x^2/4 and any line y=mx+ky = mx + k tends to infinity. A hyperbola has two branches, each approaching two straight asymptotes.

Misconception

"Every second-degree equation describes a curve." Some describe a single point (x2+y2=0x^2 + y^2 = 0), a pair of lines (x2−y2=0x^2 - y^2 = 0), one line ((x−y)2=0(x - y)^2 = 0), or nothing at all (x2+y2+1=0x^2 + y^2 + 1 = 0). Apart from the empty set, these degenerate cases are also plane sections: of a cone through its tip, or (for parallel lines) of a cylinder.

Misconception

"The foci lie on the ellipse." The foci are inside the ellipse, on the major axis, at distance c=a2−b2c = \sqrt{a^2 - b^2} from the centre. For a hyperbola they are inside the two branches, at distance c=a2+b2c = \sqrt{a^2 + b^2}.

Misconception

"c2=a2−b2c^2 = a^2 - b^2 for every conic." For an ellipse c2=a2−b2c^2 = a^2 - b^2, but for a hyperbola c2=a2+b2c^2 = a^2 + b^2. The foci of a hyperbola are further from the centre than its vertices.

Misconception

"Eccentricity measures size." It measures shape: all circles have e=0e = 0 and all parabolas e=1e = 1, whatever their size. Scaling a conic does not change ee.

ViewpointsH

Many ways of seeing

Geometry— One curve in the projective plane

Add to the plane a "line at infinity", one point for each family of parallel lines; this is the projective plane (see projective geometry). There, ellipses, parabolas and hyperbolas become a single kind of curve, differing only in how they meet the line at infinity: an ellipse misses it, a parabola touches it at one point (the direction of its axis), and a hyperbola crosses it at two points (the directions of its asymptotes). This is why a projection — a shadow cast from a point light — can turn one conic into another: the shadow of a circular lampshade on a wall can be a hyperbola. Pascal's theorem (1640) states that the three intersection points of opposite sides of any hexagon inscribed in a conic lie on a line, and it holds for all conics at once.

Physics— Orbits

Kepler's first law (1609) says that planets move on ellipses with the Sun at one focus. Newton showed in the Principia (1687) that an inverse-square force of attraction produces exactly conic orbits: in polar coordinates centred at the Sun, the orbit is r=ℓ/(1+ecos⁡θ)r = \ell/(1 + e\cos\theta). Planets and periodic comets have e<1e \lt 1; an object with exactly the escape energy would follow a parabola; faster ones, such as interstellar visitors and spacecraft on fly-bys, follow hyperbolas. The eccentricity is determined by the energy and angular momentum. See classical mechanics.

Number theory— Rational and integer points on conics

Which points of a conic have rational coordinates? On the circle x2+y2=1x^2 + y^2 = 1, every line through (−1,0)(-1, 0) with rational slope tt meets the circle again at the rational point (1−t21+t2,2t1+t2)\left(\frac{1 - t^2}{1 + t^2}, \frac{2t}{1 + t^2}\right), and every rational point arises this way. Clearing denominators gives all Pythagorean triples, such as (3,4,5)(3, 4, 5) from t=12t = \tfrac12. Integer points are subtler: the hyperbola x2−2y2=1x^2 - 2y^2 = 1 (a Pell equation) has infinitely many, (3,2),(17,12),(99,70),…(3, 2), (17, 12), (99, 70), \ldots, studied by Brahmagupta in the 7th century and solved in general by the chakravala method, described by Jayadeva and by Bhāskara II (11th–12th centuries). See number theory.

Algebra— Quadratic forms and symmetric matrices

The quadratic part Ax2+Bxy+Cy2Ax^2 + Bxy + Cy^2 is (xy)(AB/2B/2C)(xy)\begin{pmatrix} x & y \end{pmatrix}\begin{pmatrix} A & B/2 \\ B/2 & C \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix}. Its determinant is AC−B2/4=−14(B2−4AC)AC - B^2/4 = -\tfrac14(B^2 - 4AC), so the discriminant is the determinant in disguise. Rotating the axes to remove the xyxy term is diagonalising this symmetric matrix: its eigenvalues are the coefficients in the rotated equation, and an ellipse, parabola or hyperbola corresponds to eigenvalues of equal sign, a zero eigenvalue, or opposite signs. In three variables the same algebra classifies quadric surfaces: ellipsoids, paraboloids and hyperboloids. See linear algebra.

Wonder Trails

Wonder Trails

History & global context

History and global context

  • Discovery. According to later Greek sources, Menaechmus (4th century BCE) discovered the conic sections while trying to double the cube (to construct a length xx with x3=2x^3 = 2): the intersection of two parabolas, or of a parabola and a hyperbola, solves the problem.
  • Apollonius of Perga (around 200 BCE) wrote the Conics in eight books, showing that all three curves arise from a single double cone and giving them their names ellipse, parabola and hyperbola. Diocles proved the focal property of the parabola in On Burning Mirrors, and Pappus of Alexandria (4th century CE) stated the focus–directrix property.
  • The Islamic world. Ibn Sahl (around 984, Baghdad) designed lenses and burning mirrors with conic profiles and stated the law of refraction; Ibn al-Haytham studied parabolic mirrors. ʿUmar al-Khayyām (around 1070) solved every type of cubic equation geometrically by intersecting conics.
  • India. Brahmagupta (7th century) and Bhāskara II (12th century) solved equations such as x2−Ny2=1x^2 - Ny^2 = 1, whose solutions are the integer points on hyperbolas.
  • Europe. Kepler introduced the word focus (Latin for "hearth") in 1604 and discovered elliptical orbits; René Descartes and Pierre de Fermat described conics by second-degree equations in the 1630s; Girard Desargues and Blaise Pascal began their projective study; Newton derived conic orbits from the law of gravitation (1687); Dandelin found his spheres in 1822.
Further reading

Further reading

  • Keith Kendig, Conics (2005) — a beautifully illustrated tour from Apollonius to projective and complex conics.
  • David Hilbert and Stephan Cohn-Vossen, Geometry and the Imagination (1932; English translation 1952) — chapter 1 includes the Dandelin spheres.
  • Tom M. Apostol, Calculus, Volume 1 (1967) — conic sections, their polar equations and their use in Kepler's laws.
  • H. S. M. Coxeter, Introduction to Geometry (1961) — conics in Euclidean and projective geometry.