LINEAR-ALGEBRA Β· Interactive Practice | Unit 30 Β· Video 2
| Concept | Expression | Meaning |
|---|---|---|
| Change of basis | Rewrite the same vector in a new vocabulary | |
| Coefficient | (orthonormal case) | How much of pattern appears in |
| Thresholding | Keep if , else set to | The lossy step β information disappears here |
| Compression ratio | e.g. |
Each Haar basis vector watches a different slice of the signal β some the whole thing, some just two neighboring pixels.
π‘ Unlike a Fourier sine wave, which stretches across the whole signal, most Haar vectors are zero almost everywhere β that locality is what lets one coefficient pin down an edge.
A smooth signal hides in a few large coefficients β keep those, zero the rest, and barely notice.
π‘ Natural image blocks are smooth, so their energy piles into a few low-frequency coefficients β that sparsity, not the basis by itself, is what makes JPEG work.
Smooth signals are sparse in Fourier; sharp edges are sparse in wavelets β sparsity depends on the basis.
π‘ This is why JPEG 2000 and the FBI's fingerprint format (WSQ) use wavelets: a fingerprint is all edges, and edges are sparse in Haar, not Fourier.
Question 1
In the JPEG pipeline, an 8Γ8 pixel block (64 numbers) is rewritten using the Fourier basis to get 64 coefficients .
At this step β before any thresholding β has any information been lost?
β Correct! Change of basis just renames the same vector in a new vocabulary.
β Not quite. Don't confuse the change of basis step with the thresholding step. Only thresholding loses information.
Solution:
A change of basis just rewrites the same vector using different "vocabulary" β it does not throw anything away. If is the original pixel vector and is the Fourier-coefficient vector, then we can always recover
The lossy step in JPEG is thresholding (Act 2), where small coefficients are set to zero. The change-of-basis step itself (Act 1) is perfectly reversible.
Question 2
Suppose an 8Γ8 block (64 numbers) is compressed by keeping only 4 of its 64 Fourier coefficients. What is the compression ratio?
β Correct! , so the compression ratio is 16:1.
β Not quite. Compression ratio = (original numbers) / (stored numbers).
Solution:
Compression ratio compares the original number of values to the stored number of values:
So we get 16:1 compression. The reconstruction still produces all 64 pixel values, but we only had to store 4 numbers to get there.
Question 3
You need to compress an image containing sharp fingerprint ridges (lots of edges and fine-scale local features). The FBI famously chose a wavelet-based standard for this task rather than JPEG's Fourier-based one.
Why are wavelets a better fit than Fourier here?
β Correct! Localization in space is the wavelet's superpower for edges.
β Not quite. The key word is localization β wavelets know where features are, not just how wavy they are.
Solution:
Fourier basis vectors stretch across the entire interval. A sharp edge β a single sudden jump β cannot be captured by any one Fourier vector, so the edge "spreads out" across many high-frequency coefficients. That kills sparsity, and sparsity is what makes compression work.
Haar wavelets, by contrast, are localized in both space and frequency. A jump at position 4 mostly lights up the wavelet that sits at position 4 β a few coefficients, not many.
This is exactly why the FBI's fingerprint compression standard (WSQ) shrinks each fingerprint by roughly 15:1 while preserving identifying ridge detail, and why JPEG 2000 also uses wavelets.
Question 4
True or False: The Fourier basis and the Haar wavelet basis in span different subspaces of β that is, there are vectors expressible in one basis that cannot be expressed in the other.
β Correct! Both are bases of the same space β they just describe vectors using different vocabularies.
β Not quite. Recall the video: the Fourier checkerboard equals a sum of four Haar wavelets. Every vector in can be expressed in either basis.
Solution:
False. Any basis of spans all of β that's literally what "basis" means. The Fourier basis and the Haar wavelet basis describe the same space, just in different vocabularies.
The video made this explicit by writing the Fourier checkerboard vector as a sum of four Haar wavelets:
Every vector expressible in one basis is expressible in the other. What differs is which vectors are sparse (have few nonzero coefficients):
Same space, different strengths.
Solved: 0 / 4