Rank of a block matrix Let $A$ and $B$ be two $n\times n$ matrices with real entries.
Show that the matrix $M=\begin{pmatrix}A&I\\I&B\end{pmatrix}$ is of rank $n$ if and only if $A$ is invertible and $B=A^{-1}$
We have $I$ an $n\times n$ sub matrix of $M$ with non zero determinant.. 
So, rank of $M$ can be atleast $n$.. 
Suppose that $A=B^{-1}$ then we want to prove rank of $M$ is $n$..
i.e., any $n+1\times n+1$ submatrix is of determinant zero..
I do not know how to prove this..
Please give some hints...
Suppose $M$ is of rank $n$ then we have $\det(M)=0$ i.e.,
$\det(A)\det(B)-1=0$ i.e., $\det(A)\det(B)=1$ so, $A$ and $B$ are non singular..
I did not use that it is of rank $n$ but only that its rank is less than $2n$... I do not know how to prove that $A=B^{-1}$

One general hint for proofs like this is to start with as small $n$ as possible to get some idea. For  $n=1$ we will have
$$
M = \pmatrix{a &1 \\ 1 &b}.
$$
Now it is much easier to see that if $b=a^{-1}$ then rank of $M$ is $1$. One possible way how to see this is
$$
M = \pmatrix{a &1 \\ 1 &a^{-1}} = \pmatrix{1 &0 \\ 0 &a^{-1}} \pmatrix{a &1\\ a &1}.
$$
Now to show that if rank of $M$ is $n$ then $B=A^{-1}$ for $n = 1$. If the rank of the matrix is $1$ then the row vectors must be dependent so
$$
\pmatrix{a &1} = \lambda\pmatrix{1 &b}
$$
for some $\lambda$. This will give us $b=a^{-1}$.
For general $n$ we can observe that the first $n$ row vectors can never be lineary dependent. This is caused by the diagonal entries in $I$. The same holds for the next group of $n$ row vectors. In other words the submatrices
$ \pmatrix{A &I}$ and $\pmatrix{I &B}$ are both of rank $n$. So the only possible way for $M$ to have rank $n$ is when these two submatrices are dependent. This leads to condition
$$
\pmatrix{A &I} = \Lambda \pmatrix{I &B}
$$
where $\Lambda$ is $n \times n$ invertible matrix.
