Given a square symmetric matrix
Principal component analysis (PCA) can be formulated as the minimization of a quadratic form of the covariance matrix, where the first principal component is the vector that minimizes the form and its magnitude is the variance along that vector.