Wavelet bases and multiresolution
Build Haar scaling and detail spaces, derive energy-preserving coefficients, and distinguish localized resolution from global Fourier modes.
On this page
The question for today
What you’ll understand
- Describe the nested dyadic Haar approximation spaces.
- Compute normalized average and detail coefficients with exact energy accounting.
- Explain localization, vanishing moments, and what a finite transform does not certify.
A sharp local feature can force many global Fourier modes to participate. Wavelets offer another coordinate system: basis functions carry both a location and a scale. The Haar construction makes this idea completely explicit through adjacent averages and differences. Its piecewise-constant approximations are simple enough to calculate by hand, while revealing the orthogonal decomposition behind more sophisticated wavelet families.
Nested spaces separate resolution from detail
On , let be the L² space of functions constant on each of the dyadic subintervals. These finite-dimensional spaces are nested, and their union is dense in L². At each scale, the finer space contains both old coarse information and new detail. Define as the orthogonal complement of inside . Then every fine approximation splits uniquely into a coarse projection plus a detail component at that scale.
For Haar wavelets, the coarse scaling function is the indicator of the whole unit interval. A mother wavelet is plus one on the first half and minus one on the second, with value zero outside. Dilation and translation place normalized copies on dyadic subintervals. Endpoints of these pieces can be assigned consistently in any way because changing finitely many point values does not change an L² function. The normalization factor ensures each wavelet has norm one, not merely height one.
Averages and differences preserve energy
If two neighboring fine-scale scaling coefficients are a and b in an orthonormal basis, the next coarser scaling coefficient is and the detail coefficient is . This is an orthogonal two-by-two transformation, so it preserves the sum of squares. Applying it recursively gives the Haar pyramid transform. Raw sample heights are not always the same as normalized scaling coefficients; interval lengths determine the conversion between them.
For a square-integrable function, the coefficient of each basis function is its inner product with that function. Orthogonality means the squared norm of a finite reconstruction equals the sum of squared coefficients, and the squared approximation error equals the omitted coefficient energy when the full basis expansion is used. Projection onto V_j replaces the function by its average on every dyadic cell. It therefore need not preserve a point value or reproduce a discontinuity whose location falls inside a cell.
Localization and smoothness are different design features
Every Haar wavelet has zero integral, so its coefficient vanishes for a constant target on its support. This is one vanishing moment. More regular wavelet families can have several vanishing moments, canceling local polynomial behavior through higher degree. A small coefficient can then signal that the target is locally well represented at a coarser scale. The precise approximation rate depends on the function class, the wavelet's regularity and moments, and the norm in which error is measured.
Haar is compactly supported but discontinuous, so localization does not imply smooth basis functions. Global sine functions are smooth but not spatially localized. A finite discrete wavelet transform also requires decisions about boundary treatment and how samples represent an underlying function. Perfect algebraic reconstruction of the input samples is different from recovering unresolved continuous features. Compression introduces further choices: discarding coefficients gives an approximation, and quantizing retained coefficients adds an error beyond the discarded tail.
Work it through
Resolve a four-cell signal
On the four equal quarters of [0,1], let f have heights 4,0,2,2. Compute its coefficients against the constant scaling function, the coarsest Haar wavelet, and the two next-scale wavelets. Check the L² energy.
The constant coefficient is the integral of f, equal to (4+0+2+2)/4=2. The coarsest detail compares the two half-interval integrals: one minus one equals zero.
The left next-scale wavelet has height +√2 on the first quarter and −√2 on the second. Its coefficient is √2(4−0)/4=√2. The right next-scale coefficient is √2(2−2)/4=0.
The function energy is (16+0+4+4)/4=6. The coefficient energies are 2²+0²+(√2)²+0²=6, agreeing exactly. Keeping only the constant projection gives the function two everywhere and squared error two.
The nonzero coefficients are the global average two and one localized detail √2; their energy sum exactly recovers six.
The living notebook
Explore the model
Interactive lab · heat
Compare scale-sensitive damping
Pause and Reset, then set spatial mode n = 1 and diffusivity κ = 0.4. Predict one Step, or t = 0.5, leaves amplitude exp(−0.2)≈0.819. Reset and set both n = 4 and κ = 0.4; at the same time predict exp(−3.2)≈0.0408. Compare the scales' damping. This exact periodic sine-mode heat instrument uses global Fourier modes, not localized Haar wavelets or a wavelet transform.
- Current amplitude
- 1
- Spatial L² norm
- 1.772
- Decay rate · κn²
- 3.6 /s
The exact periodic heat-equation mode is u(x,t) = exp(−κn²t) sin(nx), on [0,2π]. Playback advances physical time. The initial sine is shown separately, and the unnormalized L² norm is √π exp(−κn²t). This analytic instrument does not run a finite-difference solver or test discretization stability. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forSpatial scale affects how a feature behaves, but a scale label alone does not supply wavelet localization or basis coefficients.
Pause & reason
Check your understanding
Your turn
Try it yourself
Repeat the four-quarter calculation for heights 1,3,3,1. Find the constant coefficient, the coarsest detail, and both next-scale details. Verify the energy and identify the error if only the global constant is kept.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The half-interval averages agree, so their coarse difference vanishes. Each normalized quarter-pair detail is √2 times a height difference divided by four.
Compare with the solution
The constant coefficient is two, the coarsest detail is zero, and the next-scale coefficients are and . Direct energy is . Coefficient energy is , confirming normalization. The constant-only reconstruction equals two everywhere and has squared error one, or L² error one. The nonzero details live in two different half-intervals even though the coarsest half-to-half comparison misses them.
Keep the idea
Take it with you
- Multiresolution decomposes a finer space into a coarse space and orthogonal details.
- Normalized Haar averages and differences preserve L² energy.
- Localization, smoothness, vanishing moments, and finite-sample reconstruction are distinct properties.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.