<s>[INST] 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.
 [/INST] 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. 
</s>