  In this work, our aim is to obtain conditions to assure polynomial
approximation in Hilbert spaces $L^{2}(\mu)$, with $\mu$ a compactly supported
measure in the complex plane, in terms of properties of the associated moment
matrix to the measure $\mu$. In order to do it, in the more general context of
Hermitian positive semidefinite matrices we introduce three indexes
$\gamma(\mathbf{M})$, $\lambda(\mathbf{M})$ and $\alpha(\mathbf{M})$ associated
with different optimization problems concerning these matrices. Our main result
is a characterization of density of polynomials in the case of measures
supported on Jordan curves with non empty interior using the index $\gamma$ and
other specific index related to it. Moreover, we provide a new point of view of
bounded point evaluations associated to a measure in terms of the index
$\gamma$ that will allow us to give an alternative proof of Thomson's theorem
in \cite{Brennan} by using these matrix indexes. We point out that our
techniques are based in matrix algebra tools in the frame of Hermitian Positive
Definite matrices and in the computation of certain indexes related to some
optimization problems for infinite matrices.
