The principal components of a collection of points in a real "p"-space are a sequence of formula_1 direction vectors, where the formula_2 vector is the direction of a line that best fits the data while being orthogonal to the first formula_3 vectors. Here, a best-fitting line is defined as one that minimizes the average squared distance from the points to the line. These directions constitute an orthonormal basis in which different individual dimensions of the data are linearly uncorrelated. Principal component analysis (PCA) is the process of computing the principal components and using them to perform a change of basis on the data, sometimes using only the first few principal components and ignoring the rest.