What This Calculator Does
The Quadratic Equation From Roots Calculator reverses the usual problem: instead of solving a quadratic for its roots, it builds the quadratic equation when you already know the two roots. Enter the first root \(r_1\), the second root \(r_2\), and an optional leading coefficient \(a\), and the tool returns the equation in standard form \(ax^2 + bx + c = 0\) together with each coefficient.
How to Use It
Type your two roots into the \(r_1\) and \(r_2\) fields. If you simply want the monic equation (leading coefficient of 1), leave \(a\) as 1. If you want the curve scaled — for example \(a = 2\) to match a known vertical stretch — enter that value. Press calculate to see the assembled equation and the individual \(a\), \(b\), and \(c\) values.
The Formula Explained
If a quadratic has roots \(r_1\) and \(r_2\), it can be written as a factored product \(a(x - r_1)(x - r_2) = 0\). Expanding gives
$$a\,x^{2} - a\left(r_1 + r_2\right)x + a\left(r_1 \cdot r_2\right) = 0$$This is exactly Vieta's relationship: the sum of the roots equals \(-b/a\) and the product equals \(c/a\). So \(b = -a(r_1 + r_2)\) and \(c = a \cdot r_1 \cdot r_2\).
Worked Example
Suppose the roots are 2 and 3 with \(a = 1\). The sum is 5 and the product is 6, so \(b = -1 \cdot 5 = -5\) and \(c = 1 \cdot 6 = 6\). The equation is
$$x^{2} - 5x + 6 = 0$$Checking: factoring gives \((x - 2)(x - 3) = 0\), confirming the roots.
FAQ
Can the roots be equal? Yes. If \(r_1 = r_2\) the quadratic has a repeated (double) root and a perfect-square form.
What if I enter a = 0? A leading coefficient of zero would not be a quadratic, so the calculator treats it as 1 to keep the equation valid.
Can I use negative or decimal roots? Absolutely — any real numbers work, including negatives, fractions entered as decimals, and large values.