Real algebraic curves toy

Grab the red dots and play around! Or jump to the explanation, or try this.


Explanation

Pick a basis of N polynomials , and consider the curves in the plane given by the zero sets of their linear combinations,

\begin{align} f(x,y) = \sum_{i=1}^N c_i\, p_i(x,y) = 0 . \end{align}

Rescaling all the ’s by the same nonzero number doesn’t change the curve, so there are really only free parameters. Requiring the curve to pass through a point gives one linear equation on the ’s. So, points in general position determine exactly one curve in the family.

There’s a slick way to write down that curve: it is

\begin{align} \label{eq:sysdet} f(x,y) = \det \begin{pmatrix} p_1(x,y) & p_2(x,y) & \cdots & p_N(x,y) \\ p_1(x_1,y_1) & p_2(x_1,y_1) & \cdots & p_N(x_1,y_1) \\ \vdots & \vdots & \ddots & \vdots \\ p_1(x_{N-1},y_{N-1}) & p_2(x_{N-1},y_{N-1}) & \cdots & p_N(x_{N-1},y_{N-1}) \end{pmatrix} . \end{align}

Expanding along the first row shows this is a linear combination of the ’s. And if you plug in , two rows are equal, so the determinant vanishes: the curve passes through every point. If the points are not in general position, every cofactor vanishes, and there’s no unique curve (the toy will tell you).

As you drag the points, the toy recomputes Eq. \eqref{eq:sysdet} and redraws the zero set. You can choose one of the preset families, or type in your own basis, like 1, x, y^2 - x^3.

Things to try

Circles. Three points determine a circle. Now line the three points up—what happens to the circle? (Notice the basis includes as a single element, so the “circle” is allowed to degenerate.)

Conic sections. Five points determine a conic. Find ellipses, parabolas, and hyperbolas. Can you make the hyperbola degenerate into a pair of crossing lines?

Elliptic curves. In the standard form, , there are only 2 free parameters, so two points determine the curve. Sometimes the real curve has two components (an “egg” plus an unbounded piece), and sometimes just one. Try to move the points so that the egg shrinks away to nothing, or so that it merges with the unbounded piece. In between, the curve passes through a singular curve, with a node or a cusp.

Question: In the space of point positions, where are the curves singular? To find out, check the box to view the singular locus. While you drag a point, the dashed red curves show where that point would have to be for the curve to be singular, and the red ×’s mark where the singularities would be. See below for how this works.

The singular locus

While you drag one point , the other points stay fixed. Requiring a curve to pass through those points leaves a 2-dimensional space of coefficients, so the curves through them form a pencil,

\begin{align} \lambda\, g_1(x,y) + \mu\, g_2(x,y) = 0 , \end{align}

for two particular curves through the fixed points. Dragging around just picks out the member of the pencil passing through , namely .

A generic pencil has only finitely many singular members [for plane curves of degree , there are of them over ]. So the curve becomes singular exactly when lies on one of these singular members. In other words, the singular locus for is itself a union of curves from the same family!

A member is singular at a point when and are parallel at . The toy finds the real solutions of these equations numerically (excluding the base points where ), and then draws the members of the pencil that are singular there.

Some singular points are at infinity! Think of the curves as living in the projective plane, by homogenizing to the degree of the family. In the family of circles, the “circle” through three collinear points is a line, but as a degree-2 curve it’s really that line together with the line at infinity, which is singular where the two meet. So the toy also looks for members whose (homogeneous) gradient vanishes at a point at infinity. These are drawn too, but without an ×.

Try it with conic sections: with four points fixed, the singular conics through them are the three pairs of lines through them. So the singular locus of the fifth point is the six lines joining pairs of the four fixed points—exactly where the fifth point is collinear with two others.

Acknowledgments

Thanks to Allen Knutson for the idea.

This toy makes use of JSXGraph, whose implicit curve plotter draws the zero sets.

Suggestions welcome!