paskvilwiki

up: math & phy

multivectors and the 3D algebra

geometric algebra, part 2

last updated 2026-11

part 1 multiplied two vectors and got a scalar plus a bivector. keep multiplying, and you get everything the algebra has - in 3D that's only eight building blocks, and the cross product, complex numbers and quaternions all turn out to be made of them

the eight building blocks

take any product of basis vectors and simplify it with the two rules from part 1 - eiei=1\mathbf e_i\mathbf e_i = 1, and swapping two different neighbours flips the sign. for example

e2e1e3e2=−e1e2e3e2=e1e2e2e3=e1e3=−e31\mathbf e_2\mathbf e_1\mathbf e_3\mathbf e_2 = -\mathbf e_1\mathbf e_2\mathbf e_3\mathbf e_2 = \mathbf e_1\mathbf e_2\mathbf e_2\mathbf e_3 = \mathbf e_1\mathbf e_3 = -\mathbf e_{31}

repeated vectors always meet and cancel, so what's left is each basis vector at most once. in 3D that gives 23=82^3 = 8 basis blades, sorted by grade - how many vectors are multiplied:

grade name blades count geometry
0 scalar 11 1 a number
1 vector e1,e2,e3\mathbf e_1, \mathbf e_2, \mathbf e_3 3 oriented line
2 bivector e23,e31,e12\mathbf e_{23}, \mathbf e_{31}, \mathbf e_{12} 3 oriented plane
3 trivector e123\mathbf e_{123} 1 oriented volume

the counts are binomial coefficients, 1-3-3-1 - in nn dimensions you get 2n2^n blades in n+1n+1 grades

a multivector is any sum of them, like M=2+3e1−e12+5e123M = 2 + 3\mathbf e_1 - \mathbf e_{12} + 5\mathbf e_{123}. same as with complex numbers, the parts of different grade just stay apart. ⟨M⟩k\langle M\rangle_k picks the grade-kk part - here ⟨M⟩0=2\langle M\rangle_0 = 2, ⟨M⟩1=3e1\langle M\rangle_1 = 3\mathbf e_1, ⟨M⟩2=−e12\langle M\rangle_2 = -\mathbf e_{12}

multivectors add part by part and multiply term by term, and the product of any two is again a multivector - the space is closed. that, plus associativity and distributivity, is what makes it an algebra

vector times bivector

part 1 split the product of two vectors into a lower grade (the dot, grade 0) and a higher grade (the wedge, grade 2). a vector times a bivector splits the same way, into a vector and a trivector:

aB=a⋅B+a∧B\mathbf a B = \mathbf a\cdot B + \mathbf a\wedge B

  • the part of a\mathbf a in the plane of BB gives a vector, turned by 90° within the plane - e.g. e1e12=e2\mathbf e_1\mathbf e_{12} = \mathbf e_2
  • the part out of the plane gives a volume - e.g. e3e12=e123\mathbf e_3\mathbf e_{12} = \mathbf e_{123}

the same pattern holds throughout: multiplying by a vector moves one grade down (inner, ⋅\cdot) and one up (outer, ∧\wedge)

python check
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
B = e1*e2

print(e2*e1*e3*e2)      # e1^e3, which is -e31
print(e1*B, e1 | B)     # e2 e2                - in the plane: the inner part
print(e3*B, e3 ^ B)     # e1^e2^e3 e1^e2^e3    - out of it: the outer part

the pseudoscalar

the single trivector I=e123I = \mathbf e_{123} is the unit volume, and it behaves a lot like the imaginary unit ii:

  • it squares to −1-1, I2=−1I^2 = -1
  • it commutes with everything in 3D - e1I=Ie1\mathbf e_1 I = I\mathbf e_1, and the same for every blade
why it works

for the square, move the second e1\mathbf e_1 to the front (two swaps, no sign change), then the rest is e232=−1\mathbf e_{23}^2 = -1:

I2=e1e2e3e1e2e3=e1e1e2e3e2e3=(e2e3)2=−1I^2 = \mathbf e_1\mathbf e_2\mathbf e_3\mathbf e_1\mathbf e_2\mathbf e_3 = \mathbf e_1\mathbf e_1\mathbf e_2\mathbf e_3\mathbf e_2\mathbf e_3 = (\mathbf e_2\mathbf e_3)^2 = -1

