Hello.

Consider the following matrix:

mp <- matrix(c(0,1/4,1/4,3/4,0,1/4,1/4,3/4,1/2),3,3,byrow=T)

> mp
     [,1] [,2] [,3]
[1,] 0.00 0.25 0.25
[2,] 0.75 0.00 0.25
[3,] 0.25 0.75 0.50


The eigenvectors of the previous matrix are 1, 0.25 and 0.25 and it is not a diagonalizable matrix.

When you try to find the eigenvalues and eigenvectors with R, R responses:

> eigen(mp)

$values
[1]  1.00 -0.25 -0.25

$vectors
          [,1]          [,2]          [,3]
[1,] 0.3207501  1.068531e-08 -1.068531e-08
[2,] 0.4490502 -7.071068e-01 -7.071068e-01
[3,] 0.8339504  7.071068e-01  7.071068e-01

The eigenvalues are correct but the eigenvectors aren't. Moreover, if you try to compute the inverse of the matrix of eigenvectors, R is not aware that this matrix is singular:


> solve(eigen(mp)$vectors)
              [,1]          [,2]          [,3]
[1,]  6.235383e-01  6.235383e-01  6.235383e-01
[2,]  3.743456e+07 -9.358641e+06 -9.358640e+06
[3,] -3.743456e+07  9.358640e+06  9.358641e+06


My question is: how can I fix it?



Arnau.

------------------------------------------------------------
Arnau Mir Torres
Edifici A. Turmeda
Campus UIB
Ctra. Valldemossa, km. 7,5
07122 Palma de Mca.
tel: (+34) 971172987
fax: (+34) 971173003
email: arnau.mir@uib.es
URL: http://dmi.uib.es/~arnau
------------------------------------------------------------


	[[alternative HTML version deleted]]

