You are on page 1of 2

Diagonalizing and Whitening a Covariance Matrix

LGH
3-25-03
Given two Gaussian r.v.s, x1, x2, with zero mean and covariance

 1 − 3 / 4
C xx =  (1)
− 3 / 4 1 

We want to find a transformation

y = Ax (2)

where y = [ y1 y2]T, x = [ x1 x2]T and A is 2x2.

Step 1: Find eigenvalues of Cxx.


The eigenvalues are found by setting the determinant of Cxx - λI I equal to 0:

C xx − λi I = 0 (3)

For the values in Eq. (1) we have

(1 − λi )2 − 9 / 16 = 0 = λi2 − 2λi + 7 / 16 (4)

λ1 , λ 2 = 7 / 4,1 / 4 (5)

Step 2: Find eigenvectors of Cxx.


We know the relationship of eigenvalues and eigenvectors is

C xx ei = λi ei (6)

and in matrix form

C xx E = E Λ (7)

where the columns of E are the eigenvectors and the diagonal of Λ contains the eigenvalues. Also note that for
orthonormal case, ET=E-1

The eigenvalue/eigenvector relationship is

0  c − λ i c12   e1,i 
(C xx − λi I )ei =   =  11   (8)
0  c 21 c 22 − λi  e2,i 

The Eq. (8) will give two sets of equations but for reasons we will not go into, we will only use the first equation
such that

1
(1 − λi )e1,i − (3 / 4)e2,i =0 (9)

Let i = 1 so Eq. (9) is

(1 − 7 / 4)e1,1 = (− 3 / 4)e1,1 = (3 / 4)e2,1 (10)

Let i = 2 so Eq. (9) is

(1 − 1 / 4)e1, 2 = (3 / 4)e1,2 = (3 / 4)e2,2 (11)

We see that for one eigenvector e1,1 = -e2,1 and for the other eigenvector e1,2 = e2,2. The inner product of an
eigenvector with itself is unity for an orthonormal eigenvector so if we let the element values have values

1  1 1
E=   (12)
2 − 1 1

Step 3: Diagonalize Cyy


Letting A=ET such that

y i = eiT x = e1,i x1 + e2,i x 2 (13)

we can diagonalize Cyy such that

{ } = AE{x x }A
C yy = E y y
T T T
= AC xx AT = E T C xx E = E T EΛ = Λ (14)

Step 4: Whitening Cyy


From Eq. (14), we can see that if we weighted A by Λ-1/2 we would get an identity matrix for Cyy. The algebra for
this would be based on letting A= Λ-1/2ET such that

{ } = AE{x x }A
C yy = E y y
T T T
= AC xx AT = Λ−1 / 2 E T C xx E Λ−1 / 2 = Λ−1 / 2 E T EΛΛ−1 / 2 (15)

and so because the eigenvalue matrix is diagonal we can use algebra to complete the whitening as

C yy = Λ−1 / 2 ΛΛ−1 / 2 = Λ−1 Λ = I (16)

You might also like