and a vector passes through the three factors of II with two sign flips - it anticommutes with the other two, and commutes with its own

so wherever II shows up in a product, you can move it around freely and treat I2I^2 as −1-1. it's called the pseudoscalar because it commutes like a scalar, but flips sign under a mirror (a mirror flips one of the three axes)

duality and the cross product

multiply each basis vector by II:

Ie1=e1e2e3e1=e23,Ie2=e31,Ie3=e12I\mathbf e_1 = \mathbf e_1\mathbf e_2\mathbf e_3\mathbf e_1 = \mathbf e_{23}, \qquad I\mathbf e_2 = \mathbf e_{31}, \qquad I\mathbf e_3 = \mathbf e_{12}

(for the first: move the last e1\mathbf e_1 to the front, two swaps). multiplying by II turns a vector into the bivector of the plane perpendicular to it - its dual. and multiplying by −I-I turns it back: −Ie23=−I2e1=e1-I\mathbf e_{23} = -I^2\mathbf e_1 = \mathbf e_1

that's exactly the pairing part 1 found between the wedge and the cross product, so now it's exact:

a∧b=I(a×b),a×b=−I(a∧b)\boxed{\mathbf a\wedge\mathbf b = I(\mathbf a\times\mathbf b), \qquad \mathbf a\times\mathbf b = -I(\mathbf a\wedge\mathbf b)}

and with it, the geometric product in 3D is ab=a⋅b+I a×b\mathbf a\mathbf b = \mathbf a\cdot\mathbf b + I\,\mathbf a\times\mathbf b. the cross product isn't a separate operation - it's the wedge, taken in its dual form

this also explains the cross product's quirks from part 1. it only exists in 3D because only there is the dual of a plane a single direction (in 4D it's another plane), and it's a pseudovector because II flips sign under a mirror

example - the cross product through duality

from part 1, a=e1+2e2\mathbf a = \mathbf e_1 + 2\mathbf e_2, b=3e2+e3\mathbf b = 3\mathbf e_2 + \mathbf e_3, and a∧b=3e12+2e23−e31\mathbf a\wedge\mathbf b = 3\mathbf e_{12} + 2\mathbf e_{23} - \mathbf e_{31}. multiply by −I-I, using Ie23=I2e1=−e1I\mathbf e_{23} = I^2\mathbf e_1 = -\mathbf e_1 and the same for the others:

−I(a∧b)=−I(3 Ie3+2 Ie1−Ie2)=−I2(2e1−e2+3e3)=2e1−e2+3e3-I(\mathbf a\wedge\mathbf b) = -I(3\,I\mathbf e_3 + 2\,I\mathbf e_1 - I\mathbf e_2) = -I^2(2\mathbf e_1 - \mathbf e_2 + 3\mathbf e_3) = 2\mathbf e_1 - \mathbf e_2 + 3\mathbf e_3

the determinant formula in part 1 gave a×b=2e1−e2+3e3\mathbf a\times\mathbf b = 2\mathbf e_1 - \mathbf e_2 + 3\mathbf e_3 ✓

python check
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
I = e1*e2*e3
a = e1 + 2*e2
b = 3*e2 + e3

print(I*I)              # -1
print(I*e1 - e1*I)      # 0      - I commutes
print(I*e1, I*e2, I*e3) # e2^e3 -e1^e3 e1^e2
print(-I*(a ^ b))       # 2*e1 - e2 + 3*e3

splitting a vector along a direction

dividing by a vector (part 1) gives the parallel and perpendicular parts in one go. for any non-zero n\mathbf n, a=ann−1\mathbf a = \mathbf a\mathbf n\mathbf n^{-1}, and splitting an\mathbf a\mathbf n into dot and wedge:

a=(a⋅n) n−1⏟∥ to n+(a∧n) n−1⏟⊥ to n\mathbf a = \underbrace{(\mathbf a\cdot\mathbf n)\,\mathbf n^{-1}}_{\parallel\ \text{to}\ \mathbf n} + \underbrace{(\mathbf a\wedge\mathbf n)\,\mathbf n^{-1}}_{\perp\ \text{to}\ \mathbf n}

