We have seen that the discrete Fourier transform (DFT) is an example of an orthogonal basis for finite length discrete-time signals. As a basis, a linear combination of its basis elements $\{b_k\}$ can represent any signal $x$: $x=\sum_{k=0}^{N-1}\alpha_k b_k=Ba$Furthermore, as an orthogonal basis, its basis elements are mutually orthogonal, meaning that the weights needed to build up a particular signal $x$ can be found with a weighted inner product of $x$ and the basis element in question. If all of the basis elements are unit norm, then the basis is orthonormal, and a simple inner product will find the weights: $\alpha_k=\langle x, b_k\rangle~,~a=B^H x$The DFT is a particularly useful basis, for its basis vectors $e^{j\frac{2\pi}{N}kn}$ are the eigenfunctions of all LTI systems. As such, they are simply scaled when passing through a system. But as useful as the DFT is, there are other significant orthogonal bases to consider, as well.
The discrete cosine transform
Since the DFT uses complex harmonic sinusoids to analyze and synthesize signals, the DFT coefficients of real signals are almost always complex-valued (unless the signal is even, in which case the coefficients are purely real). This normally poses no problem, but there are some circumstances in which real coefficients are preferable. One example is when signal compression is desired. In such applications, a signal is transformed and only a few of the largest transform coefficients are kept. Having to store both the real and the imaginary parts of the coefficients would mean twice the storage. It is for this reason that the discrete cosine transform (DCT) is used in signal compression applications (such as the JPEG image compression standard). The DCT is very similar to the DFT, as it also uses sinusoids as basis elements, except that its basis elements are purely real-valued. There are several varieties of the DCT, but the most popular is the DCT-II, which has the following basis elements:$d_k[n] ~=~ \cos\!\left[ \frac{\pi}{N} \left(n+\frac{1}{2}\right) k \right], \quad 0\leq n,k \leq N-1$
Wavelet transforms
We have seen that with the DFT (and DCT as well), signals can be represented in either the time domain (e.g., as $x[n]$), or in the frequency domain through their DFT (e.g., $X[k]$). Both representations are equivalent, of course, for one can always be derived from the other. But sometimes one way of expressing a class of signals is desired, such as when as signal can be expressed with just a few values. For example, the signal $x[n]=\delta[n]$ can be expressed with just a single nonzero value in the time domain, but it does not have any nonzero values in the frequency domain. Thus we say the signal is localized in time. Likewise, the signal $x[n]=e^{j\frac{2\pi}{16}n}$ has only a single nonzero DFT coefficient, while all of its values in the time domain are nonzero. That is a kind of signal we say is localized in frequency. If a signal is localized in time or in frequency, we can efficiently store and process its signal values, by storing/operating on the signal in the best of those two domains.But some signals are not localized very well in time or in frequency. If a signal has frequency components that show up and then are absent at different times, then neither the time or the frequency domain does a good job of efficiently representing such as signal. An example of such a signal would be a musical melody; at any given time it may be expressed as being a single (predominant) frequency, but these frequencies (i.e., the notes) obviously change quite a bit over time (the work of Philip Glass notwithstanding).
There are many transforms that are designed specifically for analysis and concise representation of these signals that have localized frequency components, two of which we will consider. The first is the Haar Wavelet, which is one of a class of wavelet transforms. The basis functions of the Haar wavelet transform, like other wavelets, are localized in both time and frequency, as illustrated in the following figure: