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

$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$.