where *s* is the array of *N* original values, *t* is the array of *N*
transformed values, and the coefficients *c* are given by

for .

The discrete cosine transform in two dimensions, for a square matrix, can be written as

The DCT has an inverse, defined by

for the one-dimensional case, and

for two dimensions.

The DCT is included in commercial image processing packages, e.g. in Matlab (see [MATLAB97]).

Rudolf K. Bock, 7 April 1998