# Analytical formulas for calculating extremal ranks and inertias of quadratic matrix-valued functions

group of analytical formulas formulas for calculating the global maximal and minimal ranks and inertias of the quadratic matrix-valued function $$\phi(X) = \left(\, AXB + C\,\right)\!M\!\left(\, AXB + C \right)^{*} + D$$ are established and their consequences are presented, where $A$, $B$, $C$ and $D$ are given complex matrices with $A$ and $C$ Hermitian. As applications, necessary and sufficient conditions for the two general quadratic matrix-valued functions \begin{align*} \left(\, \sum_{i = 1}^{k}A_iX_iB_i + C \,\right)\!M\!\left(\,\sum_{i = 1}^{k}A_iX_iB_i + C \, \right)^{\!*} +D, \ \ \ \sum_{i = 1}^{k}\left(\,A_iX_iB_i + C_i\,\right)\!M_i\!\left(\,A_iX_iB_i + C_i \,\right)^{*} +D \end{align*} to be semi-definite are derived, respectively, where $A_i, \ B_i, \ C_i, \ C, \ D, \ M_i$ and $M$ are given matrices with $M_i$, $M$ and $D$ Hermitian, $i =1, \ldots, k$. L\"owner partial ordering optimizations of the two matrix-valued functions are studied and their solutions are characterized.