Conditions for a matrix to be invertible Let $n \geq m$ and let $C$ be a $n \times m$ full rank matrix, that is $rank(C) =m$. Considering that $D$ is a diagonal positive semidefinite matrix, under which conditions is the $ m \times m$ matrix $X=C^\mathsf{T}DC$ invertible? Is it enough to have $rank(D) \geq m$?

Since $X=C^TDC$ is generally positive semi-definite, $X$ is nonsingular if and only if it is positive definite, that is, $v^TXv=v^TC^TDCv>0$ for all nonzero $v$. Another way, how to say this, is that $D$ is positive definite on the column-span (range) of $C$. Also, $X$ is nonsingular if and only if the intersection of the range of $C$ and the nullspace of $D$ is trivial ($\mathrm{Im}(C)\cap\mathrm{Ker}(D)=\{0\}$). Note that this is true for any positive semi-definite $D$, not necessarily diagonal.
Certainly, $\mathrm{rank}(D)\geq m$ is not sufficient for $X$ to be nonsingular. Consider
$$
C=\begin{bmatrix}1 \\ 0\end{bmatrix}, \quad D=\begin{bmatrix}0 & 0 \\ 0 & 1\end{bmatrix}.
$$
