biVector forum

Why use dual space in PGA - R*(3,0,1) vs R(3,0,1)

Hi all! I’m just getting into GA from a robotics background and it’s fascinating. My question - why do the common libraries (and PGA cheat sheet) use the dual space formulation? These two works below both introduce homogenous points as 1-vectors, lines as 2-vectors, planes as 3-vectors in three dimensions:

I’ve found this much more intuitive for me and others I discuss with to grasp. For example a point (1,2,3) is 1e1 + 2e2 + 3e3 + e0 instead of trivectors, and the blade dimensionality increases with the thing it represents. Also that a plane is the outer product of three points vs the regressive product. Why is the dual formulation common, and am I going to run into obstacles building up R(3, 0, 1) in a library this way?

Hi, @hmartiro. Good to have you here on

It is indeed not immediately obvious from the cheat sheet why R*(3,0,1) is the correct GA for euclidean space. For that I think you might benefit from reading the SIGGRAPH course notes available here.

I’ll just briefly indicate the differences of PGA from the treatments given in the two web sites you referenced in your post:

  1. . This appears to be the vector space model. That is, it does not use homogeneous coordinates and hence is designed to deal with euclidean vector space, not euclidean space. It’s not possible in this model as far as I know to directly represent geometric primitives that do not pass through the origin, nor to represent arbitrary rigid motions, only rotations around the origin.
  2. This article uses GA to do projective geometry. It does use homogenous coordinates, since projective geometry requires them, but it does not do euclidean metric geometry. All its results (as far as I am aware) are projective results, that is, results that do not depend on the metric. The metric is used purely in order to obtain the regressive product (in this case, the meet operator). The course notes referenced above make clear that this is not necessary; all the results obtained here can be obtained (IMHO) more cleanly using a Grassmann algebra (also explained in course notes).

Finally regarding the use of the dual algebra rather than the standard one: This issue is also addressed in the course notes. The simple answer is: The euclidean world features a “plane at infinity” rather than a “point at infinity”. R(3,0,1) does not model the euclidean metric; R*(3,0,1) does. (R(3,0,1) is a different metric space that is interesting in its own right: dual euclidean space.)

One theme that runs through all of PGA is the principle of duality in projective geometry. Once you begin to understand duality, I think you may be ready to accept that just as a plane can be thought of the join of three points, a point can be seen as the meet of three planes. Neither is to be preferred a priori, it depends on the context which one takes precedence. And dimensionality also has to be rethought in terms of duality. In the dual construction, where a point is the meet of three points, the point is a 2D entity (just like the plane is a 2D entity in the standard construction.) . Just as you can think of a plane as consisting of all the points that are incident with it (a 2D extent), you can think of the point as “consisting” of all the planes that are incident with it (also a 2D extent). I agree, it is unfamiliar, but new ways of thinking are always unfamiliar – at least at first, aren’t they?

It is my experience that euclidean PGA requires a bit of mental “re-wiring” of this sort to fit into our conventional mental maps. It’s my conviction that the time and energy invested thereby will pay itself off quickly in terms of an improved conceptual and practical model for euclidean geometry.

Please continue to post any questions that arise.


Thanks for the detailed reply @cgunn3.

Reference (1) does have a homogenous coordinates section at the end where a plane is defined as P ^ Q ^ R, but does not go deep into it. For (2) I don’t know enough yet to understand the distinction.

Do the course notes explain in more detail why R(3,0,1) does not model the euclidean metric? To be clear I have read the entire PGA course notes, looking for specific sections to re-read. I feel that I have some understanding of duality and have written a library to operate in R*(3,0,1) that works. However, it intuitively feels that duality should lead to R(3,0,1) being a fine place to do PGA, for example meets/joins seem to work fine. Do motors become more complicated, or projections?

Overall I’m okay moving forward with R*(3,0,1) but IMHO it certainly adds more cognitive load to the learning curve, having to understand duality before being able to use the basic tools. One of the benefits of PGA was having a simpler and more intuitive set of rules, and in explaining to others I’ve had trouble justifying suddenly switching to the dual formulation when adding homogenous coordinates.

1 Like

I would like to add that if you enjoy watching lectures, the SIGGRAPH one by @cgunn3 and @enki is perfect: This lecture also gives the answer to your question with a lot of clarity.

1 Like

