3

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.

Nathan
  • 431
  • 2
    Certainly any power of $A$ commutes with $A$ for any matrix $A$. – Viktor Vaughn Sep 28 '15 at 16:17
  • 3
    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. – user1551 Sep 28 '15 at 16:25
  • @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).

    – Nathan Sep 28 '15 at 16:43
  • 2
    Then it should be $\sum\limits_{k=1}^na_{ik}b_{kj}$, not $...a_{ik}b_{ki}$ – Ivan Neretin Sep 28 '15 at 16:44
  • @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. – Nathan Sep 28 '15 at 16:46

1 Answers1

6

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). $$

Ivan Neretin
  • 13,429
  • 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? – user21820 Nov 29 '16 at 17:40
  • 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. – Ivan Neretin Nov 29 '16 at 18:47
  • 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 http://math.stackexchange.com/a/2019710, which makes a lot more sense. – user21820 Nov 30 '16 at 02:35
  • 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. – Ivan Neretin Nov 30 '16 at 06:11
  • 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". – user21820 Nov 30 '16 at 07:32
  • No, I don't; I just said that I'm not sure. Well, let's look at your orthogonal stretches, one that changes x, but leaves y and z as they were, and another that stretches z. The eigenvectors of the first one would be (1,0,0) and two any vectors orthogonal to it; those of the second are (0,0,1) and two any vectors orthogonal to it. Doesn't look very similar; still, by choosing from those "any", we may select a complete set of three eigenvectors which would be common for both matrices. That's a geometric characterization for you. – Ivan Neretin Nov 30 '16 at 07:53
  • But what is the meaning of "complete set"? A 3d rotation has only one physical eigenvector but it has a 2-dimensional eigenspace, and we can't just pick 2 from it, otherwise your criterion would imply that two orthogonal rotations commute. – user21820 Nov 30 '16 at 07:59
  • OK, now I see... You're referring to a plane as an eigenspace of a 3D rotation, because (correct me if I'm wrong) the rotation keeps the plane where it was. Wikipedia uses a different definition; according to it, we have two distinct complex eigenvalues with corresponding complex eigenvectors, and no 2D eigenspace. – Ivan Neretin Nov 30 '16 at 08:06
  • Oh oops I guess what I was talking about is called "invariant subspace", but I've forgotten much of the little linear algebra that I learnt a long time ago... I can't visualize complex eigenvectors either haha.. – user21820 Nov 30 '16 at 08:10
  • The matrices $\begin{pmatrix} 1& 1 & 0 \ 0& 1& 0 \ 0 & 0 & 1\end{pmatrix}$ and $\begin{pmatrix} 1& 0 & 0 \ 0& 1 & 1 \ 0 & 0 & 1\end{pmatrix}$ don't commute despite being simultaneously triangularisable. So, being simultaneously triangularisable is necessary, but by far not sufficient. – Vadim Alekseev Nov 30 '19 at 08:48