Commuting plane reflections (source code)

= Commuting plane reflections
{title2=$H_bH_a-H_aH_b=4(a\cdot b)(ba^T-ab^T)$}

For real <unit vectors> $a,b$, the <Householder reflections> $H_a=I-2aa^T$ and $H_b=I-2bb^T$ commute exactly when their normals are parallel or <orthogonal>. Expanding their products proves the formula. If $a\cdot b\ne0$, a zero commutator requires $ba^T=ab^T$; applying this identity to $a$ gives $b=(a\cdot b)a$, hence parallelism. Orthogonal normals make the prefactor zero.

Equality on one selected <vector> is weaker than equality of the operators. For nonparallel, nonorthogonal normals in three dimensions, the commutator's <kernel> is the line perpendicular to both normals, spanned by $a\times b$. A vector on that line is fixed by both reflections even though the operators do not commute.