The Geometry of the fast Walsh Hadamard transform

The geometry of the Fast Walsh–Hadamard Transform (FWHT), why it’s a change of basis, and some related insights.


1. The Walsh–Hadamard transform as a matrix




2. The Walsh basis: geometry and interpretation

Each row (or column) of HNH_N is one Walsh function:

  • Values: Each function takes only ±1\pm 1 values.

  • Ordering: Rows can be ordered by sequency — the number of sign changes per unit time.

  • Orthogonality: The Walsh functions form a set of mutually orthogonal vectors spanning RN\mathbb{R}^N.

In geometric terms:

  • The Walsh basis vectors are vertices of a hypercube, but arranged so that they are orthogonal in the Euclidean sense.

  • The FWHT changes coordinates from the standard “axis-aligned” basis to this set of “±1 pattern” basis vectors.


3. Fast computation: butterfly geometry

The FWHT algorithm exploits the recursive block structure of HNH_N to compute the transform in O(NlogN)O(N \log N) time.

Geometric view of the butterfly steps:

  • At each stage, we pair up coordinates, compute their sum and difference.

  • This is like a rotation/reflection in a 2D subspace spanned by each pair of coordinates.

  • Successive stages mix larger and larger groups of coordinates — building the global change of basis from a sequence of local 2D transforms.

This is analogous to the FFT’s geometric interpretation (progressive twiddle rotations), but here all coefficients are ±1\pm 1 so there are no true “rotations” — just orthogonal flips.


4. Comparison to Fourier

  • Fourier basis: sinusoidal functions with varying frequency.

  • Walsh basis: square-wave functions with varying sequency (sign-flip rate).

  • Both are orthonormal changes of basis; the difference is in the shape of the basis vectors.

  • Walsh basis vectors are much simpler (±1 values), making the transform integer-friendly and extremely fast.


5. Other relevant properties



  • Applications:

    • Efficient convolution with ±1 patterns

    • Spreading sequences in communications (CDMA)

    • Compressive sensing with binary sensing matrices

    • Fast random projections (structured random features)

  • Random features link: If you multiply by a diagonal random ±1 matrix before/after the FWHT, you get a JL-type random projection with O(NlogN) complexity.

Comments

Popular posts from this blog

Neon Bulb Oscillators

23 Circuits you can Build in an Hour - Free Book

Q Multiplier Circuits