the first is the familiar projection a⋅n∣n∣2n\frac{\mathbf a\cdot\mathbf n}{|\mathbf n|^2}\mathbf n. the second (the rejection) is a bivector times a vector in its own plane, so by the section above it's a vector, in that plane and perpendicular to n\mathbf n - no Gram-Schmidt needed

example - projection and rejection

a=2e1+3e2+e3\mathbf a = 2\mathbf e_1 + 3\mathbf e_2 + \mathbf e_3 along n=e1+e2\mathbf n = \mathbf e_1 + \mathbf e_2, so n−1=12(e1+e2)\mathbf n^{-1} = \frac12(\mathbf e_1 + \mathbf e_2) and a⋅n=5\mathbf a\cdot\mathbf n = 5:

  • parallel: 5⋅12(e1+e2)=52e1+52e25\cdot\frac12(\mathbf e_1 + \mathbf e_2) = \frac52\mathbf e_1 + \frac52\mathbf e_2
  • the wedge: a∧n=2e12+3e21+e31+e32=−e12−e23+e31\mathbf a\wedge\mathbf n = 2\mathbf e_{12} + 3\mathbf e_{21} + \mathbf e_{31} + \mathbf e_{32} = -\mathbf e_{12} - \mathbf e_{23} + \mathbf e_{31}
  • perpendicular: multiply each term by e1\mathbf e_1 and by e2\mathbf e_2 (e.g. e12e1=−e2\mathbf e_{12}\mathbf e_1 = -\mathbf e_2, e23e1=e123\mathbf e_{23}\mathbf e_1 = \mathbf e_{123}, e31e2=e123\mathbf e_{31}\mathbf e_2 = \mathbf e_{123}) - the two trivectors cancel, as they must:

(a∧n) n−1=12(e2−e1−e123+e3+e3+e123)=−12e1+12e2+e3(\mathbf a\wedge\mathbf n)\,\mathbf n^{-1} = \tfrac12(\mathbf e_2 - \mathbf e_1 - \mathbf e_{123} + \mathbf e_3 + \mathbf e_3 + \mathbf e_{123}) = -\tfrac12\mathbf e_1 + \tfrac12\mathbf e_2 + \mathbf e_3

the standard way: projection a⋅n∣n∣2n=52(1,1,0)\frac{\mathbf a\cdot\mathbf n}{|\mathbf n|^2}\mathbf n = \frac52(1, 1, 0) ✓, the rest is a\mathbf a minus that, (−12,12,1)(-\frac12, \frac12, 1) ✓, and it's perpendicular to n\mathbf n: −12+12+0=0-\frac12 + \frac12 + 0 = 0 ✓

python check
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
a = 2*e1 + 3*e2 + e3
n = e1 + e2

print((a | n)*n.inv())   # 5*e1/2 + 5*e2/2
print((a ^ n)*n.inv())   # -e1/2 + e2/2 + e3

reversion

one more operation that rotations (part 3) need: the reverse M~\widetilde M writes every product backwards, ab~=ba\widetilde{\mathbf a\mathbf b} = \mathbf b\mathbf a. on the blades:

  • scalars and vectors stay as they are
  • bivectors flip sign, e12~=e2e1=−e12\widetilde{\mathbf e_{12}} = \mathbf e_2\mathbf e_1 = -\mathbf e_{12}
  • the trivector flips too, e123~=e3e2e1=−e123\widetilde{\mathbf e_{123}} = \mathbf e_3\mathbf e_2\mathbf e_1 = -\mathbf e_{123} (three swaps)

it plays the role of the complex conjugate - for ab\mathbf a\mathbf b, (ab)(ab)~=abba=∣a∣2∣b∣2(\mathbf a\mathbf b)\widetilde{(\mathbf a\mathbf b)} = \mathbf a\mathbf b\mathbf b\mathbf a = |\mathbf a|^2|\mathbf b|^2, a plain number, just like zzˉ=∣z∣2z\bar z = |z|^2

complex numbers and quaternions, found inside

the even blades (grades 0 and 2) are closed under multiplication on their own - a product of an even number of vectors stays even. those even parts are old friends

2D: the complex numbers

