In this post the I will give algorithms to give the projective normal form for smooth real and complex conic curves. My perspective is that the normal form itself is not so important as is the transformations from the original curve to and from the normal form. Particularly for conics the normal form is always but the transforms will be linear projective transforms. CITATION (original book): Barry H. Dayton (2018), A Numerical Approach to Real Algebraic Curves with the Wolfram Language. Wolfram Media, Inc. ISBN: 9781579550240. https://www.wolfram-media.com/products/dayton-algebraic-curves/
Amazon: https://a.co/d/eOn3RTP
y=
2
x
Amazon: https://a.co/d/eOn3RTP
To some extent this is an update of the material in section 7.3 in my Plane Curve Book and my Surface Story Part III (available from my website). My intention is to make this self contained for those who may not be familiar with this book or algebraic geometry in general. So I will start with an introduction to the projective plane and Mathematica’s Transformation Functions.
Our main application will be a new old perspective on parameterization. One you probably saw in a precalculus or calculus course when the sin and cosine functions were defined as parameterizing the circle. Our parameterization of a general conic,
f=+xy++x+y+
a
1
2
x
a
2
a
3
2
y
a
4
a
5
a
6
with real or complex coefficients, is to find two numerical rational functions, =(t^2+ t + )/ t + ) where the and are complex machine numbers i = 1,2 so that replacing x by y by gives f = 0. We can’t yet visualize the complex functions but we will visualize the components , using Mathematica’s ComplexPlot.
ρ
i
b
i2
b
i1
b
i0
(t^2+
d
2
d
1
d
0
b
ij
d
j
ρ
1,
ρ
2
ρ
1
ρ
2
In other words I want to solve the conic f above with numerical rational functions rather than specific numbers.
A traditional approach would be to start with simple equations, such as -3xy+2=1 and generalize those methods. However one is tempted by the integer coefficients to use exact methods which makes this into a hard problem. My approach is to start with a general f with complex machine numbers as coefficients where this is actually a simple problem, the exact cases being undesirable special cases which can be eliminated by random machine number transformations.
2
x
2
y
1. Conics in the Projective Plane
1. Conics in the Projective Plane
The proper setting for studying algebraic plane curves is the complex projective plane. But this is difficult to work with computationally so we will work mostly in the affine real plane , or sometimes the affine complex plane , with the understanding that there are also infinite points on our curves.
2
2
A simple introduction to these infinite points is in Section 1.1 of my Plane Curve Book shown above where I talk about lines. I develop an algorithm for finding the line through 2 points but note that it can be naturally extended to points with three coordinates, these are the points on the projective plane.
In[]:=
line2D[p_,q_,x_,y_]:=Module[{e1,e2,a,b,c,M},e1=Switch[Length[p],2,Append[p,1],3,p];e2=Switch[Length[q],2,Append[q,1],3,q];M={e1,e2,RandomReal[{-1,1},3]};({a,b,c}/.(Solve[M.{a,b,c}{0,0,1}][[1]])).{x,y,1}];
Example: Find the equation of the line through {2,5} and {3,1}.
In[]:=
l1=line2D[{2,5},{3,1},x,y]
Out[]=
3.30753-1.0177x-0.254425y
This can be normalized for people by
In[]:=
Expand[l1/Coefficient[l1,y]]
Out[]=
-13.+4.x+1.y
Of course we are identifying the polynomial with the actual line which is the solution set of
4x+y=13
But if we replace one or both points by triples we still get an answer
In[]:=
l2=line2D[{2,5,1},{1,-4,0},x,y]Expand[l2/Coefficient[l2,y]]
Out[]=
-1.19881+0.368865x+0.0922163y
Out[]=
-13.+4.x+1.y
This is the same answer! So for this algorithm the triple {2,5,1} is a replacement for the point {2,5} but the triple {1,-4,0} indicates that the slope of the line is -4. We will call the triples with last coordinate 0 infinite points. These could indicate slope or direction. But another observation is that for this algorithm these triples are homogeneous, that is multiplying each coordinate by the same non-zero number gives the same answer, up to constant multiple.
In[]:=
l3=line2D[{6,15,3},{-2,8,0},x,y]Expand[l3/Coefficient[l3,y]]
Out[]=
1.66543-0.51244x-0.12811y
Out[]=
-13.+4.x+1.y
Thus the projective plane consists of all triples with at least one zero coordinate modulo the relation that a non-zero multiple of a triple is equivalent to the original triple. Triples with last coordinate zero are called infinite points and points with non-zero third coordinate should be identified with the affine point where the first two coordinates are divided by the third and the the last discarded. Thus {3,7,9} corresponds to the affine point The important thing is that as long as we do not use 2 infinite points the line2D algorithm respects this equivalences. If we do apply line2D with 2 infinite points we get a constant
,.
1
3
7
9
In[]:=
line2D[{2,3,0},{3,5,0},x,y]
Out[]=
-1.42058
which indicates we have the infinite line.
I note that specifically for this post that the coordinates may be complex numbers so is a complex infinite point and, as projective points, {1+2 , 5, 3+4 } = {+,-, 1}.
{4+3I,-2-6I,0}
11
25
2
25
3
5
4
5
By conic I mean a quadratic polynomial as above where these coefficients may be exact or Mathematica machine numbers, but at least one of ,, must be non-zero. We may, especially if all coefficients are real , also use the term conic to refer to the solution set of the polynomial equation setting the polynomial to zero. But I must emphasize that a conic such as ++ 1 also has a non-trivial solution set, albeit one with no real points. Also since we are in the complex projective realm, distinctions such as parabola, hyperbola and ellipse are not meaningful. Some conic equations can be factored into two linear polynomials and the curve described is the union of these two, possibly equal, lines. We call these conics degenerate. For the rest of this post we will assume our conics are non-degenerate.
a
1
a
2
a
3
2
x
2
y
Conics also have infinite points, generally two . This is discussed in Chapter 3.3 of my Plane Curve Book above. For a general conic as above the non-zero polynomial +xy+ is called the maximal form. This can always be factored over the complex numbers into two linear factors so the curve defined by this form is the union of two, possibly the same, lines through the origin. The infinite points on these lines can be calculated by taking any non zero affine point and adding the third coordinate zero. In the case that both lines are the same we say this single infinite point has multiplicity 2. Here is a simple function without subroutines to find the infinite points of conics.
a
1
2
x
a
2
a
3
2
y
In[]:=
infiniteConicPoints2D[f_,x_,y_]:=Module[{mf,rrl,sv},mf=FromCoefficientRules[Select[CoefficientRules[f,{x,y}],Total[#[[1]]]2&],{x,y}];rrl=RandomReal[{-5,5},3].{x,y,1};sv=NSolveValues[mf==0&&RandomReal[{-1,1},3].{x,y,1}==0,{x,y},Complexes];{Append[sv[[1]],0],Append[sv[[2]],0]}];
Some examples :
In[]:=
infiniteConicPoints2D[x^2-y^2-1,x,y]
Out[]=
{{0.0525075,0.0525075,0},{-0.185204,0.185204,0}}
By homogeneity of infinite points this is equivalent to {1,1,0} and {-1,1,0} which are the well known infinite points of this hyperbola.
In[]:=
infiniteConicPoints2D[y-x^2,x,y]
Out[]=
{{0.,-3.68907,0},{0.,-3.68907,0}}
As an exception we have one double infinite point for the parabola .
We know the ordinary circle in the real plane is bounded so has no infinite points, but in the complex plane
In[]:=
icpts=infiniteConicPoints2D[x^2+y^2-1,x,y]
Out[]=
{{-1.67356-3.73743,3.73743-1.67356,0},{-1.67356+3.73743,3.73743+1.67356,0}}
So the circle has two infinite complex points. However if we were to solve the equation +=0 by guessing we would probably guess correctly {1, ± } as answers, not the results above. But remember that projective points as triples are homogeneous and working with complex points this means we can multiply by any complex non-zero number. So note
2
x
2
y
In[]:=
Chop[Expand[icpts[[1]]/icpts[[1,1]]]]
Out[]=
{1.,0.+1.,0}
so the answer given by our algorithm agrees with our guess!
Since only the maximal form is used in the calculations, the conic +=-1 which we normally think of as empty, also has these same infinite points as the complex circle.
2
x
2
y
Finally note
In[]:=
infiniteConicPoints2D[2x^2+3xy-4y^2-x+3y+2,x,y]
Out[]=
{{0.21132,0.248383,0},{0.0383162,-0.0162993,0}}
gives an quick answer to a problem that would be very difficult for high school students using the tools of College Algebra or Precalculus. But also we can find the infinite points of
In[]:=
inf2=infiniteConicPoints2D[2x^2+3xy+4y^2-x+3y+2,x,y]
Out[]=
{{-0.3566-0.590391,-0.220202+0.435171,0},{-0.3566+0.590391,-0.220202-0.435171,0}}
As above we may wish to normalize this answer
In[]:=
Expand[inf2[[1]]/inf2[[1,1]]]Expand[inf2[[2]]/inf2[[2,1]]]
Out[]=
{1.+0.,-0.375-0.599479,0.+0.}
Out[]=
{1.+0.,-0.375+0.599479,0.+0.}
2. Transformation Functions or Fractional Linear Transforms
2. Transformation Functions or Fractional Linear Transforms
Since the real and complex projective plane can be formally defined as equivalence classes of triples, given a 3×3 real or complex matrix A then since multiplication by matrices is a linear function we have for any triple p and any scalar ζ, real or complex, A(ζ p) = ζ (A p) = A p, matrix multiplication respects our equivalence relation and hence gives a well defined transformation of projective space. These transformations are called projective linear transforms are form a transformation group on projective algebraic geometry. In particular, if a projective linear transform sends a object to an object then then these objects are considered geometrically equivalent. More generally algebraic geometers consider objects under birational transformations equivalent and projective linear transforms are a special case of these. In this post the objects we are considering are conics.
As I have already mentioned working with the equivalence classes with software, or even by hand, is awkward. Fractional linear transforms on one-space are classical, already in 1990 Shreeram S. Abhyankar devoted one chapter of his famous book Algebraic Geometry for Scientists and Engineers, (AMS, 1990) to generalizing this topic to arbitrary projective spaces as an alternative to projective linear transformations allowing one to work on affine space, in our case ordered pairs. Unfortunately he did not make general use of them in his book. But I have, in my books.
Mathematica has adopted these transforms under the name TransformationFunction. Not so much for algebraic geometry but, because as I will show immediately below, these make a good platform for ordinary geometric transforms. Mathematica uses also, more in our context, the name LinearFractional Transform, in my books I follow Abhyankar in calling them fractional linear transforms using functions with names starting with flt.
Mathematica defines TransformFunction for 3×3 matrices and ordered pairs as follows, let
In[]:=
A={{,,},{,,},{,,}};A//MatrixForm
a
1
a
2
a
3
b
1
b
2
b
3
c
1
c
2
c
3
Out[]//MatrixForm=
a 1 | a 2 | a 3 |
b 1 | b 2 | b 3 |
c 1 | c 2 | c 3 |
In[]:=
TransformationFunction[A][{x,y}]
Out[]=
,
x+y+
a
1
a
2
a
3
x+y+
c
1
c
2
c
3
x+y+
b
1
b
2
b
3
x+y+
c
1
c
2
c
3
Besides the transforms we will use here this is a general formulation for more commonly known transformations. For example if the last row and column are {0,0,1}
In[]:=
AL={{,,0},{,,0},{0,0,1}};AL//MatrixForm
a
1
a
2
b
1
b
2
If this latter matrix is orthogonal, that is if its inverse exists and is its transpose, then we have an orthogonal transformation. If
we call this an affine transform
In this note we will be using these Transformation Functions as proxies for projective linear transformations. To see how this works, rather than confuse you with subscripts, I will pick a pseudo random integer matrix A of single digit integers.
Simplifying
But as a projective point this is
If z were zero this would not work. Suppose, for example our point {x,y,z}= {-88,-145,76}. Note
This is because
So what we give up by using Transformation Functions of affine points is that the domain of the transformation function does not contain the line 4 x - 4 y - 3 z = 0 as this line is sent to the infinite line. If we need to apply our transformation to points on this line we must go back to the original transformation function given my matrix multiplication of projective triples. Actually I do have an alternative in my books. First my transformation functions use the alternate form derived from my notation Fractional Linear Transformations
Then to deal with points going to the infinite line I have fltiMD[p,A]. In the example above
There are several more important things about Transformation Functions as projective linear transformations, first they are homogeneous, that is if you multiply each element of A by the same non-zero scalar one obtains the same transformation. For example for the matrix A above
Now think of A, B as arbitrary 3×3 matrices, Transposition functions compose by matrix multiplication, that is
Note as in usual function composition the right hand transformation is applied first.
The most important use of this fact is that
3. The Push Forward FLT
3. The Push Forward FLT
Transformation Functions take points to points by projective linear transformations. We are more interested in taking conics to conics by projective linear transformations. I have developed a function derived from the fractional linear transformations that takes conics, as equations, to conics. This, however, only works for invertible transformations. It is well known that given a conic g, or more generally a plane curve g, and 3×3 matrix A the set, here we revert to ordinary math notation and think of g as a set of points,
is also a curve We call this the pull back.
But when A is invertible we can take the push forward of the inverse transformation. Unfortunately there are issues dealing with the denominators that arise, we can handle this better using the projective linear transformation and converting the affine curve to homogeneous coordinates and then back. Also it is neater when we work numerically. Here is our code for plane conics
As an example we use our random matrix A and transform the parabola.
Note every point on the parabola maps to curve g by flt[{x,y},A]
We can also transform the infinite point of the parabola {0, 1, 0}
Here is the plot of the transform, the green parabola is going to the blue ellipse with the red point on g being the image of the infinite point on the parabola.
4. Normal Forms of Conics
4. Normal Forms of Conics
If we have a group of plane transformations as described above then the normal forms of a conic are a set of conics such that every conic is equivalent to a unique conic in under transformations in this group.
For example, if we consider the Euclidean group of transformations, then in my Plane Curve Book chapter 7.2, I show that a set of normal forms for real non-degenerate conics are the curves
where a,b run through all positive real numbers, that is different positive a,b give non-equivalent conics under the Euclidean Group. In my book I describe how to apply transformation functions to real non-degenerate conics to achieve a normal form, in each case coming up with a single transformation taking the original conic to its normal form. My claim is that finding this transformation is equally important to finding the normal form. Although I do not give a single algorithm doing this it would be possible to do that. I will resist the temptation since I give enough information on how to do this in my book and is well covered in other texts. Incidentally, I do not need the eigenvalue-eigenvector decomposition or the principle axis theorem to do this as is often used in this context.
For this note only I redefine
Example :
Note we are already close to our normal form. Note that the x y term is missing, this was the hard part of the Euclidean normal form algorithm. Here and in the algorithm below we might pick p to be an unimportant point since it will be sent to infinity and not show up on any affine plot.
Here is the full algorithm. It guesses that, as in the example above, we only need an affine transformation of the form
To help the reader understand this we run through this algorithm starting with
We first walk through this for the conic f2 .
We note that we already have a parabola, in this case a very large one . Our task is to make the constant term go away and the constants of x^2 and y^2 equal absolute value and opposite sign. In this example this is quite easy in general the constant terms and x terms are more complicated. But we note that we can do this by a shear matrix with three undetermined entries which need to be found.
We first find the entry b to make the coefficients of x^2 and y of equal absolute value and opposite signs.
Next we eliminate the variable x
And finally we eliminate the constant variable to get S
And finally we get our transformation matrix and display our normal form which is a constant times y - x^2
The reader is cautioned that this routine uses a random transformation of the input, so additional runs of this routine will give a different transform as output. So we save the output under a unique name.
Here are some simple examples showing that the transformation B takes a random point of the original curve to the curve y = x^2. I am assuming you have Evaluated all Initialization Cells, if not do so now. If any of the following 5 examples failed to run or do not give a correct normal form or a very small error, try evaluating those again. The values of B1,…,B5 that we will use later are saved as initiation cells. They will differ from your B.
Example 2 was done above. This is actually close to singular and hard to do accurately.
Here are some more complicated examples
5. Application: Parameterization of conics
5. Application: Parameterization of conics
Our application is that because the parabola has nice parameterizations we can parameterize any conic, real ones with t, complex ones with z.
5.1 Direct Parameterization for real conics
5.1 Direct Parameterization for real conics
For Example 1
For my Example 1 I get a complex solution so there is no problem. So I only need one parametric function
This is not quite what is meant when other people talk about a rational parameterization of the circle, they want integers or fractions as coefficients. But it works
Note here B2 is close to singular
We only get one branch, here is the other
Fortunately Mathematica will take care of this for us unlike some other plotting routines.
Example 4 :
We get only infinite zeros of the denominator so we can plot
5.2 Parameterizing real functions
5.2 Parameterizing real functions
Typically in precalculus or calculus courses the Cosine and Sine functions, in radians, are given from the point of view of parameterizing the circle.
We will see that thanks to our normal form algorithm we can get parameterizing functions for all conics. For our purposes the parameters Cos[Θ], Sin[Θ] will not work, as this parameterization does not extend to the projective plane. We need numerical rational functions.
In algebraic geometry it is well known
give parameterizations because
because the green horizontal line shows γ0^2 + σ0^2 = 1
Example 1 gives alternate functions
For example 2 we have
For Example 4 we have
Combining these functions
We don' t get zero exactly because we are working numerically but note for example
so errors are of magnitude 10^-14
5.3 ComplexPlot
5.3 ComplexPlot
The point of view of this last material leads to a way of visualizing the parameterization of complex conics. By complex conics I include finding the complex points of real conics. But first some Mathematica.
I will use Mathematica’s ComplexPlot. ComplexPlot3D will automatically plot the argument in a 3-dimensional plot but I think it is easier to read the 2D plot and the 3D plot does not given any additional information.
To review quickly, ComplexPlot here is the plot of z.
In comparison
Only the colors distinguish them!
In particular we have
One more example
5.4 Complex Conics
5.4 Complex Conics
Now we can attack complex conics. We will use ζ, ξ as the parameter functions.
For Example 1, the circle, as before
This is the same as we got before except with z instead of t as the parameter .
Note that restricting to the real axis (dotted white line} we recover our real parameterization. For example
is a point on the real circle .
Note for both components we have poles at
For the first if
which is close to {u[[1]], u[[2]], 0} which is, by homogeneity
Likewise if
which are the known complex infinite points of the circle
For Example 2
Again since this is a real conic with at least one real point, then B2 is real and the entire real line, imaginary coordinate 0 shown as dashed lines above, maps to the real conic. We see here clearly the two infinite real points as poles. It is not hard to see that the pole near -76.3259+0 maps to the infinite point {1,1,0} while the pole near -36.6258 + 0 maps to the infinite point {2,1,0}.
This time we get complex coefficients in our parameter functions .
We see a pole in the upper right hand corner of ζ3, ξ3
But something is going on near the origin so we plot again.
Both functions ζ, ξ appear to have two zeros near the origin. We can confirm.
For Example 4
As in Example 2 the complex plots are
We see no poles on the real axis (dashed white) which is consistent that the real curve is an ellipse. These plots identify infinite complex points with coordinates
consistent with poles at
-0.962536 - 2.71076 and - 0.96253 + 2.71076 in our plot .
which shows that ζ4, ξ4 are numerically functional solutions to f4 = 0.
Finally for Example 5
We check that these functions do solve f5 = 0
This is fairly small numerically, especially with the large denominator. For example
The location of the poles is
Now the infinite points of this curve are
The first coordinates here match the poles and since we only use the one coordinate in our definition of ζ5, ξ5 then these poles correspond to the infinite points of f5.
6 Further Ideas
6 Further Ideas
In my Surface Story Part III (I recommend the version on my website) I show that topologically the complex projective solution spaces of smooth conics are a topological sphere. The normal form algorithm given here is an important ingredient of the derivation, however facts on the topology of quadratic surfaces are needed.
I can also extend the ideas in this post to cubic functions, thanks to Mathematica’s implementation of Weierstrass’ famous P function. In this case the parameterizations are not rational or even analytic but are smooth. Here we get the fact, possibly first noted in the early 1800’s by Jacobi and Abel, that each solution space is topologically a torus. I actually find the topologically equivalent projective saddle surface to be a more useful model. Again the non-obvious topology is given in my Surface Story Part III and part of the construction is a normal form algorithm for cubics. As Weierstrass noted there are infinitely many such forms, in fact the normal forms can be parameterized by the j-invariant. This is already discussed in my Plane Curve Book, although not completely correctly. I hope to write up a self contained post on this in the near future.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
The normal form for complex projective conics
by Barry H Dayton
Wolfram Community, STAFF PICKS, October 19, 2023
https://community.wolfram.com/groups/-/m/t/3052341
by Barry H Dayton
Wolfram Community, STAFF PICKS, October 19, 2023
https://community.wolfram.com/groups/-/m/t/3052341