  This paper is divided into two parts. In the first part, we develop a general
method for expressing ranks of matrix expressions that involve Moore-Penrose
inverses, group inverses, Drazin inverses, as well as weighted Moore-Penrose
inverses of matrices. Through this method we establish a variety of valuable
rank equalities related to generalized inverses of matrices mentioned above.
Using them, we characterize many matrix equalities in the theory of generalized
inverses of matrices and their applications. In the second part, we consider
maximal and minimal possible ranks of matrix expressions that involve variant
matrices, the fundamental work is concerning extreme ranks of the two linear
matrix expressions $A - BXC$ and $A - B_1X_1C_1 - B_2X_2C_2$. As applications,
we present a wide range of their consequences and applications in matrix
theory.
