Why does the discriminant tell us how many zeroes a quadratic equation has? The quadratic formula states that:
$$x = \frac {-b \pm \sqrt{b^2 - 4ac}}{2a}$$
The part we're interested in is $b^2 - 4ac$ this is called the discriminant.
I know from school that we can use the discriminant to figure out how many zeroes a quadratic equation has (or rather, if it has complex, real, or repeating zeroes).
If $b^2-4ac > 0$ then the equation has 2 real zeroes.
If $b^2-4ac < 0$ then the equation has 2 complex zeroes.
If $b^2-4ac = 0$ then the equation has repeating zeroes.

But I don't uderstand why this works.

If the equation is $ax^2+bx+c=0$, with $a\ne0$, it is equivalent to
$$
4a^2x^2+4abx+4ac=0
$$
that can also be rewritten as
$$
4a^2x^2+4abx+b^2=b^2-4ac
$$
or, recognizing the square on the left-hand side,
$$
(2ax+b)^2=b^2-4ac
$$
Now, if $b^2-4ac<0$, we cannot find a real number $x$ such that $(2ax+b)^2=b^2-4ac$, because $(2ax+b)^2\ge0$.
If $b^2-4ac=0$, the equation becomes $(2ax+b)^2=0$, that is, $2ax+b=0$, which has a single solution $x=-\frac{b}{2a}$.
If $b^2-4ac>0$, then the equation splits into two:
$$
2ax+b=\sqrt{b^2-4ac},\qquad 2ax+b=-\sqrt{b^2-4ac}
$$
so we have two distinct real solutions.
