# Geometric algebra solution for intersection of planes in RN

1. Mar 4, 2008

### Peeter

Given the parametric representation of two planes, through points P and Q respectively

$$x = P + \alpha u + \beta v$$
$$y = Q + a w + b z$$

Or, alternately, with $$u \wedge v = A$$, and $$w \wedge z = B$$

$$x \wedge A = P \wedge A$$

$$y \wedge B = Q \wedge B$$

It's easy enough to find the intersection of the two planes by wedging, x = y, with A or B. For example, if I wedge with B I get a parametric equation for the line of intersection, provided it exists:

$$x = P + \frac{(Q-P)\wedge B}{v \wedge B}}v + \alpha\frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)$$

Intuitively, I'd expect that one could reduce this to an expression in terms of only P, Q, A, and B without requiring an explicit pair of direction vectors in the plane (the points and the bivectors specify the planes and their position, so I'd expect the intersection to be expressable that way too).

I don't see how to obviously do the reduction I'd imagine possible here (I'm self teaching myself geometric algebra as it appears to be the natural language for much of physics which I'd like to understand better ... to get a feel for things I was going through some of the sorts of calculations learned with traditional means such as row reduction, and this was one I tried.)

Last edited: Mar 5, 2008
2. Mar 5, 2008

### pkleinod

I couldn't reproduce your expression because I didn't
quite understand exactly what you did. Instead, I
offer the following solution, which I think satisfies
what you felt intuitively.

Let the first plane be defined by the point p and
the unit bivector P. Let the second plane be defined
by the point q and the unit bivector Q. The equations
for the planes are

$$x\wedge P = p\wedge P$$

$$x\wedge Q = q\wedge Q$$

These must be satisfied simultaneously for any point x
on the intersection of the two planes. Let us now find
the point that is on the intersection line and that is
a linear combination of the points p and q.

$$t = \alpha p + \beta q$$

Insert this into the simultaneous equations to yield two
linear equations determining $$\alpha$$ and $$\beta$$:

$$\alpha\ p\wedge{ P} + \beta\ q\wedge{ P} = p\wedge{ P}$$

$$\alpha\ p\wedge{ Q} + \beta\ q\wedge{ Q} = q\wedge{ Q}$$

These can be solved with Cramer's rule:

$$\alpha = (p\wedge{ P}\ \ q\wedge{ Q} -q\wedge{ Q}\ \ q\wedge{ P})/\delta$$

$$\beta = (p\wedge{ P}\ \ q\wedge{ Q} -p\wedge{ Q}\ \ p\wedge{ P})/\delta$$

$$\delta = (p\wedge{ P}\ \ q\wedge{ Q} -p\wedge{ Q}\ \ q\wedge{ P}).$$

This determines a point, t, on the intersection. Define the
unit vector, m, giving the direction and orientation of the
line of intersection. I shall assume a 3-dimensional space
here and I assume that the wedge products of p and q with
their respective planes are not zero. Then the desired
vector is the dual of the wedge product of the rejection of p by P
and the rejection of q by Q:

$$n = -i(p\wedge P P^{-1})\wedge (q\wedge Q Q^{-1})$$

Define m to be the unit vector in the direction of n. The
equation of the line of intersection is then

$$y \wedge m = t\wedge m$$

A parametric equation in terms of a scalar parameter is

$$y = d + \gamma m^{-1}$$

$$d = (t\wedge m)\cdot m^{-1}$$.

The expressions here use only p, q, P, Q, and the pseudoscalar.
Check my algebra; there are bound to be mistakes.

3. Mar 5, 2008

### Peeter

Wow that's a lot more complex seeming. I'll have to think about your solution when I'm not at work and can justify the time to do so;)

I'd guess I assumed the reader would have better mind reading capabilities of the steps I used, so for reference I'll write them out:

Starting with two planes specified parametrically, each in terms of two direction vectors and a point on the plane:

$$x = P + \alpha u + \beta v$$
$$y = Q + a w + b z$$

If these intersect then all points on the line must satisify x = y, so the
solution requires:

$$P + \alpha u + \beta v = Q + a w + b z$$
$$\implies (P + \alpha u + \beta v) \wedge w \wedge z = (Q + a w + b z) \wedge w \wedge z = Q \wedge w \wedge z$$

Rearranging for $$\beta$$, and writing $$B = w \wedge z$$:

$$\beta = \frac{Q \wedge B - (P + \alpha u) \wedge B}{v \wedge B}$$

Note that when the solution exists the left vs right order of the division by $$v \wedge B$$ should not matter since the numerator will be proportional to this bivector (or else the $$\beta$$ would not be a scalar).

Substitution of $$\beta$$ back into $$x = P + \alpha u + \beta v$$ (all points in the first plane) gives you a parametric equation for a line:

