paskvilwiki

up: math & phy

reflections and rotations

geometric algebra, part 3

last updated 2026-11

rotations are where GA pays off first. a reflection is one product, two reflections are a rotation, and the result is the rotor - which works in any dimension, composes by plain multiplication, and has the axis and angle right there in it. quaternions are exactly this, with the geometry put back

reflections

take a unit vector n\mathbf n, and the mirror plane perpendicular to it. the reflection of v\mathbf v in that plane is

v′=−nvn\mathbf v' = -\mathbf n\mathbf v\mathbf n

the part of v\mathbf v along n\mathbf n flips, the part in the mirror stays - exactly what a mirror does

why it works

split v\mathbf v into the part along n\mathbf n and the part in the mirror (part 2), v=v∥+v⊥\mathbf v = \mathbf v_\parallel + \mathbf v_\perp:

  • v∥\mathbf v_\parallel commutes with n\mathbf n (parallel vectors do), so −nv∥n=−v∥nn=−v∥-\mathbf n\mathbf v_\parallel\mathbf n = -\mathbf v_\parallel\mathbf n\mathbf n = -\mathbf v_\parallel - flipped
  • v⊥\mathbf v_\perp anticommutes with n\mathbf n, so −nv⊥n=v⊥nn=v⊥-\mathbf n\mathbf v_\perp\mathbf n = \mathbf v_\perp\mathbf n\mathbf n = \mathbf v_\perp - untouched

compare the standard (Householder) formula v−2(v⋅n) n\mathbf v - 2(\mathbf v\cdot\mathbf n)\,\mathbf n - same thing, but −nvn-\mathbf n\mathbf v\mathbf n works on any multivector, not just vectors. reflect a bivector, and you get the mirrored plane

example - a diagonal mirror

n=12(e1+e2)\mathbf n = \frac1{\sqrt2}(\mathbf e_1 + \mathbf e_2), so the mirror is the plane x=−yx = -y. reflect v=e1\mathbf v = \mathbf e_1, using e21e1=e2\mathbf e_{21}\mathbf e_1 = \mathbf e_2 and e21e2=−e1\mathbf e_{21}\mathbf e_2 = -\mathbf e_1:

−ne1n=−12(e1+e2) e1 (e1+e2)=−12(1+e21)(e1+e2)=−12(e1+e2+e2−e1)=−e2\begin{aligned} -\mathbf n\mathbf e_1\mathbf n &= -\tfrac12(\mathbf e_1 + \mathbf e_2)\,\mathbf e_1\,(\mathbf e_1 + \mathbf e_2) = -\tfrac12(1 + \mathbf e_{21})(\mathbf e_1 + \mathbf e_2) \\ &= -\tfrac12(\mathbf e_1 + \mathbf e_2 + \mathbf e_2 - \mathbf e_1) = -\mathbf e_2 \end{aligned}

the standard way: e1−2⋅12⋅12(e1+e2)=−e2\mathbf e_1 - 2\cdot\frac1{\sqrt2}\cdot\frac1{\sqrt2}(\mathbf e_1 + \mathbf e_2) = -\mathbf e_2 ✓

python check
from sympy import sqrt
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
n = (e1 + e2)/sqrt(2)

print(-n*e1*n)      # -e2

two mirrors make a rotation

reflect in n\mathbf n's mirror, then in m\mathbf m's. the two minus signs cancel:

v′′=−m(−nvn)m=(mn) v (nm)\mathbf v'' = -\mathbf m(-\mathbf n\mathbf v\mathbf n)\mathbf m = (\mathbf m\mathbf n)\,\mathbf v\,(\mathbf n\mathbf m)

and two mirrors at an angle α\alpha give a rotation by 2α2\alpha - any kaleidoscope shows it. each reflection reverses the turning sense, so two of them preserve it, and what's left is a turn in the plane of n\mathbf n and m\mathbf m

v v′ v″ mirror 1 mirror 2
mirrors 30° apart turn v by 60° - twice the angle between them

rotors

the product of two unit vectors is the rotor R=mnR = \mathbf m\mathbf n, and the other side is its reverse, nm=R~\mathbf n\mathbf m = \widetilde R. with part 1's polar form - the angle between the mirrors is half the rotation angle θ\theta, and BB is the unit bivector of the rotation plane, oriented in the turning sense:

