preserving order of eigenvalues in a matrix diagonalization
- To: mathgroup at smc.vnet.net
- Subject: [mg61819] preserving order of eigenvalues in a matrix diagonalization
- From: grub_snuffler at yahoo.com
- Date: Mon, 31 Oct 2005 01:17:12 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I'm trying to diagonalize a matrix in Mathematica, but I need the eigenvalues
to stay in order. So, for instance, for the initial matrix m,
m = {{2, 0}, {0, 3}}
some function, say "diagonalize[m]", should just return m.
If I use
diagonalize[m_] := Transpose[Eigenvectors[m]].m.Eigenvectors[m]
it returns {{3, 0}, {0, 2}}. I can certainly write my own routine by
hand, but I thought I'd ask if there's an easy way to ask Mathematica to
preserve the order.
Thanks,
john
- Follow-Ups:
- Re: preserving order of eigenvalues in a matrix diagonalization
- From: Kristjan Kannike <kkannike@physic.ut.ee>
- Re: preserving order of eigenvalues in a matrix diagonalization
- From: Pratik Desai <pdesai1@umbc.edu>
- Re: preserving order of eigenvalues in a matrix diagonalization