Paul Gilbert wrote: > > I am getting a bit rusty on some of these things, but I seem to recall > that there is a numerical advantage (speed and/or accuracy?) to > > diagonalizing: (...) > > I think this also works for non-integer, negative, large, and complex > This is diverging into mathematics, maybe this is off-topic, but...
Not all matrices can de diagonalized, but they can be transformed (by invertible matrices) into a canonical form, called Jordan. This canonical form has the eigenvalues in the main diagonal (they may be complex numbers), 1s or 0s in the diagonal just above the main diagonal, and 0 everywhere else. Based on this, it's possible to define f(M) for _any_ function f that has enough derivatives. f(J), for a matrix in the Jordan canonical form, has f(x) in the main diagonal (where x are the eigenvalues) and f'(x) in some values of the diagonal just above that, f''(x)/2! in the next, etc. It's in "Jordan normal form", in the borg of all wisdom, the wikipedia. Alberto Monteiro ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.