@hmartiro Adding to the excellent replies, it’s worth pointing out that if you used dual quaternions before, you were already using the dual formulation as described in the PGA cheatsheet. Consider how an affine point gets mapped to the dual quaternion space. They take on the dual unit and are thus represented as trivectors :slight_smile:. In other words, the choice to use the dual space is not a choice at all, but a requirement if you wish to represent translations as rotations in homogeneous space.

1 Like

I have a little bit of time to elaborate on my previous post to address this question a bit more directly. As mentioned, it isn’t a “choice” made and certainly, if there was a more intuitive easy-to-learn choice, that would be used instead. To prove this, I’m going to use a counterexample, since that’s the most straightforward. Consider a “point” as represented in \mathbb{R}_{(3, 0, 1)} as x\mathbf{e_1} + y\mathbf{e_2} + z\mathbf{e_3} + \mathbf{e_0}. We can’t use this without the \mathbf{e_0} as in your original question because then we wouldn’t be able to distinguish points along the same ray from the origin (this is the point of homoegnization after all).

With this representation of a point, we can use the sandwich operator with a normalized quaternion of the form a + b\mathbf{e_{12}} + c\mathbf{e_{23}} + d\mathbf{e_{31}} (if you’re new to GA, it may be easier to realize that \mathbf{e_{12}}, \mathbf{e_{23}} and \mathbf{e_{31}} behave just like \mathbf{i}, \mathbf{j}, and \mathbf{k} from quaternions.

Now, we know we want a “rotation” about an ideal line (line at infinity) to be a translation. This is, after all, one of the goals of projectivizing in the first place. In 1-up space, we no longer need a separate formulation for affine entities (in classical literature, you would imagine points on a separate “copy” of your vector space called affine space). With reckless abandon, let’s try applying the sandwich to \mathbf{p} = x\mathbf{e_1} + y\mathbf{e_2} + z\mathbf{e_3} via our dual quaternion \mathbf{q} = a + b\mathbf{e_{01}} + c\mathbf{e_{02}} + d\mathbf{e_{03}}.

\mathbf{q}\mathbf{p}\tilde{\mathbf{q}} = (a + b\mathbf{e_{01}} + c\mathbf{e_{02}} + d\mathbf{e_{03}})(\mathbf{e_0} + x\mathbf{e_1} + y\mathbf{e_2} + z\mathbf{e_3})(a - b\mathbf{e_{01}} - c\mathbf{e_{02}} - d\mathbf{e_{03}}) \\ = a^2(\mathbf{e_0} + x\mathbf{e_1} + y\mathbf{e_2} + z\mathbf{e_3})

To verify the above computation yourself, even with all those terms, remember that if, in a given term, \mathbf{e_0} appears twice, the term vanishes because of our choice of metric. The only terms that survive this are the ones in the RHS above and terms for which \mathbf{e_0} appears only once. However, because of the anti-symmetry due to the reverse operator ~, such terms appear in pairs that will cancel each other out.

Looking at our result, it’s clear our “point” didn’t get translated. In fact, after a homogeneous divide, the entity that we ended up with is precisely the same as the entity we started with. One thing that does behave in that manner though is, of course, a plane. Let’s compare what would have happened if we used the trivector representation instead:

\mathbf{q}\mathbf{p}\tilde{\mathbf{q}} = (a + b\mathbf{e_{01}} + c\mathbf{e_{02}} + d\mathbf{e_{03}})(x\mathbf{e_{032}} + y\mathbf{e_{013}} + z\mathbf{e_{021}} + \mathbf{e_{123}})(a - b\mathbf{e_{01}} - c\mathbf{e_{02}} - d\mathbf{e_{03}}) \\ = a^2(\mathbf{e_{123}} + x\mathbf{e_{032}} + y\mathbf{e_{013}} + z\mathbf{e_{021}}) -2ab\mathbf{e_{023}} - 2ac\mathbf{e_{013}} - 2ad\mathbf{e_{021}}

Without simplifying further, it should be obvious that this is a translation of some sort. In fact, this is exactly what an expanded dual quaternion sandwich looks like (barring \LaTeX typos). What changed? Well, the dual of the homogeneous coordinate \mathbf{e_{123}} which is the key to this entire thing produced new terms under the transformation while our previous choice \mathbf{e_0} did not.

The next question is whether this line of thinking is valid. Can we assign “meaning” to expressions just because they behave the way we want? The answer to this is perhaps more philosophical, but I think this is essentially how all of math works, indeed how it’s ever worked. The whole point of developing an algebra is to represent reality to a certain degree. Group theory exists, for example, because proving identifies about how symmetries are preserved guarantee that, upon manipulation, the expressions remain valid and preserve all necessary invariants.

The last point I would make is that in grade school, we learn that a plane has a representation that looks like ax + by + cz + d = 0, essentially an implicit representation using the normal vector of the plane. This plane behaved nicely because we can scale the equation by anything we want, and the plane’s behavior doesn’t change. Casting this in terms of GA, this plane looks an awful lot like \mathbf{e_0} + a\mathbf{e_1} + b\mathbf{e_2} + c\mathbf{e_3} doesn’t it? Well, that’s because the way we learned planes all along was using the “dual” representation :slight_smile: It’s just an artifact of our education that we represented points in the same fashion, when in reality, one must be wrong.

Actually, I asked myself this question and understood that R*(3,0,1) was indeed the correct way to express projective geometry in GA with all these nice properties. However I found it complicated to talk about it to my students and it completely breaks my teaching plans : Euclidean R(3) \rightarrow projective R(3,0,1) \rightarrow conformal R(4,1,0). In term of usage, the [not so good] solution I found is to use R(3,0,1) instead of R*(3,0,1) and to dualize the operators. Indeed, in many implementations, we usually accept to precompute the meet operation A \vee B = (A^* \wedge B^*)^*. So here, I just proposed to also precompute a dual inner product and a dual geometric product. If these dual operators are precomputed, they computationally do not cost more than their respective primal operator in the dual algebra. Then, you keep the construction of lines and planes by the wedge of points, and you also get benefit of the super properties of Dual PGA by the dual operators.

I didn’t investigate the rotors yet, and this approach may be bad for all the math demos, but for the implementation, should be fine.

1 Like

Hi @hmartiro,
I recommend rereading Section 6.4 of the course notes.
It focuses on the 2D case and in particular the challenge of calculating the angle between two euclidean lines using the geometric product. I think it includes all you need to understand both

  1. The choice of signature (2,0,1) and
  2. The choice of the dual algebra.

Please post questions if you get stuck.

Thank you for the replies. Section 6.4 gives a good argument for why e_0^2 = 0 to represent homogenous space. For the choice of the dual algebra, I believe this is the most relevant snippet:

Reminder: The ∗ in the name says that the algebra is built on P(G^∗), the dual exterior algebra, since the inner product is defined on lines instead of points. A similar argument applies in dimension n, yielding the signature (n, 0, 1) for E^n. P(\mathbb{R}_N,0,1) models a qualitatively different metric space called dual euclidean space.

I didn’t understand fully from that why the inner product is only defined on lines instead of points, but combined with the above replies and experimenting with the inner product of trivectors yielding zero because of the degenerate metric, I see why it doesn’t work in the same way.

It is indeed mysterious that the inner product on lines (or planes) is different than that for points. In particular, the inner product on points is very degenerate: the inner product of any two normalized points is -1! That means, among other things, that the distance function between two points has to obtained through other means than the inner product. Fortunately, there are several easily accessible expressions for the distance, outlined in the course notes in Sec. 7.2 “Products of pairs of elements” under the heading “Product of two euclidean points”.

Should be mentioned, especially for teaching/learning Projective Geometry with GA is that you can use G(4) or G(3,1,0), i.e. e₀⋅e₀ = ±1 for projective 3D euclidean space ( or G(3), G(2,1) for 2D ).

Seems not to be nearly as tidy to implement ( and metric, dual quaternions don’t really work well ), but it’s a lot easier to get your head around initially.
Easier to visualize a point as a 1-vector and a line as a 2-vector intersecting the e₀ plane.

It’s the approach used in “Geometric Algebra for Computer Science”

Also I stumbled on a paper using G(4,4) for Projective Geometry+ which I’ll have to read at some point. ( Ron Goldman and Stephen Mann)

Could it be that the problem is that education in projective geometry is not adequate? Once you have absorbed the basics of PG, then you know about duality and understand that a point can be represented as the intersection of 3 planes just as easily/“correctly” as a plane can be represented as the join of 3 points. Then it becomes a question of knowing when to apply the one or the other representation, like an empirical scientist. It can then be shown that euclidean geometry requires the former representation to obtain the simplest GA representation.

Just my two cents. I’m not exactly unbiased:-)

