I have seen the expectation of a random vector expressed as the solution to the optimization problem: \begin{equation} \mathbb{E}[X]=argmin_{v \in \mathbb{R}^n}\mathbb{E}[\|X-v\|_{l^2}^2](:= \int_{\Omega} \|X(\omega)-v\|^2 dP(\omega)). \end{equation}
My question is... can we express the covariance matrix of a random vector as a similar optimization problem?