R=cos⁡θ2−Bsin⁡θ2=e−Bθ/2,v′=R v R~\boxed{R = \cos\tfrac\theta2 - B\sin\tfrac\theta2 = e^{-B\theta/2}, \qquad \mathbf v' = R\,\mathbf v\,\widetilde R}

the exponential works the same as eiφ=cos⁡φ+isin⁡φe^{i\varphi} = \cos\varphi + i\sin\varphi, since B2=−1B^2 = -1. and RR~=1R\widetilde R = 1, so a rotor never changes lengths

the rotor sits on both sides of v\mathbf v, and each side does half the work - the part of v\mathbf v in the plane turns by the full θ\theta, the part along the axis stays put

why half the angle

split v\mathbf v again, now against the plane BB:

  • the part in the plane anticommutes with BB, so it can be moved through R~=cos⁡θ2+Bsin⁡θ2\widetilde R = \cos\frac\theta2 + B\sin\frac\theta2 by flipping that sign - v∥R~=R v∥\mathbf v_\parallel\widetilde R = R\,\mathbf v_\parallel. so Rv∥R~=R2v∥=e−Bθv∥R\mathbf v_\parallel\widetilde R = R^2\mathbf v_\parallel = e^{-B\theta}\mathbf v_\parallel - two halves, one full rotation by θ\theta
  • the part perpendicular to the plane commutes with BB, so Rv⊥R~=v⊥RR~=v⊥R\mathbf v_\perp\widetilde R = \mathbf v_\perp R\widetilde R = \mathbf v_\perp - the two halves cancel, the axis stays put

so the half angle isn't a trick - one-sided multiplication by e−Bθe^{-B\theta} would rotate the in-plane part fine, but would mess up everything sticking out of the plane. the sandwich does both right. in 2D, where nothing sticks out, e−e12θve^{-\mathbf e_{12}\theta}\mathbf v alone is enough - it's the complex-number rotation eiθze^{i\theta}z

rotation about an axis

in 3D, the plane perpendicular to a unit axis u^\hat{\mathbf u} is its dual, B=Iu^B = I\hat{\mathbf u} (part 2). so a rotation by θ\theta about u^\hat{\mathbf u}, right-handed, is

R=e−Iu^ θ/2=cos⁡θ2−Iu^sin⁡θ2R = e^{-I\hat{\mathbf u}\,\theta/2} = \cos\tfrac\theta2 - I\hat{\mathbf u}\sin\tfrac\theta2

and that's the unit quaternion: with i,j,k=−Ie1,−Ie2,−Ie3\mathrm i, \mathrm j, \mathrm k = -I\mathbf e_1, -I\mathbf e_2, -I\mathbf e_3 from part 2, it's cos⁡θ2+(u1i+u2j+u3k)sin⁡θ2\cos\frac\theta2 + (u_1\mathrm i + u_2\mathrm j + u_3\mathrm k)\sin\frac\theta2 - the textbook quaternion rotation, half angle and all. GA just says what its parts are: a scalar and the plane of rotation

example - 90° about the z-axis

u^=e3\hat{\mathbf u} = \mathbf e_3, so B=Ie3=e12B = I\mathbf e_3 = \mathbf e_{12} and R=12(1−e12)R = \frac1{\sqrt2}(1 - \mathbf e_{12}). rotate v=e1+2e2+3e3\mathbf v = \mathbf e_1 + 2\mathbf e_2 + 3\mathbf e_3 - the half-angle argument ("why half the angle" above) does it without multiplying out the sandwich:

  • the in-plane part gets R2=12(1−e12)2=12(1−2e12−1)=−e12R^2 = \frac12(1 - \mathbf e_{12})^2 = \frac12(1 - 2\mathbf e_{12} - 1) = -\mathbf e_{12}, so −e12(e1+2e2)=e2−2e1-\mathbf e_{12}(\mathbf e_1 + 2\mathbf e_2) = \mathbf e_2 - 2\mathbf e_1
  • the 3e33\mathbf e_3 part stays

v′=−2e1+e2+3e3\mathbf v' = -2\mathbf e_1 + \mathbf e_2 + 3\mathbf e_3

the standard way, with the rotation matrix:

(0−10100001)(123)=(−213) ✓\begin{pmatrix}0 & -1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 1\end{pmatrix}\begin{pmatrix}1\\ 2\\ 3\end{pmatrix} = \begin{pmatrix}-2\\ 1\\ 3\end{pmatrix}\ ✓

python check
from sympy import sqrt
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
R = (1 - e1*e2)/sqrt(2)
v = e1 + 2*e2 + 3*e3

print(R*v*R.rev())      # -2*e1 + e2 + 3*e3

composing rotations

rotate by R1R_1, then by R2R_2: R2(R1vR~1)R~2=(R2R1) v (R2R1)~R_2(R_1\mathbf v\widetilde R_1)\widetilde R_2 = (R_2R_1)\,\mathbf v\,\widetilde{(R_2R_1)}, since reversing a product reverses its order. so composing rotations is multiplying rotors, R=R2R1R = R_2R_1 - and the result is again a rotor, with its axis and angle readable straight from it

example - 90° about z, then 90° about x

R1=12(1−e12)R_1 = \frac1{\sqrt2}(1 - \mathbf e_{12}) as above, and about x, B=Ie1=e23B = I\mathbf e_1 = \mathbf e_{23}, so R2=12(1−e23)R_2 = \frac1{\sqrt2}(1 - \mathbf e_{23}). with e23e12=e2e3e1e2=e31\mathbf e_{23}\mathbf e_{12} = \mathbf e_2\mathbf e_3\mathbf e_1\mathbf e_2 = \mathbf e_{31}:

R=R2R1=12(1−e23)(1−e12)=12(1−e12−e23+e31)R = R_2R_1 = \tfrac12(1 - \mathbf e_{23})(1 - \mathbf e_{12}) = \tfrac12(1 - \mathbf e_{12} - \mathbf e_{23} + \mathbf e_{31})

read it back as cos⁡θ2−Bsin⁡θ2\cos\frac\theta2 - B\sin\frac\theta2:

  • scalar part cos⁡θ2=12\cos\frac\theta2 = \frac12, so θ=120°\theta = 120°
  • the bivector part is −12(e23−e31+e12)=−32⋅13 I(e1−e2+e3)-\frac12(\mathbf e_{23} - \mathbf e_{31} + \mathbf e_{12}) = -\frac{\sqrt3}2\cdot\frac1{\sqrt3}\,I(\mathbf e_1 - \mathbf e_2 + \mathbf e_3), and sin⁡60°=32\sin 60° = \frac{\sqrt3}2 ✓, so the axis is 13(1,−1,1)\frac1{\sqrt3}(1, -1, 1)

the standard way, the matrix product Rx(90°) Rz(90°)R_x(90°)\,R_z(90°):

(10000−1010)(0−10100001)=(0−1000−1100)\begin{pmatrix}1 & 0 & 0\\ 0 & 0 & -1\\ 0 & 1 & 0\end{pmatrix}\begin{pmatrix}0 & -1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 1\end{pmatrix} = \begin{pmatrix}0 & -1 & 0\\ 0 & 0 & -1\\ 1 & 0 & 0\end{pmatrix}

to get the angle out, use the trace, 1+2cos⁡θ=01 + 2\cos\theta = 0, so θ=120°\theta = 120° ✓. the axis comes from the antisymmetric part, (M32−M23, M13−M31, M21−M12)=(1,−1,1)(M_{32} - M_{23},\ M_{13} - M_{31},\ M_{21} - M_{12}) = (1, -1, 1) ✓. same answer - but the matrix hides it, and the rotor just shows it

python check
from sympy import sqrt
from galgebra.ga import Ga

g3, e1, e2, e3 = Ga.build('e1 e2 e3', g=[1, 1, 1])
R1 = (1 - e1*e2)/sqrt(2)     # 90° about z
R2 = (1 - e2*e3)/sqrt(2)     # 90° about x
R = R2*R1
v = e1 + 2*e2 + 3*e3

print(R)                                 # 1/2 - e1^e2/2 - e1^e3/2 - e2^e3/2
print(R*v*R.rev())                       # -2*e1 - 3*e2 + e3
print(R2*(R1*v*R1.rev())*R2.rev())       # the same, one at a time

what we have

  • a reflection in the plane perpendicular to n\mathbf n is −nvn-\mathbf n\mathbf v\mathbf n
  • two reflections make a rotation by twice the angle between the mirrors, the rotor R=e−Bθ/2R = e^{-B\theta/2} applied as RvR~R\mathbf v\widetilde R
  • the half angle is because the rotor works from both sides - the in-plane part turns by the full angle, the axis stays
  • composing rotations is multiplying rotors, and the axis and angle can be read straight from the result
  • quaternions are 3D rotors, and nothing here is limited to 3D - the same formulas rotate in any dimension, and rotate planes and volumes as well as vectors. in part 7 they turn out to do Lorentz boosts too

next, derivatives - the vector derivative ∇\boldsymbol\nabla in GA does divergence and curl in one go