The author gives a group of closed-form formulas for the maximal and minimal ranks and inertias of the linear Hermitian matrix function
with respect to a variable matrix
. As applications, he derives the extremal ranks and inertias of the matrices
is a solution to the matrix equation
, and then he gives necessary and sufficient conditions for the matrix equation
to have Hermitian, definite and re-definite solutions. In addition, he gives closed-form formulas for the extremal ranks and inertias of the difference
are Hermitian solutions of the two matrix equations
, and then uses the formulas to characterize relations between Hermitian solutions of the two equations.