Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Given a set $\{A_1,...,A_m\}$ of $m$ commuting $N\times N$ diagonalizable matrices, it is known that there exists a basis of eigenvectors $\Lambda$ that simultaneously diagonalizes all the $A_i$.

Is there an automated way to compute $\Lambda$ in Mathematica?

For a pair of matrices $\{A_1,A_2\}$ it can be done "by hand" using Eigenvectors to first compute the eigenvectors $\Lambda_1$ of $A_1$, finding similarity transforms $P_k$ that act on the degenerate subspaces of $\Lambda_1$ to make them also eigenvector of $A_2$, and then combining the transformed degenerate subspaces together to form $\Lambda$, but I don't know how to generalize this to more than 2 matrices.

share|improve this question
1  
I'll mention the related post at Wolfram Community –  Daniel Lichtblau Apr 28 at 16:16
    
@DanielLichtblau: Thanks, I applied Eigenvectors to the matrix pencil $L(\lambda)=\sum_{j=1}^m\lambda^jA_j$ and it worked for $m=3$ matrices using a random real value for $\lambda$, providing a basis set which simultaneously diagonalized all three. How sensitive is it to floating point errors in the $A_j$ that spoil the commutativity slightly? It seems there is a fair amount of material available online on it, so I'll look into it further. –  DumpsterDoofus Apr 28 at 18:08
    
I don't know how sensitive it is. I suspect it is fine when the "near commuting" n x n matrices each have n distinct (and reasonably well separated) eigenvalues. At degeneracies it might not be so nice since eigenspaces can start to get pretty cranky. –  Daniel Lichtblau Apr 28 at 18:37
    
I'll add that use of such matrices shows up in numerically solving polynomial systems via eigensystems. My take is that one should do as much as possible to avoid multiple eigendecompositions, so I've used random linear operators to avoid multiplicity whenever possible. This is, in effect, what you did via random lambdas. How well this generalizes to other applications I cannot say. –  Daniel Lichtblau Apr 28 at 18:40
    
@DanielLichtblau: Interesting, my 3 test matrices each had several multiple-degenerate subspaces, but it still seemed to work fine without getting cranky. –  DumpsterDoofus Apr 28 at 19:17

1 Answer 1

up vote 6 down vote accepted

I'll make this a response since it seems to be a popular topic today (it showed up independently on the Wolfram Community forum).

One can usually do this by finding the eigenvectors for a random linear combination of the matrices. This works for nonderogatory matrices, that is, ones that do not have nontrivial blocks in their Jordan decomposition. In different terms, it works when all eigenvalues have algebraic multiplicity equal to geometric multiplicity.

share|improve this answer
    
That's probably why it worked in my case: all the matrices $A_k$ I had were all either unitary or symmetric, and thus admitted eigendecompositions. Thanks! –  DumpsterDoofus Apr 28 at 23:07
    
Minor update: Actually, the matrices I used were symmetric. I tried it on unitary matrices (not necessarily symmetric) with root-of-unity eigenvalues and it failed. So some caution and double-checking may be necessary (by verifying that $\Lambda^{-1}\mathbf{A}_k\Lambda$ is in fact diagonal for all $k$). –  DumpsterDoofus Apr 29 at 0:11
    
When it failed, were the matrices in question all verified to commute? Because I would expect this method to behave if so. –  Daniel Lichtblau Apr 29 at 14:54
    
I'll post the explicit matrices to my question later today, just so that other people can play around with it to see an explicit example (or point out that I'm making a mistake). –  DumpsterDoofus Apr 29 at 15:16
    
Never mind, I made a mistake while verifying the diagonalization, it works fine. –  DumpsterDoofus Apr 29 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.