Free access

# The Discrete Cosine Transform

## Abstract

Each discrete cosine transform (DCT) uses N real basis vectors whose components are cosines. In the DCT-4, for example, the jth component of $\boldv_k$ is $\cos (j + \frac{1}{2}) (k + \frac{1}{2}) \frac{\pi}{N}$. These basis vectors are orthogonal and the transform is extremely useful in image processing. If the vector $\boldx$ gives the intensities along a row of pixels, its cosine series $\sum c_k \boldv_k$ has the coefficients $c_k=(\boldx,\boldv_k)/N$. They are quickly computed from a Fast Fourier Transform. But a direct proof of orthogonality, by calculating inner products, does not reveal how natural these cosine vectors are.
We prove orthogonality in a different way. Each DCT basis contains the eigenvectors of a symmetric "second difference" matrix. By varying the boundary conditions we get the established transforms DCT-1 through DCT-4. Other combinations lead to four additional cosine transforms. The type of boundary condition (Dirichlet or Neumann, centered at a meshpoint or a midpoint) determines the applications that are appropriate for each transform. The centering also determines the period: $N-1$ or N in the established transforms, $N-\frac{1}{2}$ or $N+ \frac{1}{2}$ in the other four. The key point is that all these "eigenvectors of cosines" come from simple and familiar matrices.

## Formats available

You can view the full content in the following formats:

## References

1.
N. Ahmed, T. Natarajan, K. Rao, Discrete cosine transform, IEEE Trans. Computers, C‐23 (1974), 90–93
2.
Ronald Coifman, Yves Meyer, Remarques sur l’analyse de Fourier à fenêtre, C. R. Acad. Sci. Paris Sér. I Math., 312 (1991), 259–261
3.
N. J. Jayant and P. Noll, Digital Coding of Waveforms, Prentice‐Hall, Englewood Cliffs, NJ, 1984.
4.
H. S. Malvar, Signal Processing with Lapped Transforms, Artech House, Norwood, MA, 1992.
5.
S. Martucci, Symmetric convolution and the discrete sine and cosine transforms, IEEE Trans. Signal Processing, 42 (1994), pp. 1038–1051.
6.
Gilbert Strang, The discrete cosine transform, SIAM Rev., 41 (1999), 135–147
7.
V. Sanchez, P. Garcia, A. Peinado, J. Segura, and A. Rubio, Diagonalizing properties of the discrete cosine transforms, IEEE Trans. Signal Processing, 43 (1995), pp. 2631–2641.
8.
G. Strang, The search for a good basis, Pitman Res. Notes Math. Ser., Vol. 380, Longman, Harlow, 1998, 212–229
9.
Gilbert Strang, Truong Nguyen, Wavelets and filter banks, Wellesley‐Cambridge Press, 1996xxii+490
10.
Zhong Wang, B. Hunt, The discrete $No alternative text available$ transform, Appl. Math. Comput., 16 (1985), 19–48
11.
Mladen Wickerhauser, Adapted wavelet analysis from theory to software, A K Peters Ltd., 1994xii+486, With a separately available computer disk (IBM‐PC or Macintosh)
12.
D. Zachmann, Eigenvalues and Eigenvectors of Finite Difference Matrices, unpublished manuscript, 1987, http://epubs.siam.org/sirev/zachmann/.

## Information & Authors

### Information

#### Published In

SIAM Review
Pages: 135 - 147
ISSN (online): 1095-7200

#### History

Published online: 4 August 2006