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