General method to calculate dual of a k-vector with arbitrary metric in Geometric Algebra I'm implementing a Geometric Algebra library where I hope to be able to elegantly handle degenerate metrics as well as the more common euclidean and non-euclidean metrics.  i.e. $\ e_i e_i = \{0,1,-1\}$ 
For $\ e_i e_i = \{1,-1\}$  the most common formula I've found for the dual is $ B^* = BI^{-1} $  where $ I^{-1} $ is the inverse of the psuedoscalar for the space you are working in.
From what I can tell, I need the dual to map a k-vector to a k-vector representing (spanning) it's orthogonal complement. 
A property to be preserved is $B^{**} = -B$
Which brings up my first question.  For what reason does the dual of the dual negate the k-vector it acts on?  Presumably you could have $B^{**} = B$ and also still have $B^*\perp B $
Back to the degenerate metric.  I can't use the inverse of the psuedoscalar involving a degenerate metric for example: $e_1 e_1 = 0$, $I = e_{123}$ in $ G^{2,0,1}$ since $I^{-1}$ doesn't exist in this case.  
If I were to use $B^* = BI$ or $B^* = B \rfloor I$ as I've seen in some material.  I end up with $e_1e_{123} = 0$ which is not the orthogonal complement of $e_1$ 
So what can I do?  Best I've come up with is to use difference of the indices against the psuedoscalar's to create an orthogonal k-vector.  i.e. $ e_{13} => [1,3]$ diff $[1,2,3] => [2] => e_2$  I've played around with ways of getting the sign to agree with the other definitions of the dual, but can't quite get it right.
Charles Gunn uses Poincare Duality for 3D Projective Geometric Algebra https://bivector.net/doc.html, but this doesn't fully agree with the purely euclidean dual from some quick tests I did.  Also I know very little about algebraic topology so implementing a general Poincare Map is beyond me at this point.
 A: In general, in a geometric algebra over a vector space $V$ with a degenerate metric, there is no unique dual. This is because some vectors are orthogonal to everything (by definition of degenerate); the orthogonal complement is $n$-dimensional, while a dual would give something $(n-1)$-dimensional.
One solution is to simply accept that the dual (defined as contraction with $e_1\wedge e_2\wedge\cdots\wedge e_n$) of a non-zero multivector could be zero.
Another solution is to use the dual space $V^*$ (this is a different kind of dual, often defined as the linear functions from $V$ to $\mathbb R$). If $\{e_1,e_2,\cdots,e_n\}$ is a basis for $V$, then there is a basis $\{\varepsilon_1,\varepsilon_2,\cdots,\varepsilon_n\}$ for $V^*$ satisfying
$$\varepsilon_i\cdot e_j=\delta_{ij}$$
where $\delta_{ij}$ is the Kronecker delta. We may consider this as a dot product in the $2n$-dimensional space $V\oplus V^*$. If we have a non-degenerate metric on $V$, then that determines an isomorphism of $V$ with $V^*$, and thus a non-degenerate metric on $V^*$. But if we have a degenerate metric on $V$, then the corresponding map from $V$ to $V^*$ is not invertible, so we don't get a unique metric on $V^*$ (except perhaps $\varepsilon_i\cdot\varepsilon_j=0$). But the metrics on $V$ and $V^*$ are irrelevant for what you call Poincare duality. This is a map between $k$-vectors in $V$ and $(n-k)$-vectors in $V^*$, which is simply a contraction with the $n$-blade for the other space:
$$B=\langle B\rangle_k\in G_k(V)\subset G(V)\subset G(V\oplus V^*)$$
$$B^*=\pm B\,\lrcorner\,(\varepsilon_1\wedge\varepsilon_2\wedge\cdots\wedge\varepsilon_n)$$
$$B^*=\langle B^*\rangle_{n-k}\in G_{n-k}(V^*)\subset G(V^*)\subset G(V\oplus V^*)$$
$$B=\pm B^*\,\lrcorner\,(e_1\wedge e_2\wedge\cdots\wedge e_n)$$
This contraction can be calculated by repeatedly applying the identities $(A\wedge B)\,\lrcorner\, C=A\,\lrcorner\,(B\,\lrcorner\, C)$ and $a\,\lrcorner\,(B\wedge C)=(a\,\lrcorner\, B)\wedge C+(-1)^kB\wedge(a\,\lrcorner\, C)$ where $a=\langle a\rangle_1$ and $B=\langle B\rangle_k$.
(Also note that $(\varepsilon_n\wedge\cdots\wedge\varepsilon_1)\,\lrcorner\,(e_1\wedge\cdots\wedge e_n)=\det[\varepsilon_i\cdot e_j]=1$, which is related to Gramian matrices.)
