# Prove that the rank of a matrix is the number of non-zero rows of its row-reduced form

As a reference to this and this and similarly many sources, it has been sait that the rank of a matrix, say $A$, is the number of non-zero rows of the row-reduced form of $A$.

However, why is this the case ? How can we prove it ?

I mean in the second question that I have linked, the answerer says the non-zero row form a basis etc. which I think does not connect to the rank of matrix.