The rank of a matrix may have many definitions.
But in any case, it is easy to verify that the elementary transformation does not change the row rank and column rank, nor does it change the order of the highest order non-zero subformula. Then, the matrix is transformed into the equivalent standard form by elementary transformation, and it can be seen that these three quantities are equal.