If you have a given matrix, m, then one of the ways is to take the eigenvectors times the diagonal of the eigenvalues ββtimes the inverse of the original matrix. This should return the original matrix. In R it looks like this:
m <- matrix( c(1:16), nrow = 4) p <- eigen(m)$vectors d <- diag(eigen(m)$values) p %*% d %*% solve(p) m
therefore, in this example, [p %% d %% solve (p)] should be the same as m
and yes, I completely stole it from the R Wiki .
Jd long
source share