Every Euclidean isometry of is a product of at most operations of reflection in a hyperplane. An isometry fixing zero is orthogonal: the polarization identity preserves inner products, and its values on an orthonormal basis determine its linear action. An orthogonal transformation is a product of at most linear reflections, by reflecting the image of the first basis vector back to that vector and inducting on its orthogonal complement. For an arbitrary isometry, first reflect its image of zero back to zero, if necessary, and apply the orthogonal result. Affine reflection hyperplanes, rather than only hyperplanes through zero, are essential here.
For unit , put . Then and , so is an orthogonal matrix. The affine reflection in a hyperplane is . Hence preserves the Euclidean norm and distance, and whenever . Thus it is an Euclidean isometry fixing the hyperplane pointwise.
For , any reflection exchanging them must have normal parallel to , and its fixed hyperplane must contain their midpoint. These requirements determine the perpendicular bisector uniquely:
Changing both signs of leaves the same reflection. It belongs to the orthogonal group exactly when its translation term vanishes, that is, . Since ,
To prove the finite reflection decomposition of a Euclidean isometry, first note that a distance-preserving map fixing zero preserves inner products by the polarization identity. Its values on an orthonormal basis form an orthonormal basis, and shows . Thus is orthogonal.
Every orthogonal transformation is a product of at most linear reflections: if , reflect to using the hyperplane normal , which passes through zero. The resulting orthogonal transformation fixes , and its restriction to is handled inductively in dimension . If , no initial reflection is necessary. Reflections on the complement extend by fixing ; the induction starts in dimension zero.
For an arbitrary isometry , if , first reflect to zero across its perpendicular bisector with zero. Composing this one affine reflection with gives an orthogonal transformation. If , skip the initial reflection. Therefore
The glide reflection cannot use fewer than three: its determinant sign is negative, excluding zero or two reflections, while absence of fixed points excludes a single reflection. Three suffice by reflecting successively in , , and .
Write . The reflection in a hyperplane orthogonal to sends
so
It acts as on and as on the three-dimensional hyperplane . Therefore
Let be the orthogonal projection onto the good linear subspace and write
where the two displayed states are normalized projections into and . Define the reflections
The amplitude amplification iterate preserves the good-bad plane, and its th iterate satisfies
Thus repeated reflections rotate amplitude toward the good subspace, reaching constant success probability after iterations.
Set . Unitary conjugation gives
The operator negates and fixes every vector in orthogonal to it. It is therefore the reflection in a hyperplane whose normal is .
In the ordered orthonormal basis
of , the Pauli Z gate acts as
It fixes the line and negates , so it is the reflection in a hyperplane orthogonal to the good state.