1

In Geometric Algebra, a multivector is a combination of scalar, vector, bivector, trivector, and so on parts, depending on the dimension of the multivector. 2D multivectors are of the form $a + b\hat x + c\hat y + d\hat x\hat y$, and 3D multivectors are of the form $a + b\hat x + c\hat y + d\hat z + e\hat x\hat y + f\hat x\hat z + g\hat y\hat z + h\hat x\hat y\hat z$, and so on.

I understand that multivector duals have the corresponding "dimensions" swapped. For example, in 3D, $\hat x$ becomes $\hat y\hat z$, $\hat x\hat y$ becomes $\hat z$, scalars become $\hat x\hat y\hat z$, and in 4D, $\hat x$ becomes $\hat y\hat z\hat w$, $\hat x\hat y$ becomes $\hat z\hat w$, $\hat x\hat y\hat z$ becomes $\hat w$, scalars become $\hat x\hat y\hat z\hat w$, and so on.

The part I am missing here is how do I determine if the sign needs to be flipped? I am struggling to find information on whether new.xy = old.zw is correct, or if it should be new.xy = -old.zw, and so on. Does it depend on the relative orientations somehow, or does it depend on conventions or handedness? In 3D Euler angles it is common for rotation around the Y axis to be $zx$ instead of $xz$ to follow the right-hand rule, but I don't know if this applies to Geometric Algebra.

Additionally, I would appreciate any resources for how to compute other operations in Geometric Algebra, such as log, exp, wedge, exterior, outer, etc. Most resources I can find in online searches are written in math notation, which is difficult to implement in a programming language without knowledge of how those operations are implemented.

  • 1
    Just use the Clifford product with the highest n-vector, the volume, and the antiymmetry in order to replace squares$$ z e_3 \to z e_3 \cdot e_1 \cdots e_n= z e_3^2 \cdot e_3\cdot e_1 e_2 e_4 \cdots e_n$$ – Roland F Sep 19 '24 at 12:42
  • 1
    @RolandF Can you elaborate a lot more in an answer? What is the relation between the product and the dual? What is the volume? What is the antisymmetry? – Aaron Franke Sep 19 '24 at 13:15
  • Where have you learned GA from? Usually the dual of a multivector $X$ is defined by choosing a unit pseudoscalar $I$ and forming $XI$ (or $XI^{-1}$ or $\widetilde XI$ or... conventions differ; the latter is the Hodge star). The antisymmety Roland is referring to is $e_ie_j = -e_je_i$ when $i\ne j$ and $e_1,\dotsc,e_n$ is an orthogonal basis; this is a fundamental property of any GA. – Nicholas Todoroff Sep 19 '24 at 15:36
  • The latter part of your question (asking for code implementations) I think is off-topic for this site. – Nicholas Todoroff Sep 19 '24 at 15:36
  • @NicholasTodoroff I'm not asking for code, just asking for what the algorithm is to compute it. My question is at least as on-topic as questions like https://math.stackexchange.com/questions/2842911/how-to-perform-wedge-product and I am looking for an answer similar to that question but for the dual. – Aaron Franke Sep 19 '24 at 21:09
  • @NicholasTodoroff Also, where I learned GA from is irrelevant. As you said, since these things are definitions and are fundamental, this information is highly useful to have posted in a Q&A format on StackExchange with an explanation suitable for readers that are beginners in Geometric Algebra. – Aaron Franke Sep 19 '24 at 21:22
  • I thought you were asking for code; I agree algorithms are on topic. – Nicholas Todoroff Sep 19 '24 at 23:06
  • Where you learned GA from is extremely relevant. How do you expect anyone to help you if they don't have an idea of your knowledge base? Like I said, the dual is usually defined the way Roland describes. Their relationship is "they are literally the same thing by definition". There isn't anything else to be said unless you can give us a better idea of where you're coming from. For example, how do you know that "in 4D, $\hat x$ becomes $\hat y\hat z\hat w$"? – Nicholas Todoroff Sep 19 '24 at 23:11
  • It would also help if you could give some examples of resources that have been unhelpful to you in computing the functions you're interested in, and perhaps if you could indicate more specifically what about them was difficult so that we can point you towards resources that are better suited for you, or maybe help you to understand the resources you have. – Nicholas Todoroff Sep 19 '24 at 23:15
  • I would add that the various conventions above are just that: conventions. None is "right" and the others "wrong". – Alan Macdonald Sep 19 '24 at 23:44
  • I don't know about computing $\log$. But for $\exp$ you can use the usual power series, perhaps with reductions like $\exp(A)=(\exp(\tfrac1mA))^m$ where $m\in\mathbb N$ is chosen large enough that $\tfrac1mA$ is small enough that the power series converges quickly. Also note that $\exp(A+B)=\exp(A)\exp(B)$, provided that $AB=BA$; for example, if $B$ is a scalar. – mr_e_man Sep 20 '24 at 02:53
  • "Wedge product" and "exterior product" are synonymous. "Outer product" also means the same thing, at least in GA, but elsewhere it means the tensor product (or equivalently the matrix product $[a][b]^\top$ where $[a]$ and $[b]$ are columns), which is not part of GA. – mr_e_man Sep 20 '24 at 02:58

1 Answers1

1

I'm assuming you're using a positive-definite dot product.

Write your multivector as $A=\hat x^{s_1}\hat y^{s_2}\hat z^{s_3}\hat w^{s_4}\cdots$, where each exponent $s_i$ is either $0$ or $1$. Take the unit $n$-vector $I=\hat x\hat y\hat z\hat w\cdots$ (the product of all $n$ basis vectors, in order). The dual of $A$ is defined as $\pm AI$, where the $\pm$ sign depends only on the grade of $A$ (that is $s_1+s_2+s_3+\cdots+s_n$). If $A$ and $B$ have the same grade, then the dual of $A+B$ should be either $AI+BI$ or $-AI-BI$, depending on conventions, but never $-AI+BI$. Let's focus on the product $AI$.

We can write this in the form $AI=C=(-1)^p\hat x^{u_1}\hat y^{u_2}\hat z^{u_3}\hat w^{u_4}\cdots$ where each exponent $u_i$ is either $0$ or $1$. In fact $s_i$ and $u_i$ are complementary, so e.g. if $s_2=0$ then $u_2=1$, and if $s_2=1$ then $u_2=0$. The sign $(-1)^p$, which you were asking about, is given by

$$p=s_2+s_4+s_6+\cdots\pmod2.$$

This is based on my answer to Bivectors from a computational angle?, using the subset $T=\{1,2,\cdots,n\}$, so $t_j=1$ for all $j$.

That is, the sign should be flipped if your original multivector had $\hat y$ as a factor, it should be flipped again if it had $\hat w$, and so on, for every second basis vector.

mr_e_man
  • 5,986
  • Thank you, excellent answer! Each paragraph is great as explanation, and then the last paragraph is a great summary. As for my direct case of the dual of a 4D multivector, this means that the signs should be $1 + x - y + z - w - xy + xz - xw - yz + yw - zw - xyz + xyw - xzw + yzw + xyzw$, which matches code from https://bivector.net/ – Aaron Franke Sep 20 '24 at 20:08