Designing Geometric Algebras - Shapes

Typically we choose a Geometric Algebra that will work well with our problem. First there are the object types the different GAs can represent. If we want flat objects such as lines and planes going through the origin ordinary GA works. If we additionally want the objects to be at arbitrary positions PGA is a good choice. For spheres we can choose CGA which can directly represent them. Secondly we might need certain operations which also dictates our choice of GA. Ordinary GA has rotors that can do rotations only. With both PGA and CGA we get rotors which can do translation and rotation. Below is a table of a few already explored GAs and their properties.
NameSignatureObjectsRotors
Ordinary GAN, 0, 0Flat (through origin)Rotation
Projective Geometric AlgebraN, 0, 1FlatRotation, Translation
Conformal Geometric AlgebraN+1, 1, 0Flat, RoundRotation, Translation
Conic Geometric Algebra5, 3, 0Conics (2D)Rotation, Translation, Uniform scaling
Quadric Geometric Algebra9, 6, 0Quadrics (3D)Rotation, Translation, Uniform scaling
So if what we need is contained in one of these we can simply use them and benefit from the previous exploration done within them. What if we need something that is not contained in one of these pre-made GAs though? Is there a way to create exactly what we need? In the first part of this article we will try to figure out how to create a GA that contains the objects we want. Specifically we will try to create a GA containing arbitrary polynomial shapes such as parabolas and elliptic curves. In the second part we will also look at the rotors.

How are objects represented outside of GA?

Before jumping into GA we should take a step back and remember how we represented objects in algebra before.
Usually we represent a 2D line by the linear equationy=ax+b, a circle at the origin byx2+y2=r2and so on. Rearranging this a bit to bring everything to the same side we get equivalentlyax+by=0andx2+y2r2=0. The object is then represented by all the points(x,y)for which these equations are true, that is, for which the left hand side evaluates to zero. We call this the null space or kernel of the function.

Object representation in GA

Now jumping to GA, in 2D PGA a point is represented by a bivectorxe0y+yex0+1exyand a line is represented by a vectorxex+yeyde0. Let's call the mapping for points theupfunction:(1)up:RNCl(...)Here's a table of the previously mentioned algebras and their up functions. Note that some of these use a dual representation for points (points as pseudovectors) and some use the usual representation (points as vectors).
NameUp
Ordinary GAxex+yey+zez+...
Projective Geometric Algebraxex+yey+...+1e0
Conformal Geometric Algebra1eo+xex+yey+...+12(x2+y2+...)e
Conic Geometric Algebraeo++xex+yey+12(x2+y2)e++12(x2y2)e++xye×
Quadric Geometric Algebraxex+...+12(x2e1+...)+xye4+...+1eo1+...
How do we connect these representations to the usual null-space representation? There are two almost equivalent ways of doing this.
Inner Product Null Space Representation
The first one is the Inner Product Null Space (IPNS) representation. Here we say that the inner product of our object, let's call ito, is zero for an arbitrary point produced by our up function.(2)up(...)o=0The IPNS representation has the downside that we need to define a metric so the inner product works. This means that the representation depends on what our basis vectors square to. This also doesn't work for degenerate metrics such as the one used by PGA.
Outer Product Null Space Representation
The second representation is the Outer Product Null Space (OPNS) representation. Instead of the inner product we use the outer product which means we don't need to define a metric either and this will work the same regardless of what our basis vectors square to. We wedge our objectowith an arbitrary point produced by our up function.(3)up(...)o=0The intuition here is that if points are represented by vectors thenrepresents the join operation. If we try to join a point that already lies on the object we get zero. Note that if we're using a dual representation (points as pseudovectors) then we need to useinstead as that is then the join operation (maybe a better name would then be the Vee Product Null Space (VPNS)? Or Join Null Space (JNS) for the general case).
We will continue using OPNS from now on and apply it to recover more familiar equations for the objects.
Example: OPNS applied to PGA 2D
Let's apply the OPNS equation to see what a vector in 2D PGA represents. For the arbitraryXwe need to use a pseudovector. Theup(x,y)function gives us a pseudovector (bivector in this case) so let's use it in place ofXand remember that we need to usefor dual representations.up(x,y)vector=(xe0y+yex0+1exy)(aex+bey+de0)=ax+by+d=0We have recovered the usual equation for a line. Unlike the previous one, this one also has a coefficient forywhich makes it possible to represent vertical lines (by settingb=0we getax=d). Hence the vectors in 2D PGA represent lines.
What happens when we apply the OPNS to PGA points (pseudovectors, bivectors in 2D)?up(x,y)point=(xe0y+yex0+1exy)(ae0y+bex0+cexy)=bxe0+cxeyaye0+cyexaeybex=ey(cxa)+ex(cyb)+e0(bxay)We get three equations that have to vanish, only two of which are independent.cxa=0x=accyb=0y=bcbxay=bacay=0y=bcThe coordinates we extract get divided by theexypart of the point. We automatically get homogeneous space and projective points just by defining the up function the way we did with the constant coefficient term1exy.
As a final note, applying OPNS is like finding an inverse for the up function. For points it indeed gives the inverse mapping (ie. as if we just inverted the function directly) but the OPNS also generalizes it to apply to elements other than points in a consistent manner.