Definitely. I’ve been “doing 3D math, physics and geometry” for most of my professional life. I took plenty of math, physics and computer graphics courses at uni. First time I’ve been properly exposed to PG is in your siggraph course.
Any use of PG I’ve been taught or used in practice has been reduced down to a matrix multiplication trick ( homogeneous coords/perspective transform) and the PG connection is quickly discarded.

Something that would help enormously would be some really nice 3D images (app?) clearly breaking down how some of the practical operations of work out in detail. I mean 3D as the representative space and 2D as the euclidean space ( probably the wrong terms, but you get it ).

For example. The way the left contraction of a line and a point gives you a line perpendicular to that point is really useful. A little hard to visualize and mysterious unless you know both dualized PG and the way GA’s left contraction works. Maybe this exists somewhere?

@cgunn3 how do you feel about Eric Lengyel’s proposal at ?

Cheat sheet here,

I haven’t really had time to read this material in detail. But I read enough to suspect that it’s worth looking at the claim that the dual construction used in euclidean PGA is anti-intuitive. This argument appears to be based on the perception that having the planes be 1-vectors means that you start with the higher-dimensional subspaces and build up the lower dimensional ones. I suspect however this argument is based on an incomplete understanding of duality.

I’ve ended up writing a somewhat long post to explain what I mean. Apologies to the speed freaks out there.

