Calculus & Analysis

Haar Wavelet Transform

Split a signal into local averages and details while preserving its energy.

By Riano · Published · Updated · Report a correction

Haar Wavelet Transform

The Haar Wavelet Transform is a mathematical operation that splits a discrete signal into local averages and details. Unlike the global Fourier Transform, which uses sine and cosine waves that extend infinitely, the Haar transform uses localized basis functions, making it excellent for analyzing signals with sudden changes or identifying local features without affecting the global representation.

Worked Example

Consider a basic signal sequence representing a step function: [1, 1, 0, 0]. At the first level of the Haar transform, we take pairs of adjacent samples and compute their normalized average and detail (difference):

  1. Pair 1: 1 and 1. The normalized average is (1 + 1) / √2 = √2 ≈ 1.414. The detail is (1 - 1) / √2 = 0.
  2. Pair 2: 0 and 0. The normalized average is (0 + 0) / √2 = 0. The detail is (0 - 0) / √2 = 0.

The level 1 transform coefficients are ordered as averages followed by details: [√2, 0, 0, 0].

At level 2, we repeat the process on the newly computed averages [√2, 0]:

  1. Pair 1: √2 and 0. The normalized average is (√2 + 0) / √2 = 1. The detail is (√2 - 0) / √2 = 1.

The level 2 transform coefficients become: [1, -1, 0, 0]. Notice how the energy of the signal is preserved (Parseval's theorem): the sum of squares of the original signal is 0² + 0² + 1² + 1² = 2, and the sum of squares of the coefficients is 1² + (-1)² + 0² + 0² = 2.

Experiment

In the interactive module at https://riano.app/module/haar-wavelet-transform, you can explore the Haar Wavelet Transform for different basic signal shapes.

  1. Select the Ramp signal from the dropdown.
  2. Switch between Level 1 and Level 2.
  3. Observe how the coefficients change and how the details capture the differences between adjacent points. You can verify that the signal energy always exactly matches the coefficient energy, confirming that the transform is orthonormal and energy-preserving.

Limitations

The Haar wavelet is discontinuous (it resembles a step function itself), which means it is not well-suited for approximating smooth, continuous signals or functions. When analyzing smooth data, other continuous wavelets (like the Daubechies family) often provide a sparser representation with fewer significant coefficients.

References

The mathematical foundations of wavelet transforms and localized multiscale analysis are covered in engineering mathematics courses:

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Haar Wavelet Transform module.

Try Haar Wavelet Transform on Riano →

More in Calculus & Analysis