Understanding direct sum of matrices

I read the definition of direct sum on wikipedia, and got the idea that a direct sum of two matrices is a block diagonal matrix.

However this does not help me understand this statement in a book. In the book I am reading, the matrix $$\begin{pmatrix} 0&0&0&1 \\ 0&0&1&0 \\ 0&1&0&0 \\ 1&0&0&0 \end{pmatrix}$$

"can be regarded as the direct sum of two submatrices":

$$\begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix},\begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix}$$

Where onen lies in the first and fourth rows (columns) and the other in the second and third.

According to the definition it should be

$$\begin{pmatrix} 0&1&0&0 \\ 1&0&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \end{pmatrix}$$

This was taken from a problem in Problems and Solutions in Group Theory for Physicists by Zhong-Qi Ma and Xiao-Yan Gu. Here's the problem and the solution in full.

Problem 3. Calculate the eigenvalues and eigenvectors of the matrix $R$ $$R = \begin{pmatrix} 0&0&0&1 \\ 0&0&1&0 \\ 0&1&0&0 \\ 1&0&0&0 \end{pmatrix}.$$

Solution. $R$ can be regarded as the direct sum of the two submatrices $\sigma_1$, one lies in the first and fourth rows(columns), the other in the second and third rows(columns). From the result of Problem 2, two eigenvalues of $R$ are $1$, the remaining two are $-1$. The relative eigenvalues are as follows: $$1: \begin{pmatrix} 1\\ 0 \\ 0 \\ 1 \end{pmatrix}, \begin{pmatrix} 0\\ 1 \\ 1 \\ 0 \end{pmatrix}, \ \ \ \ \ \ -1: \begin{pmatrix} 1\\ 0 \\ 0 \\ -1 \end{pmatrix}, \begin{pmatrix} 0\\ 1 \\ -1 \\ 0 \end{pmatrix}.$$

Problem 2 refers to an earlier problem that calculates the eigenvalues and eigenvectors of the matrix $$\sigma_1= \begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix}.$$

[Edit by SN:] Added the full problem text.

-
I don't understand the question. This matrix is not block diagonal. –  Qiaochu Yuan Oct 4 '11 at 18:51
@Qia So it is not a direct sum? In which case my source is wrong. –  kuch nahi Oct 4 '11 at 18:52
Did you take this example from somewhere? If so, it might help to quote the relevant text directly, or give a reference/link. –  Srivatsan Oct 4 '11 at 18:53
@Srivastan For the Source click the given link, click the amazon "Look Inside" feature, click on "first pages", check problem 3. –  kuch nahi Oct 4 '11 at 18:57
@kuch I took the liberty of adding the problem and the solution from the book in full, so that others get the context immediately. Hope it's ok. :) –  Srivatsan Oct 4 '11 at 19:47

The end result will be, of course, the same, but my view point is a bit different from those expressed by Arturo and Srivatsan, so here comes.

That matrix is giving us a linear mapping $T$ from a 4-dimensional vector space $U$ to itself. Furthermore, we can express $U$ as a direct sum of its subspaces $U=V\oplus W$ in such a way that $T(V)\subseteq V$ and $T(W)\subseteq W$. Here $V$ is spanned by the first and fourth (standard) basis vectors of $U$, and $W$ is similarly spanned by the second and third basis vectors. In this sense $T$ is certainly a direct sum of its restrictions to these two complementary subspaces!

It is, perhaps a bit unusual that we don't order the basis vectors in such a way that the basis vectors belonging to one summand would come before those of the other. But, remember that the ordering of basis vectors is more or less arbitrary. Their indices are often just placeholders and/or a notational necessity.

-
Oh, the book excerpt pretty much spells this out :-) –  Jyrki Lahtonen Oct 5 '11 at 4:06

The point about defining the direct sum of matrices as a block diagonal matrix is that if you have an $n\times m$ matrix $A$, and an $r\times s$ matrix $B$, and you interpret $A$ as a linear transformation $A\colon \mathbf{F}^m\to\mathbf{F}^n$ and $B$ as a linear transformation $B\colon \mathbf{F}^s\to \mathbf{F}^r$, then you automatically get a linear transformation $$\mathbf{F}^m\oplus\mathbf{F}^s\to\mathbf{F}^n\oplus\mathbf{F}^r$$ by sending the vector $(\mathbf{v},\mathbf{w})$ to $(A\mathbf{v},B\mathbf{w})$ (here, $\mathbf{v}\in\mathbf{F}^m$ and $\mathbf{w}\in\mathbf{F}^s$). If you do that, then the matrix that corresponds to this transformation is precisely the matrix $A\oplus B$.

