This is just a check on my reasoning, I guess.

So for two matrices $A, B$ to commute, the following must hold:

$$(AB)_{ij} = \sum_{k=1}^{n}a_{ik}b_{kj} = \sum_{k=1}^{n}b_{ik}a_{kj} = (BA)_{ij}$$

This can happen if for all $i, j, k$:

a. $a_{ik}=a_{kj}$ and $b_{ik}=b_{kj}$, or

b. $a_{ik}=b_{ik}$ and $a_{kj}=b_{kj}$, i.e. $A=B$, or

c. $a_{ik} = 0$ or $b_{ik} = 0$, i.e. either matrix is null.

Are there more possibilities?

Edit: I originally had (a) as "Both matrices are symmetric", but as @user1551 points out, this is not true. After fixing the summations, I see where I was mistaken. I'm not sure how to characterize (a) now.

  • 2
    $\begingroup$ Certainly any power of $A$ commutes with $A$ for any matrix $A$. $\endgroup$ – André 3000 Sep 28 '15 at 16:17
  • 3
    $\begingroup$ Your case (a) is not true. $A,B$ may not commute if they are symmetric. Consider, e.g., $A$ is the matrix whose only nonzero entry is the $(1,1)$-th one and $B$ is the all-one matrix. By the way, I don't understand what the symbol $\sum_k^j$ means. $\endgroup$ – user1551 Sep 28 '15 at 16:25
  • $\begingroup$ @user1551 Hm. The summation is supposed to capture that each entry is the inner product of a row of A and a column of B (or the other way around). $\endgroup$ – Nathan Sep 28 '15 at 16:43
  • 2
    $\begingroup$ Then it should be $\sum\limits_{k=1}^na_{ik}b_{kj}$, not $...a_{ik}b_{ki}$ $\endgroup$ – Ivan Neretin Sep 28 '15 at 16:44
  • $\begingroup$ @IvanNeretin Oh ok. I see where I messed up then. Thanks! I didn't know about \limit. I've always just written it the other way. $\endgroup$ – Nathan Sep 28 '15 at 16:46

Two matrices commute when they are simultaneously triangularisable, i.e., when there is some basis in which they are both triangular. Roughly speaking, it is when they have the same eigenvectors, probably with different eigenvalues. (But then there are degenerate cases, which make it all more complicated.)

This property has really nothing to do with A and B being symmetric. Indeed, there are examples of matrices which are symmetric and don't commute... $$A=\left(\begin{matrix}2& 1\\1 & 3 \end{matrix}\right),\; B=\left(\begin{matrix}3& 1\\1 & 2 \end{matrix}\right), $$ ...and those which are not symmetric but do commute: $$A=\left(\begin{matrix}1& 1\\0 & 1 \end{matrix}\right),\; B=\left(\begin{matrix}1& 2\\0 & 1 \end{matrix}\right). $$

  • $\begingroup$ Can I ask what are the degenerate cases? Specifically, is it true that any two matrices commute iff they have the same eigenspaces (excluding with eigenvalue $1$)? The backward implication is clear, but what about the forward implication? $\endgroup$ – user21820 Nov 29 '16 at 17:40
  • $\begingroup$ How's having the same eigenspaces is different from having the same eigenvectors, and what's so special about the eigenvalue 1? Degenerate cases are the defective matrices; I'm not quite sure about their behavior in this regard, but they do have a certain kind of "criminal record" for being exceptions to pretty much anything. $\endgroup$ – Ivan Neretin Nov 29 '16 at 18:47
  • $\begingroup$ The reason I singled out the eigenvalue $1$ is because a rotation about an axis commutes with a stretch along the same axis but their eigenspaces differ by those for eigenvalue $1$, and I had forgotten where I saw some Math SE post about this phenomenon. Now I recall I saw it at math.stackexchange.com/a/2019710, which makes a lot more sense. $\endgroup$ – user21820 Nov 30 '16 at 2:35
  • $\begingroup$ Yeah, that answer is good. Still, note that it applies to rotations, which are but a subset of all matrices. In general, you don't necessarily have those complex eigenvalues, nor are you guaranteed to have that eigenvalue 1. $\endgroup$ – Ivan Neretin Nov 30 '16 at 6:11
  • $\begingroup$ Hmm so do you have a concrete example of a degenerate case? My first comment is clearly a wrong guess because two orthogonal stretches in 3d commute but don't share eigenspaces, and would presumably be a degenerate case? I was just curious to know what is the simplest 'geometric' characterization, since I can't visualize the meaning of "triangularizable". $\endgroup$ – user21820 Nov 30 '16 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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