# Positive (semi)definiteness of a matrix

Let $A(x)$ be a matrix whose entries $a_{i,j}(x)$ are continuous functions from $\mathbb{R}^n$ to $\mathbb{R}$.

Then, if $A(x)$ is positive definite at $x = x^\star$, is $A(x)$ positive definite in some open ball around $x^\star$? I think the continuity of $a_{i,j}$ should somehow show that, but I am not sure how to prove it.

On the other hand, if $A(x)$ is positive semidefinite, would an analgous claim be true?

• For positive semidefinite, it is not true. $A=0$ is a counterexample. – Mehdi Jafarnia Jahromi May 8 '15 at 16:47
• $0$ is always positive semidefinite :-). – copper.hat May 8 '15 at 16:51

let $\phi_A(x) = \min_{\|h\|=1} \langle h, A(x)h \rangle$. $\phi_A$ is continuous since $\partial B(0,1)$ is compact.

Hence if $\phi_A(x)>0$ then there is some ball around $x$ such that $\phi_A$ is positive in that ball.

Another proof would be to use the fact that the eigenvalues are continuous functions (in a suitable sense) of the entries of a matrix.

In the semidefinite case, take a simple $1 \times 1$ example $A(x) = \begin{bmatrix} x \end{bmatrix}$. Then $A(0)= \begin{bmatrix} 0 \end{bmatrix}$ is positive semidefinite, but clearly $A(x)$ is negative definite for all $x <0$.

• Why does compactness of feasible set results in continuity of $\phi_A(x)$? – Mehdi Jafarnia Jahromi May 8 '15 at 17:07
• In general, $x \mapsto \min_{t \in T} f(x,t)$ is continuous if $T$ is compact and $f$ continuous. It is straightforward to establish, but not in a comment. By all means ask a question. – copper.hat May 8 '15 at 17:18
• Thanks. Just another question, now you have proved that $\phi_A(x)$ is positive in that ball. But it seems that it is only for $\| h\| = 1$. Shouldn't you prove that $<h, A(x)h>$ is positive for all $h$? – Mehdi Jafarnia Jahromi May 8 '15 at 17:22
• Well, $\langle h, A(x) h \rangle = \|h\|^2 \langle {h \over \|h\|}, A(x) {h \over \|h\|} \rangle$, so if it is true on the boundary, the positivity condition is true everywhere. – copper.hat May 8 '15 at 17:26
• Insightful answer, thanks. – Mehdi Jafarnia Jahromi May 8 '15 at 17:27

You can use the characterization of positive definite matrices with the principal minors: if $A=[a_{ij}]_{\substack{1\le i\le n\\1\le j\le n}}$ is an $n\times n$ matrix, denote by $A_k$ the $k\times k$ matrix $$A=[a_{ij}]_{\substack{1\le i\le k\\1\le j\le k}}$$ for $k=1,2,\dots,n$. Then $A$ is positive definite if and only if $\det A_k>0$ for $k=1,2,\dots,n$ (Sylvester's criterion).

Since the determinant is a continuous function and we have just a finite number of functions to deal with, the result follows.