Sum of Ranks of Two Complementary Matrices Suppose we have a binary matrix $A$, i.e, all the elements of $A$ are either $0$ or $1$. Let $B$ be the complementary matrix of $A$, i.e., 
$$
B_{ij}=
\begin{cases}
1,\textrm{ if }A_{ij}=0;\\
0,\textrm{ if }A_{ij}=1.
\end{cases}
$$
Then $A+B$ is a matrix with all entries being $1$. Suppose $\textrm{rank}(A)=r$, what is $\textrm{rank}(A)+\textrm{rank}(B)$?

There is not enough information to tell. 
For example, let $s=\operatorname{rank} B$. If $n=2$, we can take


*

*$A=\begin{bmatrix} 1&1\\0&0\end{bmatrix}$, then $r+s=2$ 

*$A=\begin{bmatrix} 1&0\\0&0\end{bmatrix}$, then $r+s=3$ 

*$A=\begin{bmatrix} 1&0\\0&1\end{bmatrix}$, then $r+s=4$
Similarly, with $n=3$: 


*

*$A=\begin{bmatrix} 1&0&0\\0&0&0\\0&0&0\end{bmatrix}$, then $r+s=3$

*$A=\begin{bmatrix} 1&0&1\\0&1&0\\0&0&0\end{bmatrix}$, then $r+s=4$

*$A=\begin{bmatrix} 1&0&0\\0&1&0\\0&0&0\end{bmatrix}$, then $r+s=5$

*$A=\begin{bmatrix} 1&0&0\\0&1&0\\0&0&1\end{bmatrix}$, then $r+s=6$
