Why Does Slicing a Cone Give an Ellipse?

The intersection of the pink plane with the blue cone is an ellipse (shaded orange when y > 0 and brown when y < 0). The length of either red line added to the length of either yellow line is constant. 

Currently my favorite YouTube channel is “3Blue1Brown“, created by Grant Sanderson.

With excellent visuals and high production quality, Grant both shows and explains mathematics in a way that truly displays its beauty and intrigue, as well giving deep insight to those learning the subject. His 3Blue1Brown videos are also great starting points for further exploration.

I would like to write blog posts where I delve into the mathematical details found in some of these videos. For each such post, I will then make my own YouTube video on my channel, BillKinneyMath, where I explain some of these details while using the computer algebra program Mathematica to illustrate them. This is one of my favorite types of things to do, and I thank God for giving me the opportunity to do it.

This is the first of these posts. In it, I look at the details of a video Grant posted on August 1, 2018, titled “Ever wondered why slicing a cone gives an ellipse? It’s wonderfully clever!“, which is embedded below. Grant takes a geometric approach to the problem (briefly described below). I want to look at the problem from the perspective of analytic geometry — i.e., I want to use coordinates and equations. This ends up being more complicated than the purely geometric approach, but I think the complication is worth it as a way to double-check the geometric reasoning. It is also necessary for the Mathematica programming of appropriate visuals.

My YouTube video getting into both the mathematical and the Mathematica details is embedded next.

Mathematica Demonstration of the 3Blue1Brown Video on Ellipses as Conic Sections (Dandelin Spheres)

The goal of these videos, as well as this post, is to understand why the definition of an ellipse as a “conic section” (the intersection of a certain plane with a cone) is the same as the “sum of distances” definition (the locus of points, the sum of whose distances to two points (foci) is constant).

Grant uses an ingenious method, developed by Germinal Pierre Dandelin, involving the use of so-called Dandelin spheres. These are spheres inside the cone that are tangent both to the cone and to the plane that is intersecting the cone. One Dandelin sphere is above the plane, and the other is below it. The points of tangency between the spheres and the plane turn out to be the foci of the ellipse that is the intersection of the cone and the plane.

If we are going to understand this and be able to deal with the resulting algebra, it might be best to use a standard problem-solving technique: solve a simpler problem first.

A Simpler Problem: Lower the Dimension

Grant’s video on this subject is full of beautiful visuals showing cones, spheres, planes, ellipses, and lines in three dimensions. To help us “warm up” to this in relation to Dandelin spheres, we consider the analogous situation in two dimensions. The goal is not to prove the equivalence of the conic section and locus of points definitions of an ellipse. Rather, it is a warm up with regard to understanding how to represent the problem analytically. It will also help to solve the three-dimensional problem because we will essentially be looking at a two-dimensional “slice” of that problem.

The analog of a cone in two dimensions is just an upside-down “V-shape”, the analog of a sphere is a circle, and the analog of a plane is a line. It will also be simplest to put the vertex of the cone at the origin and situate the cone to be symmetric with respect to the vertical axis. The two-dimensional picture that corresponds to the three-dimensional visuals in Grant’s video is shown below. It will be beneficial to label the horizontal axis with x and the vertical axis with z.

The blue inverted ‘V’ shape is a two-dimensional ‘cone’, the red line is a two-dimensional ‘plane’, the green circles are two-dimensional ‘spheres’, the orange dots represent the points of tangency of the circles to the ‘cone’, and the pink (magenta) dots represent the points of tangency of the circles to the ‘cone cutting; red line. The points touching the blue lines become circles around the three-dimensional cone, and the points touching the red line stay points in the three-dimensional situation.

The algebra we are about to do will get complicated and will involve using the quadratic formula multiple times. To keep things as simple as possible, let us assume that the blue lines have slopes \pm 1, making their equations be z=\pm x (or just z=-|x| as the graph of one function). On the other hand, we will allow for the red line to have an arbitrary slope 0<m<1 and an arbitrary z-intercept b<0 (take note of the sign of b). The equation of the red line under these conditions is then z=mx+b.

The equations of the green circles will both be of the form x^{2}+(z+k)^{2}=r^{2} for some k,r>0. The smaller circle on the top will have smaller values for both k and r than the bigger circle on the bottom.

