Principal component analysis is used to reduce the number of variables of a data set, while preserving as much information as possible.
In this example we have a dataset of 100 imgaes of teapots of dimension 38x50 pixels. We take the top 3 eigen values and eigen vectors of the data and use it to reconstruct the teapot images.
Below are the results, with before and after reconstruction with PCA.