Is the following subset compact? Let $E$ be a Hilbert space over $\mathbb{K}=\mathbb{R}$ or $\mathbb{C}$. For $M\in \mathcal{L}(E)^+$, we consider
\begin{eqnarray*}
              B_M
           &=&\{x \in E;\;\;\;\langle Mx\;,\;x\rangle\leq1\}.
              \end{eqnarray*}
 Is  $B_M$ compact when $E$ is finite dimensional Hilbert space? 
Thank you!
 A: If $M = I$ then $B_M$ is just the closed unit ball. When $E$ is infinite dimensional, it is well known that the closed unit ball is not compact. When $E$ is finite dimensional, the compact sets of $E$ are precisely the closed and bounded sets (with respect to the distance induced by $\| \cdot \|$). For arbitrary $M$, your set is closed but not necessarily bounded so it won't generally be compact. For the finite dimensional case, let's characterize completely when $B_M$ is compact.
Claim: The set $B_M$ is compact if and only if $\left< Mv, v \right> = 0$ implies that $v = 0$.
Proof: Assume that $B_M$ is compact and let $v \in V$ such that $\left< Mv, v \right> = 0$. In particular, $v \in B_M$. But then $nv$ also belongs to $B_M$ because
$$\left< M(nv), nv \right> = n^2 \left< Mv, v \right> = 0. $$
Since $B_M$ is compact, it is bounded so there exists some $C > 0$ such that $\| nv \| = n \| v \| \leq C$ for all $n \in \mathbb{N}$. This implies that $\| v \| \leq \frac{C}{n}$ for all $n \in \mathbb{N}$ so $v = 0$. On the other hand, assume that $B_M$ is not compact. Since it is always closed, we must have an unbounded sequence $v_n$ of vectors in $B_M$. Set $w_n = \frac{v_n}{\| v_n \|}$. Since the $\| \cdot \|$ unit sphere is compact and $\| w_n \| = 1$, it must have a convergent subsequence which we will still denote by $w_n$ which converges to $w$. Since $\| w_n \| = 1$ we also have $\| w \| = 1$ and in particular $w \neq 0$. Since $v_n \in B_M$ we have
$$ 0 \leq \left< Mw_n, w_n \right> = \frac{\left< Mv_n, v_n \right>}{\| v_n \|^2} \leq \frac{1}{\| v_n \|^2} \to 0 $$
so by continuity of the inner product, we have $\left< Mw_n, w_n \right> \to \left< Mw, w \right> = 0$.
When $\mathbb{K} = \mathbb{C}$, we have that $B_M$ is compact if and only if $M$ is invertible. The reason is that the condition $\left< Mv, v \right> \geq 0$ for all $v \in V$ implies that $M$ is Hermitian and a Hermitian operator which satisfies $\left< Mv, v \right> > 0$ for all $v \neq 0$ must be invertible. When $\mathbb{K} = \mathbb{R}$, $M$ can be invertible with $B_M$ non-compact. For example, if $V = \mathbb{R}^2$ and $M$ is the rotation by $\frac{\pi}{2}$ degrees then $\left< Mv, v \right> = 0$ for all $v \in V$ so $B_M = \mathbb{R}^2$ and $M$ is invertible. In fact, one can show that $B_M$ is compact if and only if the symmetrization $M + M^T$ of $M$ is invertible.
A: Hint: If $E$ is finite dimensional, then the closed unit ball of $E$ is compact. Consider using the fact that, on metric spaces, compactness is equivalent to sequential compactness.
