Proof (rank of matrices in row-reduced echelon form)

Let $\v r_1, \ldots, \v r_k$ be the non-zero rows of $A$. Then $\v r_1, \ldots, \v r_k$ span the row space $\op{Row}(A)$.

Let $j_i$ be the pivot entry of $\v r_i$. Suppose $$ \begin{align*} \sum_{i=1}^{k} \lambda_i \v r_i = \v 0. \end{align*} $$ Since $A$ is in row-reduced echelon form, $\lambda_i$ is the only entry in the $j_i$-th column, so $\lambda_i = 0$.

Hence $\set{\v r_1, \ldots, \v r_k}$ is linearly independent. Therefore it is a basis and therefore $\op{r-rk}(A) = \dim(\op{Row}(A)) = k$.