How to show the matrix has Rank $\le 5$ 
I want to show that the following matrix has Rank $\le 5$.

The matrix is 
\begin{bmatrix}
2&1&1&1&0&1&1&1\\
1&2&1&1&1&0&1&1\\
1&1&2&1&1&1&0&1\\
1&1&1&2&1&1&1&0\\
0&1&1&1&2&1&1&1\\
1&0&1&1&1&2&1&1\\
1&1&0&1&1&1&2&1\\
1&1&1&0&1&1&1&2
\end{bmatrix}
I found that there is a submatrix in the matrix which has rank $ =4$ given by
$[2,1,1,1],[1,2,1,1],[1,1,2,1],[1,1,1,2]$.
I need to show the given matrix has at least 3 zero rows in order to show that Rank $\le 5$..
But I dont know how to show it.
Can someone help.
 A: The given matrix is equal to $A+B$ where
$$
A=\begin{bmatrix}
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1
\end{bmatrix},\quad
B=\begin{bmatrix}
1&0&0&0&-1&0&0&0&\\
0&1&0&0&0&-1&0&0&\\
0&0&1&0&0&0&-1&0&\\
0&0&0&1&0&0&0&-1&\\
-1&0&0&0&1&0&0&0&\\
0&-1&0&0&0&1&0&0&\\
0&0&-1&0&0&0&1&0&\\
0&0&0&-1&0&0&0&1&
\end{bmatrix}.
$$
These matrices have rank $1$ and $4$ respectively, so their sum has rank at most $1+4$.
A: We will show that the rank of the given matrix is exactly $5$.
The matrix can be written as a block matrix such that (see LU-decomposition),
$$M:=\begin{bmatrix} A & B \\B &A \end{bmatrix}=\begin{bmatrix} I & 0 \\BA^{-1}&I \end{bmatrix}\cdot \begin{bmatrix} A&0\\0&A-BA^{-1}B \end{bmatrix}\cdot\begin{bmatrix} I&A^{-1}B \\ 0 & I\end{bmatrix}.$$
with 
$$A = \begin{bmatrix} 2 & 1 & 1 & 1 \\ 1 & 2 & 1 &1 \\ 1 &1&2&1\\1&1&1&2\end{bmatrix}, \quad B = \begin{bmatrix} 0&1&1&1\\1&0&1&1\\1&1&0&1\\1&1&1&0 \end{bmatrix}.$$
Now 
$$A^{-1}=\frac{1}{5}\begin{bmatrix} 4 & -1 & -1 & -1 \\ -1 & 4 & -1 &-1 \\ -1 &-1&4&-1\\-1&-1&-1&4\end{bmatrix}\quad
\text{and}\quad
A-BA^{-1}B=\frac{4}{5}\begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & 1 & 1 &1 \\ 1 &1&1&1\\1&1&1&1\end{bmatrix}.$$
Therefore we may conclude that
$$\text{rank}(M)=\text{rank}\left(\begin{bmatrix} A&0\\0&A-BA^{-1}B \end{bmatrix}\right)=\text{rank}(A)+\text{rank}(A-BA^{-1}B)
=4+1=5.$$
A: Call column $j$ of this matrix $C_j$, and denote by $\def\2{\mathbf 2}\2$ the column vector with all $8$ entries equal to $2$. Note that for $j=1,2,3,4$ one has $C_j+C_{j+4}=\2$. Thus $C_6=\2-C_2=C_1+C_5-C_2$, and similarly $C_7=C_1+C_5-C_3$ and $C_8=C_1+C_5-C_4$. The last three columns being in the span of the first five, the rank of the matrix is at most$~5$.
A: Let
$$
A = \begin{bmatrix} 2 & 1 & 1 & 1 \\ 1 & 2 & 1 &1 \\ 1 &1&2&1\\1&1&1&2\end{bmatrix}, \quad B = \begin{bmatrix} 1&1&1&1\\1&1&1&1\\1&1&1&1\\1&1&1&1 \end{bmatrix} = vv^{T}
$$
where $v = [1, 1, 1 ,1]^{T}$. It is easy to see that $rank(B) = 1$. Now our original matrix is 
$$
X = \begin{bmatrix} A & 2B - A\\ 2B -A  & A\end{bmatrix}
$$
and we have
$$
\begin{bmatrix} I & I \\0&I \end{bmatrix}X\begin{bmatrix} I&0\\I&I \end{bmatrix} = \begin{bmatrix} 4C&2C \\ 2C & A\end{bmatrix}
$$
so the rank of $X$ is same as the rank of the above matrix. (Rank of matrix is preserved by multiplying invertible matricies) Since all 4 colums and 4 rows are the same, Gaussian elimination (elementary row and column operation) gives a matrix with same rank
$$
\begin{bmatrix} 0_{3\times 3} & 0_{3 \times 5} \\ 0_{5\times 3} & C \end{bmatrix}
$$
where 
$$
C = \begin{bmatrix} 4&2&2&2&2 \\ 2&2&1&1&1\\2&1&2&1&1\\2&1&1&2&1\\2&1&1&1&2\end{bmatrix}
$$
which is invertible by Gaussian elemination again. 
A: By inspection, the vectors $(1,-1,1,-1,1,-1,1,-1)$, $(1,0,-1,0,1,0,-1,0)$, and $(0,1,0,-1,0,1,0,-1)$ are all in the nullspace, and are linearly independent, so the rank is at most $5$. 