Your construction does not work like that, so it's not literally a direct sum. Your source is fudging a great deal (as might be expected from a book for physicists as opposed to one for mathematicians). Instead, you are viewing $A$ as composed of two "coordinate functions", $B$ as composed of two "coordinate functions", $A\mathbf{v}=(f(\mathbf{v}),g(\mathbf{v}))$, $B\mathbf{w}=(h(\mathbf{w}),k(\mathbf{w}))$, and then instead of looking at $$(A\oplus B)(\mathbf{v},\mathbf{w}) = \bigl(f(\mathbf{v}),g(\mathbf{v}), h(\mathbf{w}), k(\mathbf{w})\bigr)$$ he looks at $$\bigl( f(\mathbf{v}), h(\mathbf{w}), k(\mathbf{w}), g(\mathbf{v})\bigr).$$ This is equivalent to taking $A\oplus B$ and composing with a permutation matrix, in this case one that takes columns $3$ and $4$ and makes then columns $2$ and $3$, that is, $T\circ(A\oplus B)$ with $T(a,b,c,d) = (a,c,d,b)$, which is given by $$\left(\begin{array}{cccc} 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0 \end{array}\right).$$

-
by swapping linear transformation, do you mean rearranging the rows? I did not understand the complete statement, it is a direct sum, then a rearrangement of rows, then a multiplication by what? –  kuch nahi Oct 4 '11 at 19:10
@kuchnahi: Given any two sets $X$ and $Y$, there is a natural bijection from $A\times B$ to $B\times A$, which maps $(a,b)$ to $(b,a)$; that is, it "swaps" the two coordinates. If you look at what I wrote and think about it, the actual direct sum sends $(\mathbf{v},\mathbf{w})$ to $(A\mathbf{v},B\mathbf{w})$; your matrix instead tries to map it to something where you are trying to "put" $A\mathbf{v}$ in the "extremes" and $B\mathbf{w}$ in "the middle". It's not the direct sum. Your source is fudging; you can make it precise by using a permutation matrix. –  Arturo Magidin Oct 4 '11 at 19:15
I do not have enough rep to make a less than 6 character edit. Could you adjust the parentheses to $A\mathbf{v}=(f(\mathbf{v}),g(\mathbf{v}))$, $B\mathbf{w}=(h(\mathbf{w}),k(\mathbf{w}))$ $A\mathbf{v}=(f(\mathbf{v}),g(\mathbf{v}))$, $B\mathbf{w}=(h(\mathbf{w}),k(\mathbf{w}))$ in the last line of third paragraph. –  kuch nahi Oct 4 '11 at 20:33
Shouldn't it be something like $R=T^{-1}(A\oplus B)T$, instead of just composing with a single $T$? –  Henning Makholm Oct 4 '11 at 22:22
@HenningMakholm: I could be misinterpreting what they are doing; but if all they are doing is shuffling columns, then you just need to multiply by a permutation matrix. If you are doing a change of basis, then you would need to conjugate. To do what I described, you only need to compose with $T$ (but what I describe may not be what the author had in mind). –  Arturo Magidin Oct 5 '11 at 5:00

Here's how I interpret the question and solution provided in the book.

The given matrix is strictly not block diagonal, and as far as I understand, cannot be written as a direct sum of matrices as such. But we are asked to find the eigenvalues/eigenvectors of the matrix, not to write it as a direct sum.

Let $\pi$ be a permutation on $\{ 1, 2, \ldots, n \}$. Suppose $M$ is an $n \times n$ matrix, and $M'$ is the matrix obtained by permuting the rows and columns of $M$ according to $\pi$ (i.e., $M^\prime_{i, j} = M_{\pi(i), \pi(j)}$). Then the key idea is that the eigenvalues of $M'$ are the same as those of $M$; the eigenvectors are not the same, but they are related to each other just through $\pi$ itself. That is, if $x$ is an eigenvalue of $M$ with eigenvector $\lambda$, then $\lambda$ is an eigenvalue for $M'$ as well, with eigenvector $x'$ given by $x'_i = x_{\pi(i)}$.

Now, come to the question at hand. Imagine permuting the matrix by the permutation $\pi$ on $\{ 1, 2, 3, 4 \}$ that moves the element $4$ in front of $2$ and $3$. (Formally, I am talking about the permutation: $\pi(1)=1, \pi(2)=4, \pi(3)=2, \pi(4)=3$.) If we apply this permutation to the given matrix, we end up with the block diagonal matrix that is a direct sum of the two $2 \times 2$ matrices. So I know how to compute the eigenvalues and eigenvectors of the block diagonal matrix. Consequently, through the discussion in the above paragraph, I know how to compute the eigenvalues and eigenvectors of the given matrix as well. And we are done...

However, as Arturo and Qiaochu point out, I am not sure calling the given matrix the direct sum of the two smaller matrices is really accurate. But it is intimately connected to the direct sum, and that is enough for us.

-
Thanks. Very Helpful. –  kuch nahi Oct 11 '11 at 13:19