in 2D the even part is x+y e12x + y\,\mathbf e_{12}, and e122=−1\mathbf e_{12}^2 = -1 - that's a complex number, with e12\mathbf e_{12} as ii. and it's not just a look-alike: e12\mathbf e_{12} is the oriented unit area of the plane, so the "imaginary unit" finally has a geometric meaning. vectors and complex numbers are also linked directly: e1v=e1(xe1+ye2)=x+y e12\mathbf e_1\mathbf v = \mathbf e_1(x\mathbf e_1 + y\mathbf e_2) = x + y\,\mathbf e_{12} - every vector in the plane has its complex number, read relative to e1\mathbf e_1

example: (3+2e12)(1−4e12)=3−12e12+2e12−8e122=11−10e12(3 + 2\mathbf e_{12})(1 - 4\mathbf e_{12}) = 3 - 12\mathbf e_{12} + 2\mathbf e_{12} - 8\mathbf e_{12}^2 = 11 - 10\mathbf e_{12}, and with ordinary complex numbers, (3+2i)(1−4i)=11−10i(3 + 2i)(1 - 4i) = 11 - 10i ✓

3D: the quaternions

in 3D the even part is 1,e23,e31,e121, \mathbf e_{23}, \mathbf e_{31}, \mathbf e_{12} - four components, three of them squaring to −1-1. take

i=−Ie1=−e23,j=−Ie2=−e31,k=−Ie3=−e12\mathrm i = -I\mathbf e_1 = -\mathbf e_{23}, \qquad \mathrm j = -I\mathbf e_2 = -\mathbf e_{31}, \qquad \mathrm k = -I\mathbf e_3 = -\mathbf e_{12}

and check Hamilton's rules: i2=I2e12=−1\mathrm i^2 = I^2\mathbf e_1^2 = -1, and ij=I2e1e2=−e12=k\mathrm{ij} = I^2\mathbf e_1\mathbf e_2 = -\mathbf e_{12} = \mathrm k ✓ (same for jk=i\mathrm{jk} = \mathrm i, ki=j\mathrm{ki} = \mathrm j), and so ijk=k2=−1\mathrm{ijk} = \mathrm k^2 = -1 ✓

so a quaternion is a scalar plus a bivector - and the reason they're so good at rotations is the next page

why the minus signs

the plain cyclic choice e23,e31,e12\mathbf e_{23}, \mathbf e_{31}, \mathbf e_{12} gives ij=−k\mathrm{ij} = -\mathrm k, a left-handed version with ijk=+1\mathrm{ijk} = +1. negating all three fixes that, and keeps i,j,k\mathrm i, \mathrm j, \mathrm k as the planes perpendicular to x, y and z - so i\mathrm i rotates about x, j\mathrm j about y, k\mathrm k about z, and the textbook quaternion formulas work as they are. other choices satisfy Hamilton's rules too, e.g. i=e12\mathrm i = \mathbf e_{12}, j=e23\mathrm j = \mathbf e_{23}, k=e13\mathrm k = \mathbf e_{13} - but there i\mathrm i rotates about z, and every formula needs its axes relabelled

python check
from galgebra.ga import Ga

g2, f1, f2 = Ga.build('f1 f2', g=[1, 1])
print((3 + 2*(f1*f2))*(1 - 4*(f1*f2)))   # 11 - 10*f1^f2

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
I = e1*e2*e3
i, j, k = -I*e1, -I*e2, -I*e3
print(i*i, i*j, k, i*j*k)                # -1 -e1^e2 -e1^e2 -1

what we have

  • 3D GA has 8 blades in 4 grades: scalar, 3 vectors, 3 bivectors, 1 trivector - and multivectors are their sums
  • the pseudoscalar II squares to −1-1 and commutes with everything in 3D
  • duality: II turns a vector into its perpendicular plane, and a×b=−I(a∧b)\mathbf a\times\mathbf b = -I(\mathbf a\wedge\mathbf b)
  • a vector splits along any direction into (a⋅n)n−1+(a∧n)n−1(\mathbf a\cdot\mathbf n)\mathbf n^{-1} + (\mathbf a\wedge\mathbf n)\mathbf n^{-1}
  • the reverse M~\widetilde M flips grades 2 and 3
  • complex numbers are the even part of 2D GA, quaternions the even part of 3D

next, rotations - and why the quaternions need half angles