Designing Geometric Algebras - Interpolating Points

Now for an application that makes use of the fact that we can represent arbitrary shapes as GA objects. Let's start with a concrete example. We have three points which are also shown in the figure below. We want to find$y$values for other values of$x$between our three points. This is called interpolation for$x$between our known points, and extrapolation for$x$outside of our known points. In other words, we want to find a curve that reasonably interpolates our points.
$\begin{array}{}\text{(1)}& \begin{array}{rl}\left({x}_{1},{y}_{1}\right)& =\left(-3,2\right)\\ \left({x}_{2},{y}_{2}\right)& =\left(0,3\right)\\ \left({x}_{3},{y}_{3}\right)& =\left(1,1\right)\end{array}\end{array}$
Figure 1 - Blue: Points we want to interpolate.
A natural choice for a family of curves are polynomials in$x$, so we will focus on them for now but the procedure outlined in this article will work for any other family of curves too. It turns out that$N$points unique determine the coefficients of a degree$N-1$polynomial. For our example,$y={c}_{0}+{c}_{1}x+{c}_{2}{x}^{2}$is of degree two so its coefficients can be found given three points. The solution we want to find is shown below.
Figure 2 - Blue: Points we want to interpolate. Green: Second degree polynomial interpolating the points.
Representing polynomials in Geometric Algebra
In the first section we learnt that we can represent polynomials in Geometric Algebra by introducing a basis vector for each term of it, including the$y$term. For our concrete example we would have four basis vectors corresponding to$1,x,{x}^{2},y$and the up function which maps$\left(x,y\right)$points to vectors in the 4D space is
$\begin{array}{}\text{(2)}& up\left(x,y\right)=1{e}_{0}+x{e}_{1}+{x}^{2}{e}_{2}+y{e}_{3}\end{array}$
Finding the interpolating object
Now we can represent points. How do we get an object representing a curve that goes through all points? We know we can join points together to make shapes which go through all of them with the wedge product. In general we have the following equation which results in the pseudovector$p$:
$\begin{array}{}\text{(3)}& p=\underset{n=1}{\overset{N}{\bigwedge }}up\left({x}_{n},{y}_{n}\right)=\sum _{n=0}^{N-1}{p}_{n}{e}_{n}^{\ast }\end{array}$
Where$N$is the number of points. This should give us some object representing a shape that goes through all of the points that were joined.
Getting the interpolating polynomial coefficients from the object
We can examine this object by applying the Outer Product Null Space / Join Null Space equation:
$\begin{array}{}\text{(4)}& \begin{array}{rl}p\wedge up\left(x,y\right)& =\left({p}_{0}{e}_{0}^{\ast }+{p}_{1}{e}_{1}^{\ast }+{p}_{2}{e}_{2}^{\ast }+{p}_{3}{e}_{3}^{\ast }\right)\wedge \left(1{e}_{0}+x{e}_{1}+{x}^{2}{e}_{2}+y{e}_{3}\right)=\\ & ={e}_{0123}\left({p}_{0}+{p}_{1}x+{p}_{2}{x}^{2}+{p}_{3}y\right)=0\end{array}\end{array}$
To bring it into the usual form we still need to bring$y$on the other side with a coefficient of$1$. We can also get rid of the pseudoscalar${e}_{1234}$. This results in
$\begin{array}{}\text{(5)}& y=-\frac{{p}_{0}}{{p}_{3}}-\frac{{p}_{1}}{{p}_{3}}x-\frac{{p}_{2}}{{p}_{3}}{x}^{2}\end{array}$
So indeed our object represents a polynomial. In general, to get the ordinary coefficients${c}_{n}$from$p$we have
$\begin{array}{}\text{(6)}& {c}_{n}=-\frac{{p}_{n}}{{p}_{N}}\end{array}$
We can see that the coefficients of the polynomial can be directly read off of$p$'s coefficients. This is all that we needed. We wedged together some points into a pseudovector, we know that the object goes through all of our points, and from the pseudovector's coefficients we can easily get the interpolating polynomial's coefficients.
For our concrete example we have the following pseudovector for representing the polynomial
$\begin{array}{}\text{(7)}& p=up\left(-3,2\right)\wedge up\left(0,3\right)\wedge up\left(1,1\right)=36{e}_{0}^{\ast }-17{e}_{1}^{\ast }-7{e}_{2}^{\ast }-12{e}_{3}^{\ast }\end{array}$
Reading off the coefficients and dividing by$y$'s coefficient yields the interpolating polynomial equation
$\begin{array}{}\text{(8)}& y=-\frac{36}{-12}-\frac{-17}{-12}x-\frac{-7}{-12}{x}^{2}=3-\frac{17}{12}x-\frac{7}{12}{x}^{2}\end{array}$
which corresponds exactly to the green curve in the figure 2.

Algorithm Summary

To summarize the procedure, given N points$\left({x}_{n},{y}_{n}\right)$
1. We want to interpolate with a polynomial of degree$N-1$with coefficients${c}_{n}$:$y=\sum _{n=0}^{N-1}{c}_{n}{x}^{n}$
2. Use GA with N basis vectors and up function:$up\left(x,y\right)=y{e}_{N}+\sum _{n=0}^{N-1}{x}^{n}{e}_{n}$
3. Build polynomial object$p$by wedging together N up projected points:$p=\underset{n=1}{\overset{N}{\bigwedge }}up\left({x}_{n},{y}_{n}\right)$
4. Extract interpolating polynomial coefficients${c}_{n}$from$p$:${c}_{n}=-\frac{{p}_{n}}{{p}_{N}}$

Conclusion

We started by looking at what interpolation is and we chose to use polynomials for interpolation. We then applied our knowledge from the previous section to represent polynomials in Geometric Algebra. With the wedge product we constructed an object representing the interpolating polynomial from which we could just read off the coefficients.
This process generalizes to any number of points and it uses only very simple GA operations, so it might be preferable over the usual methods like using matrices or Lagrange polynomials. While we were focusing on polynomials here, this process works identically with other functions too, as no assumptions about the basis functions were made. The only change is to use a different up function.

Bonus: Different basis functions

Below I tried some different basis functions for the same three points and five points.