TITLE: What is the connection between the discriminant of a quadratic and the distance formula?
QUESTION [19 upvotes]: The $x$-coordinate of the center of a parabola $ax^2 + bx + c$ is $$-\frac{b}{2a}$$
If we look at the quadratic formula
$$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
we can see that it specifies two points at a certain offset from the center
$$-\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}$$
This means that $\frac{\sqrt{b^2 - 4ac}}{2a}$ is the (horizontal) distance from the vertex to the roots. If I squint, the two squared-ish quantities being subtracted under a square root sign reminds me of the Euclidean distance formula
$$\sqrt{(x_0 - x_1)^2 + (y_0 - y_1)^2}$$
Is there a connection? If not, is there any intuitive or geometric reason why $\frac{\sqrt{b^2 - 4ac}}{2a}$ should be the horizontal distance from the vertex to the roots?

REPLY [2 votes]: For the equation $ax^2 + bx + c = 0$ the second coefficients represents the average of the two roots:
$$ \frac{1}{2}(r_1 + r_2) =  -\frac{b}{2a} $$
Instead of using the quadratic formula directly we can just observe that:
$$ (x - r_1)(x - r_2) = x^2 - (r_1 + r_2) + r_1 r_2$$
This also recovers the product mean  of the two roots is $r_1 r_2 = \frac{c}{a}$.

In order to get the distance between the two roots we need to estimate the distance $|r_1 - r_2|$:
$$ |r_1 - r_2| =  \sqrt{(r_1 + r_2)^2 - 4 r_1 r_2} = \sqrt{\frac{b^2}{a^2} - \frac{4c}{a}} = \frac{\sqrt{b^2 - 4ac}}{a}$$