  This paper studies several problems related to quadratic matrix inequalities
(QMI's), i.e., inequalities in the Loewner order involving quadratic functions
of matrix variables. In particular, we provide conditions under which the
solution set of a QMI is nonempty, convex, bounded, or has nonempty interior.
We also provide a parameterization of the solution set of a given QMI. In
addition, we state results regarding the image of such sets under linear maps,
which characterize a subset of ``structured" solutions to a QMI. Thereafter, we
derive matrix versions of the classical S-lemma and Finsler's lemma, that
provide conditions under which all solutions to one QMI also satisfy another
QMI. The results will be compared to related work in the robust control
literature, such as the full block S-procedure and Petersen's lemma, and it is
demonstrated how existing results can be obtained from the results of this
paper as special cases. Finally, we show how the various results for QMI's can
be applied to the problem of data-driven stabilization. This problem involves
finding a stabilizing feedback controller for an unknown dynamical system
influenced by noise on the basis of a finite set of data. We provide general
necessary and sufficient conditions for data-based quadratic stabilization. In
addition, we demonstrate how to reduce the computational complexity of
data-based stabilization by leveraging the aforementioned results. This
involves separating the computation of the Lyapunov function and the
controller, and also leads to explicit formulas for data-guided feedback gains.