Our main goals are: 1) to determine how k and r are related so that the green circles are tangent to the blue lines (we will determine k as a function of r), 2) to determine how the points of intersection of the green circles and the blue lines depend on r, 3) to determine how r, for both circles, depends on m and b so that both circles are tangent to the red line, and 4) to determine how the points of tangency of the green circles with the red line depend on m and b.

The equation x^{2}+(z+k)^{2}=r^{2} of the circles can be solved for z as two functions of x to get z=-k\pm \sqrt{r^{2}-x^{2}}. For the purpose of finding the points of tangency with the blue lines, it will be sufficient to use the upper half of each circle, so z=-k+\sqrt{r^{2}-x^{2}}.

If we set z=x to find an intersection point with the left-most blue line, then after adding k to both sides and squaring, we get (x+k)^{2}=r^{2}-x^{2}, so that 2x^{2}+2kx+(k^{2}-r^{2})=0. The quadratic formula now tells us that x=\frac{-2k\pm \sqrt{4k^{2}-8(k^{2}-r^{2})}}{4}=-\frac{k}{2}\pm \frac{1}{2}\sqrt{2r^{2}-k^{2}}.

On the other hand, setting z=-x to find an intersection point with the right-most blue line results in the equation (-x+k)^{2}=r^{2}-x^{2} so that 2x^{2}-2kx+(k^{2}-r^{2})=0 and x=\frac{2k\pm \sqrt{4k^{2}-8(k^{2}-r^{2})}}{4}=\frac{k}{2}\pm \frac{1}{2}\sqrt{2r^{2}-k^{2}}.

In both cases, we get two real solutions when 2r^{2}-k^{2}>0 and one real solution when 2r^{2}-k^{2}=0 \Longleftrightarrow k^{2}=2r^{2}. It is this second case that results in having points of tangency with the blue lines. In this case, the x-coordinates of these intersection points simplifies to x=\pm \frac{k}{2}.

There are infinitely many circles that satisfy the condition k^{2}=2r^{2}\Longleftrightarrow k=\sqrt{2}r for r>0 (all those with equation of the form x^{2}+(z+\sqrt{2}r)^{2}=r^{2}). We are seeking just two circles from this infinite family: those that are also tangent to the red line.

For such a circle, if we set z=-k\pm\sqrt{r^{2}-x^{2}}=-\sqrt{2}r\pm\sqrt{r^{2}-x^{2}} equal to z=mx+b, we can solve for x to obtain the points of tangency between the circles and the red line.

The equation to solve can be written as mx+(b+\sqrt{2}r)=\pm \sqrt{r^{2}-x^{2}}. After squaring both sides, we get m^{2}x^{2}+2m(b+\sqrt{2}r)x+b^{2}+2\sqrt{2}br+2r^{2}=r^{2}-x^{2}. This can then be rearranged to (m^{2}+1)x^{2}+2m(b+\sqrt{2}r)x+(b^{2}+2\sqrt{2}br+r^{2})=0.

Using the quadratic formula here gives:

x=\frac{-bm-\sqrt{2}mr\pm \sqrt{-b^{2}-2\sqrt{2}br-r^{2}+m^{2}r^{2}}}{m^{2}+1}.

There will therefore be exactly one point of tangency for each circle when -b^{2}-2\sqrt{2}br-r^{2}+m^{2}r^{2}=0\Longleftrightarrow (m^{2}-1)r^{2}-2\sqrt{2}br-b^{2}=0. If we think of m and b as given, we can solve this equation for the required radius r with the quadratic formula yet again to get

r=\frac{\sqrt{2}b\pm b\sqrt{m^{2}+1}}{m^{2}-1}=\frac{(\sqrt{2}\pm\sqrt{m^{2}+1})(-b)}{1-m^{2}} (again, where b<0 and 0<m<1).

Since -b>0 and 0<m<1, it follows that 1<\sqrt{m^{2}+1}<\sqrt{2} and 1-m^{2}>0 so that both solutions for r are positive. The value r=\frac{(\sqrt{2}+\sqrt{m^{2}+1})(-b)}{1-m^{2}} is the radius of the larger (lower) circle and the value r=\frac{(\sqrt{2}-\sqrt{m^{2}+1})(-b)}{1-m^{2}} is the radius of the smaller (upper) circle.

