# Prove that $a^2+ab+b^2\ge 0$ [duplicate]

How to prove that $a^2+ab+b^2\ge 0$?

Obviously the squares are positive, but how can I be sure that $ab$ doesn't become too negative with a certain combination of $a$ and $b$?

• if $|A| \le |B|$, $|AB| \le |B^2|$; otherwise $|AB| < |A^2|$ – 0XLR Sep 17 '15 at 13:14
• An older post about the same inequality: Inequality: $x^2+y^2+xy\ge 0$ – Martin Sleziak Sep 17 '15 at 13:19
• $ab$ cannot become too negative because $a^2+2ab+b^2=(a+b)^2\ge 0$ $\Rightarrow$ $ab\ge -\frac12(a^2+b^2)$. – A.Γ. Sep 17 '15 at 13:19
• This question is also a variation of the question of your post: How can I prove that $xy\leq x^2+y^2$? – Martin Sleziak Sep 20 '15 at 11:27
• – Anurag A Oct 13 '15 at 5:27

$a^2+ab+b^2= (a+ \frac{1}{2}b)^2 + \frac{3}{4}b^2$

One may prefer symmetry: $2(a^2+ab+b^2)= a^2 +b^2+(a+b)^2$.

There is yet another of seeing this.

Since $ab$ is between $-2ab$ and $2ab$, the quantity $a^2+ab+b^2$ must be between $a^2-2ab+b^2$ and $a^2+2ab+b^2$. But these two quantities obey

$$a^2-2ab+b^2=(a-b)^2\ge0 \tag{1}$$ and $$a^2+2ab+b^2=(a+b)^2\ge0 \tag{2}$$ with equality only if $a=b$ for (1), $a=-b$ for (2),or $a=b=0$ for (1) and (2).

Since $a^2+ab+b^2$ is inclusively between two non-negative quantities, it must be non-negative.

This motivates why the discriminant is so important - in cases such as $a^2+3ab+b^2=(a+b)^2+ab$, the quantity is not between those in (1) and (2), and completing the square will lead to a difference of squares rather than an addition of squares, i.e $(a+\frac{3}{2}b)^2-(\frac{\sqrt5}{2}b)^2$.

Any second-degree polynomial with a negative discriminant always has the same sign.
That follows from completing the square, as Khue did. In our case:

$$4(a^2+ab+b^2) = (2a+b)^2+\color{red}{3}b^2$$ and that $\color{red}{3}$ is the opposite of the discriminant of $a^2+ab+b^2$, i.e. $1^2-4\cdot 1\cdot 1=-3.$

Or, one can argue via the sign of $ab$:

if

$ab \ge 0, \tag{1}$

then, since

$a^2, b^2 \ge 0$ for all $a, b \in \Bbb R$,

$a^2 + b^2 + ab \ge 0; \tag{2}$

if

$ab < 0, \tag{3}$

then evidently

$ab = -\vert a \vert \vert b \vert, \tag{4}$

and we can without loss of generality assume that

$\vert a \vert \ge \vert b \vert, \tag{5}$

since the expression $a^2 + ab + b^2$ is invariant under the interchange $a \leftrightarrow b$. Thus,

$a^2 + ab = \vert a \vert^2 - \vert a \vert \vert b \vert$ $= \vert a \vert (\vert a \vert - \vert b \vert) \ge 0, \tag{6}$

whence

$a^2 + ab + b^2 \ge 0, \tag{7}$

since $b^2 \ge 0$ for all $b \in \Bbb R$.