Continuity of a supremum function Let $M_x$ be an $n \times n$ real matrix which is a continuous function of $x \in \mathbb{R}$. We know that for every real unit vector $u$, there exists $\epsilon_u > 0$ such that
$$ u^T M_x u > 0 $$
for all $0 < x < \epsilon_u$ (although I do not have an explicit expression for $\epsilon_u$). How can I prove that $M_x$ is positive definite for all $x > 0$ small enough? In other words, I want to show that there exists $\epsilon > 0$ such that
$$ u^T M_x u > 0 $$
for all unit real $u$ and $0 < x < \epsilon$.

My attempt: I tried using some compact/continuity argument as follows. Let $m = n^2 -1 $ and consider the unit sphere $S^m$ of real unit vectors. Then construct the function $f : S^m \rightarrow \mathbb{R}^+$ by
$$ f(u) = \sup_{\delta} \{ \delta > 0 \mid u^T M_xu > 0 \text{ for all } 0 < x < \delta \}$$
for each $u \in S^m$. If I can prove that $f$ is continuous then the continuous image of a compact space is compact, so $f(U) \subseteq \mathbb{R}^+$ is compact and thus
$$\epsilon = \inf_u f(u) = \min_u f(u) > 0 $$
(perhaps divided by $2$), which satisfies the requirements above. But I'm not sure whether continuity holds, or whether there is a better way of proving the above. EDIT: I posted a variant/other attempt on this question here.
 A: I found a decently simple solution which avoids using the function $f$ above. Let $m = n-1$ and define $g : \mathbb{R}^+ \times S^m \rightarrow \mathbb{R}$ by $g(x, u) = u^T M_x u$. We know that for any $u \in S^m$ (unit vectors) there exists $\epsilon_u > 0$ such that
$$ g(x, u) > 0 $$
for all $0 < x < \epsilon_u$. In other words, for any $u \in S^m$ there exists $\epsilon_u > 0$ such that
$$ (0, \epsilon_u) \times \{u\} \subseteq g^{-1}(0, \infty) \,. $$
We would like to extend this uniformly in $u$, namely prove that there exists $\epsilon > 0$ such that
$$ (0, \epsilon) \times S^m \subseteq g^{-1}(0, \infty) \,. $$
Now $g^{-1}(0, \infty)$ is open by continuity of $g$, so each $(0, \epsilon_u) \times \{u\}$ has a neighbourhood $Z_u$ contained in $g^{-1}(0, \infty)$. Open sets in a product topology are unions of open products, so
$$ Z_u = \bigcup_\alpha U_\alpha \times V_\alpha \,. $$
In particular $(0, \epsilon_u) \subseteq \bigcup_\alpha U_\alpha$ and at least one $V_\alpha$ contains $u$, so we can take the open neighbourhood to be $(0, \epsilon_u) \times V_u$ for some neighbourhood $V_u$ of $u$. In particular
$$ S^m \subseteq \bigcup_{u \in S^m} V_u \,, $$
and by compactness of $S^m$ there is a finite cover
$$ S^m \subseteq  \bigcup_{i=1}^k V_{u_i} \,. $$
Letting $\epsilon = \min \{ \epsilon_i \}_{i=1}^k > 0$, we have
\begin{align*}
(0, \epsilon) \times S^m &\subseteq (0, \epsilon) \times \bigcup_{i=1}^k V_{u_i} \\
&= \bigcup_{i=1}^k (0, \epsilon) \times V_{u_i} \\
&\subseteq \bigcup_{i=1}^k (0, \epsilon_i) \times V_{u_i} \\
&\subseteq g^{-1}(0, \infty)
\end{align*}
as required. In other words, we have constructed $\epsilon > 0$ such that
$$ u^T M_x u > 0 $$
for all $u \in S^m$ and $0 < x < \epsilon$.
