Principal Components Analysis (contd.)

 

Eigenvectors:

Let A be a kxk matrix and l be an eigenvalue of A. If X is a non zero vector such that:

AX = l X

then X is an eigenvector of A associated with the eigenvalue l .

Consider A = {1 0, 1 3} then l 1 = 1 and l 2 = 3. For l 1 = 1, X = {-2, 1} is an eigenvector and for l 2 = 3, X = {0, 1} is an eigenvector.

 

Spectral Decomposition:

Let A be a square symmetric matrix. A can be written as the product of two matrices P and L so that:

A = P L PT

where P is a kxk, symmetric, orthogonal matrix containing the eigenvectors of A and L is a pxp diagonal matrix containing the eigenvalues of A. This is known as the Spectral Decomposition of A.

 

Principal Components of X:

Let X be a matrix of the instances of x1,…,xk. Let S be the kxk covariance matrix of X. Since S is a square symmetric then its Spectral Decomposition is:

S = P L PT

Now, the principal components of X are given by the matrix C so that:

C = X P

Let S c be the kxk covariance matrix of C then:

S c = (X P)T(X P) = PT XT X P = PT S P

Since S = P L PT then:

S c = PT P L PT P = L

Thus the covariance matrix of C is a pxp diagonal matrix containing the eigenvalues of X. So, if c1,…,ck are the variables denoting the columns of C then they are uncorrelated with variances l 1,…, l k since S c = L .

Now, the total variance of X is the same as the total variance of C. To see this, examine the trace of the covariance matrix S (i.e. tr(S )). Remember that tr(S ) is the sum of the diagonal elements of S where the diagonal elements are s j; j=1,..,k.

Now:

tr(S ) = tr(P L PT) = tr(PT P L ) = tr(L )= tr(S c)

Hence, the total variance of X is equal to the total variance of C.

 

Summary:

Thus, to find the principal components of X we simply need to determine the Spectral Decomposition of the covariance matrix of X (i.e. S ) and then we can determine C by computing C = X P.