A rectangular plot has perimeter 28 m and area 40 m². What are its sides? Adjacent sides sum to 14 m. If one is x m, the other is (14 − x) m, giving x(14 − x) = 40. The sides are 4 m and 10 m; two roots describe the same rectangle with the side names exchanged.

We need factors, square roots and equivalent transformations. Here x is a length’s numerical value in metres, so 0 < x < 14; the product of lengths has units m².

Reveal a complete square

Expand and change the sign to obtain (x)^(2) − 14x + 40 = 0. Add and subtract (7)^(2) = 49:

(x)^(2) − 14x + 40 = (x − 7)^(2) − 9.

This is completing the square: the middle term −14x suggests half its coefficient, −7. Thus (x − 7)^(2) = 9, so x − 7 = 3 or x − 7 = − 3. We get x = 10 or x = 4, both allowed. Check: 2(4 + 10) = 28 m and 4 ⋅ 10 = 40 m².

The same construction gives a general formula

A quadratic equation has the form a(x)^(2) + bx + c = 0, with real coefficients and a ≠ 0. If a = 0, the case is linear or degenerate instead.

Multiply by the nonzero 4a, then complete a square:

4(a)^(2)(x)^(2) + 4abx + 4ac = 0,

(2ax + b)^(2) = (b)^(2) − 4ac.

The number D = (b)^(2) − 4ac is the discriminant. If D ≥ 0, then 2ax + b = ± √(D), giving:

x = ( − b ± √(D))/(2a).

The symbol ± means two calculations, with plus and minus; at D = 0 they coincide. The denominator is the whole 2a, dividing the entire numerator. Quadratic methods, OpenStax §2.5.

For our plot, a = 1,b = − 14,c = 40: D = 196 − 160 = 36. Thus x = (14 ± 6)/2, giving 10 and 4. Parentheses in ( − 14)^(2) protect the coefficient’s sign.

Why the sign of D counts roots

A square (2ax + b)^(2) cannot be negative. If D < 0, there are no real roots. If D = 0, there is one root, − b/(2a), also called a double root. If D > 0, there are two distinct real roots.

On the graph y = a(x)^(2) + bx + c, each point records the expression’s value at a given x. This graph is a parabola. Roots are the x values where y = 0: the parabola crosses the horizontal axis, touches it or shares no point with it.

-2-1012-112345xy
Solid: y=x²−1, D=4, roots −1 and 1. Dashed: y=x², D=0, root 0. Dotted: y=x²+1, D=−4, no real roots. Uniform scales; both axes use abstract units.

Not every problem needs the full formula

When b = 0 or c = 0, a term is missing. (x)^(2) − 9 = 0 immediately gives x = ± 3. In (x)^(2) − 3x = 0, factor out x: x(x − 3) = 0, so x = 0 or 3. Dividing by x would lose zero. For a ≠ 0, a(x)^(2) = 0 has only x = 0.

Vieta: coefficients record the roots

If real roots x_(1),x_(2) exist, repeating a double root, Vieta’s formulas give:

x_(1) + x_(2) = − (b)/(a), x_(1)x_(2) = (c)/(a).

Adding the formula’s roots gives − b/a, while multiplying gives ((b)^(2) − D)/(4(a)^(2)) = c/a. Expand a(x − x_(1))(x − x_(2)) to see why: the coefficient of x is − a(x_(1) + x_(2)) and the constant is ax_(1)x_(2). Conversely, numbers with the required sum and product reconstruct the original quadratic. Here 4 + 10 = 14, 4 ⋅ 10 = 40, so (x)^(2) − 14x + 40 = (x − 4)(x − 10).

An algebraic root still needs a context check. If we specify the same area but say the length exceeds the width by 6 m, we get (x)^(2) + 6x − 40 = 0. Its roots are 4 and −10, but a negative width fails: the sides remain 4 m and 10 m.

Branch · A qualificationAn extra condition that a table can easily hide.

A zero discriminant need not mean a rational root

For arbitrary real coefficients, D = 0 guarantees one real root, not necessarily a rational one. In (x)^(2) − 2√(2) x + 2 = 0, the discriminant is zero and the root is √(2). Rationality requires an additional assumption of rational coefficients.

The quadratic formula comes from the same square completion that solved our plot problem. The discriminant checks the possibility of real roots, Vieta checks sum and product, and the original conditions check whether the resulting quantities make sense.