I've put some new and updated Maxima code on my
webpage http://www.unk.edu/acad/math/people/willisb/
(1) NSet (version 1.2.03). This has been on my page for awhile, but there
wasn't a link to it. You can read its documentation here
http://www.unk.edu/acad/math/people/willisb/nset.html
(2) matrixexp (version 1.0) This computes the spectral representation of a
matrix. spectral_rep returns a list with three memebers. The first element
is a list of the eigenvalues, the second is a list of the corresponding
projections, and the third is the nilpotent part of the matrix
(C1) spectral_rep(matrix([1,2],[2,1]));
(D1)
[[3,-1],[MATRIX([1/2,1/2],[1/2,1/2]),MATRIX([1/2,-1/2],[-1/2,1/2])],MATRIX([0,0],[0,0])]
(C2) spectral_rep(matrix([1,2],[0,1]));
(D2) [[1],[MATRIX([1,0],[0,1])],MATRIX([0,2],[0,0])]
(C3)
There is a usage file for this code.
Barton