$$x = P + \frac{(Q-P)\wedge B}{v \wedge B}}v + \alpha\frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)$$

Where a point on the line is:

$$P + \frac{(Q-P)\wedge B}{v \wedge B}}v = \frac{1}{v \wedge B}((v \wedge B)P + ((Q-P)\wedge B)v)$$

And a direction vector for the line is:

$$\frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)$$

Last edited: Mar 5, 2008
4. Mar 6, 2008

### pkleinod

Thanks! Now I see what you did. I may have a solution but I'm
not really sure. First, express the two bivectors in terms of
unit vectors r,m and s, where m points in the
direction of the line of intersection and r and s are orthogonal
to m.

$$A = u \wedge v = r \wedge m$$

$$B = w \wedge z = m \wedge s$$

This takes into account that the four defining directions are
not linearly independent. Now for u and v,

$$u = u\cdot r r + u\cdot m m$$

$$v = v\cdot r r + v\cdot m m$$

with similar equations for w and z. Define the scalars

$$\gamma = \alpha u\cdot r + \beta v \cdot r$$

$$\lambda = (\alpha u\cdot m + \beta v\cdot m)$$

Any point x on the plane A then satisfies

$$x = P + \gamma r + \lambda m$$.

Wedging with B now gives simpler expressions:

$$(Q-P)\wedge B = \gamma r\wedge B$$

$$\gamma = (Q-P)\wedge B (r\wedge B)^{-1}$$

$$x = P + (Q-P)\wedge B B^{-1} + \lambda m$$

$$(r \wedge B)^{-1}r = msr^2 = ms = B^{-1}$$.

Now check that the points x so defined lie on the intersection:

$$xB = PB + (Q-P)\wedge B + \lambda mB$$

$$x\cdot B = <xB>_1 = P\cdot B + \lambda m\cdot B$$

$$x\wedge B = <xB>_3 = P\wedge B + (Q-P)\wedge B = Q\wedge B$$

$$xA = PA - (Q-P)\wedge B BA + \lambda mA$$

$$x\cdot A = <xA>_1 = P\cdot A + \lambda m\cdot A\ ***$$

$$x\wedge A = <xA>_3 = P\wedge A \ ***$$

I am not sure about the equations with the stars. If they are correct,
then the vector m can be obtained from

$$m = P\cdot B B^{-1} + x\cdot B B^{-1}$$

$$m = P\cdot A A^{-1} + x\cdot A A^{-1}$$

and noting that the two last terms have opposite signs. Adding:

$$m = -\frac{1}{2}(P\cdot A A + P\cdot B B)$$

$$m\wedge A = m\wedge B = 0$$.

I am not completely satisfied with this but maybe it will give you
some help.

5. Mar 6, 2008

### Peeter

I like the approach, and was inclined to look at it in this way too. I got sidetracked into coming up with expressions for $${\langle AB \rangle}_k$$ in terms of symmetric and antisymetric components (like the generalized vector k-vector dot and wedge product formulas which are so handy), and hadn't gotten back to trying this again.)

At a glance there's something wrong with the final result. Example: P=Q=0, A=e_12, B=e_13

Line of intersection should be e_1, but your m=0 in that case. The end result for this direction vector m should logically be independent of the points P and Q if the planes do intersect in a line.

6. Mar 6, 2008

### pkleinod

You are absolutely right. Even if P and Q are not zero, my expression for m
yields the wrong answer. If I use the expression for n from my first post,
I do get the correct answer, so at least the method in my first post seems to work in general (but the wedge products must not be zero as I pointed out before.) One can write down a simpler expression for the direction of the line of intersection that doesn't depend on the points on the planes:

$$n = -i(iP)\wedge (iQ)$$

using the notation from the first post, where P and Q are bivectors.

So it's back to the drawing board!

Last edited: Mar 6, 2008
7. Mar 6, 2008

### Peeter

I had that result for $$\mathbb{R}^3$$ too, but in the form

$$i{\langle P Q \rangle}_2 = i\frac{P Q - Q P}{2}$$

(noting for clarity, since we are switching back and forth, that in this post, and your last, P and Q are the plane bivectors and not points on the planes;)

This doesn't work for $$\mathbb{R}^N$$, where the unit pseudoscalar won't map the plane to a normal vector. However, it does seem about as reduced as you can get, and is also in terms of the bivectors only.

Perhaps in the general case there isn't much choice but to explicitly state the result in terms of direction vectors for at least one of the planes. That's not as good of a solution as the 3d case since for the result to be valid you have to choose v to be _not_ directed along the intersection since $$v \wedge B = 0$$ in that case.

8. Mar 6, 2008

### Peeter

