Você está na página 1de 4

Ian Cooke

An Exercise in Diagonalization
e = un ,

R x

= R un

= R ex

Given a matrix A of pseudo-random numbers

A=

3 1 1

3 2
3

2 5

The characteristic polynomial of A is

A () = 3 + 42 23 + 3 = 0.

Where the roots of A are 1,2,3 = {7.23590, 3.10225, 0.13364}.


So, we take each i and look for solutions to

(A I)x = 0.
So, for = 7.23590 we get

(A 7.23590I)x =

10.2359 1.0000 1.0000 x1

3.0000
5.2359
6.0000 x2
=0

3.0000

2.0000

2.2359

x3

Using GNU Octaves Singular Value Decomposition routine (svd) we find


that x = (0.0089110, 0.7512124, 0.6600004) is a solution and thusly an
eigenvector for 7.23590.
So, for = 3.10225 we get

(A 3.10225I)x =

0.10225 1.00000 1.00000 x1

3.00000 5.10225
6.00000 x2
=0
3.00000

2.00000 8.10225

x3

Which has the solution x = (0.93379, 0.20072, 0.29621) which is an


eigenvector for = 3.10225.
Finally, for = 0.13364 we get

(A 0.13364I)x =

2.8664 1.0000 1.0000 x1

3.0000 2.1336
3.0000

6.0000

2.0000 5.1336

x2
x3

=0

Which has the solution x = (0.36978, 0.91826, 0.14165) which is an eigenvector for = 0.13364.
So, now we form a matrix Q with colums that are the eigenvectors of A

Q=

0.0089110 0.9337943 0.3697765

0.7512124 0.2007248 0.9182593


0.6600004

0.2962057 0.1416516

Note that

Q1 =

0.43170 0.34746 1.12550

1.02379

0.35251 0.38740

0.12938

0.88182 1.00543

And then we can diagonalize A by the matrix multiplication

Q AQ =
1

7.2359e+00

1.3930e15 5.2714e16

5.2313e17 3.1023e + 00 1.6581e15


7.7888e16

1.2154e15 1.3364e01

which is diagonal up to machine precision.

Below is a small Octave script that will generate a matrix of pseudorandom numbers and perform the preceeding steps
A = floor(rand(3)*10 - rand(3)*10)
chi = poly(A)
lambdas = roots(chi)
A1 = A - lambdas(1)*eye(3);
x1 = null(A1, 1e-13);
A2 = A - lambdas(2)*eye(3);
x2 = null(A2, 1e-13);
A3 = A - lambdas(3)*eye(3);
x3 = null(A3, 1e-13);
lambdas ;
Q = [x1 , x2, x3 ];
Qinv = inv(Q);
Qinv * Q;
Qinv * A * Q

Você também pode gostar