Based on what we found above, we can then also say that the x-coordinates of the points of intersection of the green circles and blue lines are x=\pm\frac{k}{2}=\pm\frac{r}{\sqrt{2}}=\pm\frac{(\sqrt{2}+\sqrt{m^{2}+1})(-b)}{\sqrt{2}(1-m^{2})} for the large circle and x=\pm\frac{k}{2}=\pm\frac{r}{\sqrt{2}}=\pm\frac{(\sqrt{2}-\sqrt{m^{2}+1})(-b)}{\sqrt{2}(1-m^{2})} for the small circle.

We can also find the points of intersection between the red and blue lines. Setting mx+b=x gives x=\frac{b}{1-m}<0 as the x-coordinate of the crossing point with the left-most blue line. Setting mx+b=-x gives x=-\frac{b}{m+1}>0 as the x-coordinate of the crossing point with the right-most blue line. The coordinates themselves are (x,z)=\left(\frac{b}{1-m},\frac{b}{1-m}\right) and (x,z)=\left(-\frac{b}{m+1},\frac{b}{m+1}\right), respectively.

Generalizing to Three Dimensions

Because the two-dimensional picture is a vertical slice of the three-dimensional picture where y=0, everything we have done in the previous section is valid if we assume that our cone has equation z=-\sqrt{x^{2}+y^{2}} (which reduces to z=-|x| when y=0), our spheres have equations of the form x^{2}+y^{2}+(z+k)^{2}=r^{2} (which reduces to x^{2}+(z+k)^{2}=r^{2} when y=0), and our plane has equation z=mx+b, just as before, but now we allow y to be anything (so the line becomes a plane). Any given plane slicing such a cone at a slope between 0 and 1 can be thought of in such a way by an appropriate change of coordinates.

The x-coordinates and z-coordinates of all the orange and pink points of tangency in the three-dimensional picture are all the same as in the two-dimensional picture. Their y-coordinates in three dimensions are all zero.

The only analytic representation that is truly “new” in three-dimensions is how we represent the ellipse of intersection between the plane and the cone. The y=0 slice of this ellipse in three dimensions consists of the two black points in the two-dimensional picture. But this would need to be “rotated” (almost) in some way to form the ellipse we seek.

What is probably best is to construct a parametric representation of the ellipse. One way to do so would be to try to solve the equation -\sqrt{x^{2}+y^{2}}=mx+b for y as two functions of x. Squaring both sides, rearranging, and using the quadratic formula yields the answers y=\pm\sqrt{(m^{2}-1)x^{2}+2bmx+b^{2}}. This then gives the following parameterizations: (x,y,z)=(x,\pm\sqrt{(m^{2}-1)x^{2}+2bmx+b^{2}},mx+b). The plus sign corresponds to a parameterization where y\geq 0 and the minus sign corresponds to a parameterization where y\leq 0. For both parameterizations, we have \frac{b}{1-m}\leq x\leq -\frac{b}{1+m}, which are the x-coordinates of the black dots in the two-dimensional picture.

What are the coordinates of the foci? From the two-dimensional picture, use the coordinates of the pink intersection points of the green circles and the red lines to help, then just set the y-coordinates equal to zero.

(x,y,z)=\left(\frac{-mb-m^{3}b+m\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1},0,\frac{-b-bm^{2}+m^{2}\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1}\right)

and

(x,y,z)=\left(\frac{-mb-m^{3}b-m\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1},0,\frac{-b-bm^{2}-m^{2}\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1}\right)

What’s left to do? It would be good enough to just consider one half of the ellipse, say where y\geq 0. The other half would be similar. We would need to show that the distance from \left(\frac{-mb-m^{3}b+m\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1},0,\frac{-b-bm^{2}+m^{2}\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1}\right) to (x,\sqrt{(m^{2}-1)x^{2}+2bmx+b^{2}},mx+b) plus the distance from \left(\frac{-mb-m^{3}b-m\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1},0,\frac{-b-bm^{2}-m^{2}\sqrt{2b^{2}(m^{2}+1)}}{m^{4}-1}\right) to (x,\sqrt{(m^{2}-1)x^{2}+2bmx+b^{2}},mx+b) is constant (independent of x).

Suffice it to say that this is one big mess to do symbolically. I think we will all be happy to confirm it graphically using technology. This is what I do near the end of my video embedded above.

For any given values of m and b, I graph the resulting function of x and see that it is a horizontal line (constant function). In other words, the sum of distances is independent of x, which is what we want to show.