For planes $$A=u \wedge v$$ and $$B=w \wedge z$$, a better form for the solution, if it exists, is the following vector:

$$(u \wedge B)^2 v + (v \wedge B)^2 u - (u \wedge B)(v \wedge B)u - (v \wedge B)(u \wedge B)v$$

This way if one of $$u \wedge B=0$$, or $$v \wedge B=0$$, this result will still valid (result will be proportional to one of u or v in those degenerate cases).

This could alternatively be formulated in terms of w,z, and A. Perhaps that's as good as we can get for the $$\mathbb{R}^N$$ case.

9. Mar 7, 2008

### pkleinod

That is true but in the general case one uses the join of the two bivectors instead of the unit pseudoscalar of the whole space. The join here would be

$$r\wedge m \wedge s$$

where the bivectors are defined A=rm, B=ms. This can be extended to general blades in any dimension, in which case r, m, and s would be blades instead of vectors. I restricted myself to three dimensions because finding the join and the meet (intersection) in higher dimensions is not a trivial problem and requires a well-designed algorithm to get r, m, and s from u, v, w, and z. I myself have no experience in actually doing this and so do not feel competent to instruct others. However, in three dimensions, where one can use the unit pseudoscalar to get m, I think the expression

$$x(\lambda) = P + (Q-P)\wedge B B^{-1} + \lambda m$$

is a solution satisfying the intuitive feeling of your first post. (The wedge product of the two bivectors is zero because they both contain a common factor, so the above equation ought to work in higher dimensions too if one is prepared to do the necessary work to find the join and meet). I believe that the algorithms start by assuming that the meet is a scalar (i.e. there is no intersection) and then expanding the grade of the meet until the true meet is found; i.e. they are designed to take into account the special cases that you mentioned. Your question has motivated me to learn more about this topic but that will take a bit of time.

10. Mar 7, 2008

### Peeter

After a day of boring computer programming work, I thought of the same thing on the drive home.

Specifically, my thought was that if you reject the component of A from B for two intersecting bivectors:

$$Rej_A(B) = \frac{1}{A}{\langle AB \rangle}_2$$

the line of intersection remains the same ... that operation rotates B so that the two are mutually perpendicular. This essentially reduces the problem to that of the three dimensional case, so the solution has to be of the same form... you just need to calculate a pseudoscalar'' (what you are calling the join), for the subspace spanned by the two bivectors.

That can be computed by taking any direction vector that is on one plane, that isn't in the second. For example, pick a vector u in the plane A that is not on the intersection of A and B. In mathese that is $$u = u\cdot A$$ (or $$u \wedge A = 0$$), where $$u \wedge B \ne 0$$. Thus a pseudoscalar for this subspace is:

$$i = \frac{u \wedge B}{\lvert u \wedge B \rvert} \ne 0$$

To calculate the direction vector along the intersection we don't care about the scaling above, so a scaled pseudoscalar'' for the subspace can be calculated by taking any vector v that does not lie along the intersection and has a component in both planes:

$$i \propto (v \cdot A) \wedge B$$

Thus a vector along the intersection is:

$$x = ((v \cdot A) \wedge B) {\langle AB \rangle}_2$$

(an interchange of A and B above would also work).

11. Mar 8, 2008

### pkleinod

Yes, I think this would work just fine for two planes, even in an arbitrary number of dimensions.

12. Mar 8, 2008

### Peeter

Thanks for the back and forth on this.

I'm typing up some notes on general bivector and grade-2 geometric algebra for myself. Despite seeming a relatively fundamental topic, it's not really covered well in either my Hestenes nor Doran/Lasenby books (those are both so dense I suppose that's not suprising ... if they covered everything with enough detail that they were easy to read they'd each be two thousand pages long). If you are interested I can mail it or post it when I'm done.

13. Mar 8, 2008

### pkleinod

Thank you, I would be glad for a copy of your work when it is done. The treatment of
the meet and the join (intersecting subspaces in general) is covered very well in the
book " GA for Computer Science" by Dorst, Fortijne and Mann, (Morgan Kaufmann,
Elsevier, 2007), which I can recommend very highly for all computational aspect of GA and for the treatment of conformal geometry. http://www.geometricalgebra.net/ [Broken]

Last edited by a moderator: May 3, 2017
14. Mar 9, 2008

### Peeter

Well, sounds like I probably would have saved myself some work if I had bought that one ... I've only got the two physics oriented texts mentioned.

I've attached my notes. I wouldn't call it a work ... more like enough private notes on the subject that I feel I've got a hang of it (goes with a bunch of other similar ad-hoc notes) -- I find that once I write it down so I can look things in nicely formatted Tex generated output I understand what I really know or don't a lot better.

File size:
121.7 KB
Views:
104