this maximum can be at most `= `and is attained precisely when uk are the first principal components of example (singular value decompositionthe following data set consists of independent samples from the three-dimensional gaussian distribution with mean vector and covariance matrix given in example - - - - - - - - - - - - after replacing with its centered versionan svd ud uof xx/ yields the principal component matrix and diagonal matrix - - - - - - and we also observe thatapart from the sign of the first columnthe principal component matrix is similar to that in example likewise for the matrix we see that of the total variance is explained by the first principal component figure shows the projection of the centered data onto the subspace spanned by this principal component figure data from the "surfboardpdf is projected onto the subspace spanned by the largest principal component the following python code was used