I'm just not sure how to use QR decomposition to determine the rank of a matrix. If $A$ is an $n \times m$ matrix, $A$ could be composed into QR, which is the QR decomposition. But how could we determine the rank of the matrix?
Could someone explain it in detail?
The number of pivots of a matrix is the rank of a matrix. The rank-revealing QR factorization uses a pivot matrix to determine the number of pivots and thereby the rank of the matrix. The pivot matrix is a permutation matrix. This is a feature of rank revealing LU decompositions as well.
It looks like the following
$$ AE = Q \begin{pmatrix} R_{11} & R_{12} \\ 0 & 0 \end{pmatrix}$$