Representing polynomials in GA

Looking at how we arrived at the equation for a line from the OPNS equation we can see that the coefficientsa,b,dcame from the object whose representation we're trying to understand, but the variablesx,yand1(ford) came from how we defined theupfunction. This means that if we wanted to represent different shapes we need to change theupfunction.
As an example, if we wanted to represent parabolas, we would need to have a basis vector that hasx2as a coefficient inup. For exampleup(x,y)=x2e0y+yex0+1exywould give usax2+by+d=0after applying the OPNS equation.
Another interesting observation here is that we have a constant term in the polynomial which comes from the fact that we add a constant bivector1exyin the up function. This allows PGA to represent translated objects unlike ordinary GA which can only represent objects through the origin.
Furthermore the number of basis vectors is arbitrary. For each term we want we can simply add another basis vector with our desired coefficient. Finally as already mentioned before, the OPNS does not depend on the metric so the interpretation works regardless of what the basis vectors square to.
Example: Elliptic curves in GA
Looking at the Wikipedia article for elliptic curveswe can find that the equation for an elliptic curve isy2=x3+ax+b1. So to represent them we need 4 terms in our up function with coefficientsy2,x3,x,1. As a result we will need 4 basis vectors (with any signature).up(x,y)=x3e1+y2e2+xe3+1e4=x3e234+y2e134+xe124+1e123Vectors will now be able to represent elliptic curves as well as other simpler curves (parabolas, cubics, lines, ...). You can verify this by hand (or ideally using symbolic math software) by applying the OPNS equation to a vector as before in the 2D PGA example.

Join and meet

If points are represented by vectors the join isand meet is. In algebras that uses a dual representation for points such as PGA this is swapped and join isand meet is.
Something interesting happens when we look at the meet operation which returns the intersection object of two objects. In PGA when we intersected two straight lines we get a single point (or point at infinity if the lines are parallel). However with more complicated curves such as parabolas or elliptic curves we will get more than one intersection point. For example intersecting a parabola with a line (assuming they intersect) will result in two points. However the representation for such a point pair is identical to the representation of a single point in PGA. The difference will only be visible once we apply the OPNS equation to find out what our object is actually representing.
Example: parabola at origin intersects horizontal line
Let's apply what we have just learnt and look at some actual results to see if they make sense. We want to intersect a parabola at the origin of the formy=ax2with a horizontal line of the formy=c1. We would expect the intersection to contain 2 points (assuming they intersect).
From the two equations we see that we need the termsx2,yand1and thus we require 3 basis vectors. We'll use a dual representation (points as pseudovectors) and define our up function as followsup(x,y)=x2e1+ye2+1e3=x2e23+ye31+1e12Now curves should be represented by vectors. For our parabolapwe need thex2andybasis vectors, that ise1ande2respectively. For our linelwe will need theyand1basis vectors, that ise2ande3respectively.p=ae1e2l=e2+be3Let's look at the OPNS (using) forpto confirm it indeed represents the desired parabola.up(x,y)p=(x2e1+ye2+1e3)(ae1e2)=ax2y=0up(x,y)l=(x2e1+ye2+1e3)(e2+be3)=by=0Looks like we're good! Now we can intersect the two objects usingas that is the meet operation in the dual representation. We will call the intersection objecti.i=pl=ae12+abe13be23Now let's look at the OPNS of the intersection object to see if it gives us what we expect (two points of intersection).up(x,y)i=(x2e1+ye2+1e3)(ae12+abe13be23)=a(b+y)e1+(ax2+b)e2+b(ax2y)e3=0Now we have three vectors that need to each be equal to zero.a(b+y)=0y=b(ax2+b)=0x2=bab(ax2y)=0x2=yaThe three equations aren't independent (combining the first and third one gives the second one). So now we see that the intersection object representsx2=baandy=b. This has two solutionsx1,2=±baas expected and the solutions are the correct ones too (eg.yis just the vertical offsetbof the line).
Great, we have shown that what we learnt makes sense and can be applied without much thought required. We can even plot the solutions using a library that can plot the null space of the algebraic equations implicitly.
Example: Intersecting Elliptic Curves
Here's another fun example to demonstrate join and meet on elliptic curves.We have a dynamic black curve that interpolates between the blue and the red one using rotors which will be explained in the next part. The black curve intersected with the red curve gives the green points. The teal points oscillate around the center. Teal joined with green gives the pink curve.

Conclusion

We have learnt how to represent arbitrary polynomials using GA and that intersection and joining them works and makes sense. There are some other things that we could explore. For example nothing stops us from using more complicated up functions than polynomials and there is no reason they should not make sense anymore.
The major thing we are still missing are operations on objects such as rotation and translation for which we want rotors. For these the metric and whether we use a dual representation or not will actually matter. That will be the topic of the next section.

Next: Design of Geometric Algebras - Rotors