# Positive definite matrix, of a $2x2$ matrix

Given $n$ numbers $x_1, x_2,...,x_n \in \mathbb{R}$ and:

$a = \sum_{i=1}^{n} x_i^2$

$b=\sum_{i=1}^{n} x_i$

The matrix

$A = \begin{bmatrix} a & b \\ b & n \end{bmatrix}$

Is positive definite, negative definite, semi positive definite, semi negative definite, or none?

This is I tried to do: Using the definition $x^TAx$

$\begin{bmatrix} x & y \end{bmatrix}$ $A$ $\begin{bmatrix} x \\ y \end{bmatrix}$ = $ax^2+2bxy+ny^2$

Now, I need to verify if the expression above is $> 0$ or $<0$ or $\geq0$ or $\leq 0$ for all $(x,y) \neq (0,0)$

I tried to verify a few values of $a,b,n$ given their definitions and some $(x,y)$ and always gives $\geq0$. Of course this can be wrong. But I don't know how to prove for all values $a,b,n$.

• Look at the discriminant $b^2-an$ (Which also happens to be $-\text{det}(A)$) and check if it is less than $0$. If it is, then the given matrix is positive definite, otherwise not. – Anurag A Nov 7 '17 at 18:12
• @AnuragA I found to be less or equal than 0, is this correct? If it is, that means the matrix is semi-definite positive? – Pinteco Nov 7 '17 at 18:43

HINT: We have $$a x^2 + 2b x y + c y^2 = (\sum_{i=1}^nx_i^2) x^2 + 2 (\sum_{i=1}^n x_i)x y+ n y^2 = \sum_{i=1}^n(x x_i + y)^2\ge 0$$
• Ok. Since $ax^2+2bxy+ny^2$ is always greater or equal to zero, for all $(x,y) \neq (0,0)$, that means the matrix $A$ is semi-definite positive. Thanks for showing the way. – Pinteco Nov 7 '17 at 18:53
• @Anon: The equality occurs for some $(x,y) \ne (0,0)$ if and only if all the $x_i$ are equal. So, unless the $x_i$ are all equal ( positive semi-definite), the form is positive definite. – orangeskid Nov 7 '17 at 18:57
• If all $x_i$ are equal: $A$ is positive semi-definite. Else: $A$ is positive definite? So it has a condition to answer if $A$ is positive definite? So is not a simply yes/no question? – Pinteco Nov 7 '17 at 19:08
• @Anon: 2 possibilities, depending on the numbers $x_i$ – orangeskid Nov 7 '17 at 19:13
A quadratic form is positive or negative definite if its discriminant is negative, positive or negative semi-definite if its discriminant is non negative. Furthermore, it will be positive or negative if its leading coefficient $a$ is positive or negative.
$$\Delta=\Bigl(\sum_{i=1}^n a_i\Bigr)^2-n\Bigl(\sum_{i=1}^n a_i^2\Bigr)\le 0\iff \Bigl(\frac1n\sum_{i=1}^n a_i\Bigr)^2\le\frac1n\sum_{i=1}^n a_i^2,$$ which is just the arithmetic-quadratic means inequality.
We can have equality (when all $a_i$s are equal), hence the quadratic form is positive semi-definite.