# Relationship between rank and determinant rank

Let $A$ be an $n\times n$ matrix. Let $A_r$ be the submatrix obtained by deleting $n-r$ rows and columns from $A$. I want to show that the row rank equals the determinant rank.

I understand one direction. Suppose that $A$ has rank $r$. Then we know that it has $r$ linearly independent rows. So now we have an $r\times n$ matrix. But if it has row rank of $r$, it will have column rank of $r$. Hence we know have an $r\times r$ matrix of full rank. So this is invertible.

Where I'm stuck is showing that if there is maximal $r\times r$ matrix such that it has nonzero determinant, this will be equal to the rank of the matrix.