Why do we say that a point is 0-dimensional? It’s equivalent to saying that it’s indivisible, elemental, simple: It’s the geometric primitive I start with (in the standard construction) and out of which I incrementally build up all the other primitives by wedging. For example the wedge m := P_1 \wedge P_2 of two points in the standard construction is a 2-vector representing the joining line of the two points. The line is 1-dimensional since an arbitrary point P incident with m (that is, satisfying m \wedge P = 0) can be represented by the points P_1 + \beta P_2 for \beta \in \mathbb{R} (to include P_2 in this expression you can use homogeneous coordinate \alpha : \beta in \alpha P_1 + \beta P_2 but I don’t want to overly complicate things here). The line m in this sense is conceived of as consisting of all the points incident with it, it’s called a point range in projective geometry. Similar remarks apply to a plane p = P_1 \wedge P_2 \wedge P_3 as a 2-dimensional set of points, called a point field in projective geometry. To sum up: the dimension of a geometric primitive in the standard construction measures how many linearly independent points you need to generate the primitive.

What does this look like in the dual construction? Now we build up all the other primitives out of planes. A plane in the dual construction is just as simple and indivisible as a point is in the standard construction. We’re used to saying that the wedge of two planes m = p_1 \wedge p_2 is the intersection line of the two planes. But we can be, and need to to be, more precise. A plane p is incident with this plane if it satisfies m \wedge p = 0. This set of such incident planes is called a plane pencil and is analogous to the point range defined above. If we’re going to allow saying “the joining line consists of all the points incident with it” then we have to also allow saying now that “the intersection line consists of all the planes incident with it.” This pencil can be parametrized (exactly as above) as p_1 + \beta p_2 for \beta \in \mathbb{R}, so it’s 1-dimensional (of course with respect to the 0-dimensional building block, the plane).

Similar remarks apply to the wedge of 3 planes to produce a point: P = p_1 \wedge p_2 \wedge p_3. The set of planes p incident to this point satisfy p \wedge P = 0. Just as the plane in the standard construction can be thought of as all the points incident to it, the point in the dual construction can be thought of as consisting of all the planes that are incident with it. This set of planes is dual to the point field above and is called a plane bundle in projective geometry.

To sum up: once you’ve understood that

  1. dimension isn’t inherent in the geometric primitive but depends on the way that space is conceptualized, and
  2. that the projective geometric principle of duality provides a logically rigorous and historically proven basis for an alternative conceptualization of space,

then, based on my experience, the conviction that planes don’t make good 1-vectors can be overcome.

(Note that one still has access in PGA to both aspects of the geometric primitive – the Poincare duality map allows you to move over from the plane-based to the point-based Grassmann algebra and vice-versa. In fact that’s how the join operator (regressive product) is implemented. Example: you can’t join two bundles you have to join two (naked) points. We’re not committed unilaterally to the dual construction for everything, only insofar as it mirrors the metric relationships of euclidean space.)

