So let's say there are two square matrices A and B that commute (AB-BA=0). This implies that there must exist some complete set of vectors that are eigenvectors of both A and B.

Is there any way to tell Mathematica to find the eigenvectors of both A and B? At this point, I can get the eigenvectors of A and then find the eigenvectors of B by taking linear combinations of those for A by hand, but this is obviously not feasible for larger matrices.


marked as duplicate by J. M. will be back soon Jun 30 '15 at 18:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ Any special structure (e.g. symmetry, sparseness) in your matrices? $\endgroup$ – J. M. will be back soon Jun 30 '15 at 18:06
  • $\begingroup$ In particular, I'm thinking about a real symmetric matrix (let's say that's A) and a "parity" operator matrix for B (real, symmetric, all 0's except a single 1 for each row and each column). $\endgroup$ – Marissa Jun 30 '15 at 18:11
  • $\begingroup$ Oh...I just realized that I can take a linear combination (ex. A-1.23456B) and find the eigenvectors of that, where 1.23456 is just some random real number. That, in general, would give me all the eigenvectors, and I could calculate the eigenvalues from there. $\endgroup$ – Marissa Jun 30 '15 at 18:14