# Is the matrix $A$ positive (negative) (semi-) definite?

Given, $$A = \begin{bmatrix} 2 &-1 & -1\\ -1&2 & -1\\ -1& -1& 2 \end{bmatrix}.$$

I want to see if the matrix $A$ positive (negative) (semi-) definite.

Define the quadratic form as $Q(x)=x'Ax$.

Let $x \in \mathbb{R}^{3}$, with $x \neq 0$.

So, $Q(x)=x'Ax = \begin{bmatrix} x_{1} &x_{2} &x_{3} \end{bmatrix} \begin{bmatrix} 2 &-1 & -1\\ -1&2 & -1\\ -1& -1& 2 \end{bmatrix} \begin{bmatrix} x_{1}\\x_{2} \\x_{3} \end{bmatrix}$.

After multiplying out the matrices I am left with $$Q(x) = 2(x_{1}^{2}+x_{2}^{2}+x_{3}^{2}-x_{1}x_{2} - x_{1}x_{3}-x_{2}x_{3}).$$

Not sure what I can do with this result. Any suggestions on how to proceed would be appreciated.

A simple way is to calculate all principle minors of $$A$$. If they are all positive, then $$A$$ is positive definite.

For example, $$|A|_1=2>0$$

$$|A|_2=\left|\begin{array}{}{\quad2 \quad-1\\ -1\quad 2} \end{array}\right|=3>0$$ Then calculate $$|A|_3=|A|$$.

If $$|A|_i\geqslant0,1\leqslant i\leqslant n$$, then $$A$$ is semi-positive definite.

If $$|A|_i<0$$ for $$i$$ is odd and $$|A|_i>0$$ for $$i$$ is even, then $$A$$ is negative definite.

If $$|A|_i\leqslant 0$$ for $$i$$ is odd and $$|A|_i\geqslant 0$$ for $$i$$ is even, then $$A$$ is semi-negative definite.

• Much neater and less complicated. And the same logic applies for negative (semi-) definite as well?
– OGC
Sep 3, 2015 at 6:11
• So here I found $|A_{3}|=0$, so $A$ is positive semi-definite.
– OGC
Sep 3, 2015 at 6:26
• Yes, you are right. You can see it in another post that quadratic form could be $0$ for nonzero $x$. Sep 3, 2015 at 6:27
• Thanks again for this approach! Very convenient.
– OGC
Sep 3, 2015 at 6:28

If you want to proceed with this solution, you should complete the square. It is important that you "complete one variable completely every time". We write \begin{aligned} x_1^2+x_2^2+x_3^2-x_1x_2-x_1x_3-x_2x_3&=\Bigl(x_1-\frac{1}{2}x_2-\frac{1}{2}x_3\Bigr)^2+\frac{3}{4}x_2^2+\frac{3}{4}x_3^2-\frac{3}{2}x_2x_3\\ &=\Bigl(x_1-\frac{1}{2}x_2-\frac{1}{2}x_3\Bigr)^2+\frac{3}{4}\bigl(x_2-x_3\bigr)^2. \end{aligned} Can you conclude from here?

• So then the matrix is positive definite?
– OGC
Sep 3, 2015 at 5:56
• No, it is positive semidefinite. From the calculation above, you find that $Q(x)\geq 0$ for all $x$. The question is: "Does there exist $x\neq 0$ such that $Q(x)=0$ or not?" In this case it does. Take $x_3$ arbitrary, $x_2=x3$ (to make the last parenthesis zero) and $x_1=x_2$ (to make the first parenthesis zero). We conclude that $Q$ is only positive semidefinite. Sep 3, 2015 at 6:00
• I see. Thanks a lot!
– OGC
Sep 3, 2015 at 6:01
• where did the factor $2$ go on the LHS?
– OGC
Sep 3, 2015 at 6:05
• I just skipped the factor 2 since it only multiplies everything and does not change the character of the quadratic form. I should have mentioned this. Sep 3, 2015 at 6:07

To say about positive (negative) (semi-) definite, you need to find eigenvalues of A. Then, 1) If all eigenvalues are positive, A is positive definite 2) If all eigenvalues are non-negative, A is positive semi-definite 3) If all eigenvalues are negative, A is negative definite 4) If all eigenvalues are non-positive, A is negative semi-definite 3) If some eigenvalues are positive and some are negative, A is neither positive nor negative definite

Eigenvalues of a matrix can be found by solving $det(\lambda I -A)=0$. For your example, this results in: $\lambda(\lambda-3)^2 =0$ which means that eigenvalues are 0, 3, 3. So we are in the second case and A is positive semi-definite.

Find $A$'s eigenvalues first. Once you know them, you know everything you need about $A$.

More explicitly, you can start by calculating $A$'s characteristic polynomial. A straightforward calculation shows that its roots are $0$ and $3$. These are $A$'s eigenvalues, and hence, with respect to an appropriate orthonormal basis, $A$ becomes$$\left(\begin{array}{ccc}0&0&0\\0&3&0\\0&0&3\end{array}\right).$$This means that $A$ is positive semi-definite.

• Could you please elaborate? What steps do I need follow here? Is there a theorem that needs to be applied?
– OGC
Sep 3, 2015 at 5:48
• @OGC I added some details to my answer. Sep 3, 2015 at 5:55
{"ft_lang_label":"__label__en","ft_lang_prob":0.533393,"math_prob":0.9997943,"size":649,"snap":"2022-27-2022-33","text_gpt3_token_len":287,"char_repetition_ratio":0.17364341,"word_repetition_ratio":0.15053764,"special_character_ratio":0.48228043,"punctuation_ratio":0.07638889,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999784,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T01:57:45Z\",\"WARC-Record-ID\":\"<urn:uuid:2f96b803-813c-453e-af80-cc4f0b7bd420>\",\"Content-Length\":\"263142\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b881ee86-c4f4-4937-8155-459490d01190>\",\"WARC-Concurrent-To\":\"<urn:uuid:0d5f276e-549c-4617-8fd1-b0da42206bee>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/1419302/is-the-matrix-a-positive-negative-semi-definite\",\"WARC-Payload-Digest\":\"sha1:R527LWFANKPRQMZ2G3GKWHGEZAM7GQ3N\",\"WARC-Block-Digest\":\"sha1:ZAT66PPR3IJ3PHZONWZUVGJ4R5PVIWBB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103033925.2_warc_CC-MAIN-20220625004242-20220625034242-00068.warc.gz\"}"}