One final comment: I don’t want to minimize the seriousness of the mental revolution required to think of points and planes in the dual way that I’ve described above. We are hard-wired at some level to prefer the “reality is build out of points” point of view (excuse the pun, it’s plane silly) to the newer alternative “reality is built out of planes”. It’s one thing to say that mathematically the two statements are equivalent but it’s something else to inwardly experience the equivalence as reasonable or believable.

Fortunately, using euclidean PGA successfully does not require that you subscribe to any view about how reality is built up. An educated skepticism is always justified. My recommendation: first make sure that the results are mathematically impeccable (I hope I have made a start with this post), then implement, apply to reality, check for discrepancies, and repeat. I’ve been doing that for 10 years now with PGA and haven’t found anything that doesn’t agree 100% with everything else I know about the world.

Also my article “Geometric algebras for euclidean geometry” especially Section 5, “Homogenous models using a degenerate metric” has some things to say that may be of interest to readers of this thread.

1 Like

My impression is that this can be seen as a milder shift in perspective from Gunn’s PGA than the author makes it out to be.

PGA recognizes that objects like points, lines, and planes, have equivalent representations in direct space R(n,0,1) and dual space R*(n,0,1). You can do non-metric projective operations like the meet and join in either space: in direct space the meet and join are implemented with \vee and \wedge respectively, and in dual space, it’s the opposite. But if you want to do metric operations like rotations and reflections with the geometric product, you have to do them in dual space. For this reason, the dual space representations are emphasized more in Gunn’s PGA.

Lengyel proposes emphasizing the direct space representations more, because they are more similar to more traditional approaches to projective geometry. To implement metric operations (rotations and reflections, and also translations as versors), Lengyel proposes a new “anti-geometric product” operation, which could be interpreted as an instruction to transform the operands to dual space, do a geometric product there, and then transform the result back to direct space, so that all geometric products are still actually happening in dual space. I suspect Lengyel wouldn’t put it exactly this way, though, because I think he wants to get rid of the need for the concept of dual space. And you don’t strictly need dual space, because you can just write down the multiplication table for the anti-geometric product directly, or you can implement it using “complement” operations (see the cheat sheet) and the standard geometric product.

I can see value in both points of view, and I’m not sure that one needs to win over the other. You can either have a more standard space (direct space) and a less standard geometric product (Lengyel’s anti-geometric product), or a less standard space (Gunn’s R*(n,0,1) dual space), and a more standard geometric product.

I do think it’s useful to get some exposure to dual space at some point because of the intuitions it gives about things like being able to view a line as a set of planes that contain it (compared to a set of points that it contains). But if you don’t want to think about dual space all the time, it seems that Lengyel’s approach lets you put it in the background.

I actually do have some issues with Lengyel’s “direct construction” as it were, despite it being my worldview so to speak before encountering @cgunn3’s material which sort of forced me to re-evaluate things.

As I mentioned to him in a twitter debate, there is a “choice” in how to conceptualize a point (ray-plane intersection, 3-plane intersection), but we consider motors and the exp/log maps, the formalism doesn’t really work with the direct construction.

The entire point of introducing quaternions and dual-quaternions in the first place is that they form a continuous group which implies interpolability and differentiability. In particular, this means that exp/log have closed form solutions. In Lengyel’s construction, exp/log don’t come about naturally so there’s no correspondence to the all important Lie-group/Lie-algebra mapping you get with the dualized approach.

This is a very lucid take on the topic. The math ends up working out the same no matter which way you go. You could basically just swap the names of everything, and you’d get the opposite approach, leaving only one difference: the mapping between grade and dimensionality. In one case, elements of grade 1, 2, and 3 map to geometric objects of dimension 0, 1, and 2, in that order. In the other case, elements of grade 1, 2, and 3 map to geometry objects of dimension 2, 1, and 0, in that order. In the absence of any other valid reasons to choose one approach over the other, I choose the 1-up structure in which grades are one greater than the dimension instead of the 1-up structure in which grades are (n − 1) minus the dimension.

1 Like

That is not correct. In both constructions, exp and log arise equally as naturally. I mentioned at the end of my post that I have investigated this issue and found that everything still works fine. Is it that you didn’t read that statement, or is it that you don’t believe me?

1 Like