Quadratic Equations: Parabolas, Roots and Real-World Curves

A complete, plain-language guide with worked examples, diagrams, tables and links to AI and machine learning

In this article
  1. Introduction
  2. What is a quadratic equation?
  3. Solving by factoring
  4. Square roots and completing the square
  5. The quadratic formula
  6. The discriminant
  7. Graphing a parabola
  8. Vertex form and transformations
  9. Real-world problems
  10. Choosing a method
  11. AI and machine learning
  12. Common mistakes
  13. Practice problems
  14. Conclusion

1. Introduction

Linear equations describe steady change. Many real situations are not steady. A ball thrown upward rises quickly, slows, stops and then falls faster and faster. The area of a square grows much faster than its side. A business's profit may rise and then fall as prices climb. These situations are described by quadratic equations, the next rung on the algebra ladder.

A quadratic equation contains a variable raised to the second power, and no higher. That single squared term bends a straight line into a curve called a parabola, and it also changes how we solve: a quadratic can have two solutions, one, or none that are real numbers.

This article covers what quadratics are, the four main ways to solve them, how the discriminant predicts the answer, how to graph a parabola, and how quadratics model motion and area. We finish with an important link to machine learning, where the quadratic shape is the reason many models can be trained reliably.

2. What is a quadratic equation?

A quadratic equation is any equation that can be written in the standard form ax² + bx + c = 0, where a, b and c are numbers and a ≠ 0. If a were zero, the squared term would vanish and we would be back to a linear equation. The number a is the leading coefficient, b the linear coefficient and c the constant term.

The solutions are called roots or zeros. They are the values of x that make the equation true, and they are also the places where the graph of y = ax² + bx + c crosses the x-axis.

Three ways to write a quadratic
FormPatternWhat it shows at a glance
Standardy = ax² + bx + cthe y-intercept, c
Factoredy = a(x − r₁)(x − r₂)the roots, r₁ and r₂
Vertexy = a(x − h)² + kthe vertex, (h, k)

Each form is useful for a different question, and converting between them is a core skill.

3. Solving by factoring

Factoring rests on one fact, the zero product property: if two numbers multiply to zero, at least one of them is zero. So if (x − 2)(x − 3) = 0, then x − 2 = 0 or x − 3 = 0, which gives x = 2 or x = 3. The work is in turning the standard form into a product.

When a = 1, look for two numbers that multiply to c and add to b. For x² + 7x + 12 = 0 we need a pair that multiplies to 12 and adds to 7.

Finding the pair for x² + 7x + 12
Factor pair of 12SumAdds to 7?
1 × 1213no
2 × 68no
3 × 47yes

The pair 3 and 4 works, so x² + 7x + 12 = (x + 3)(x + 4) and the roots are x = −3 and x = −4. Always rearrange to zero first. For x² − 5x + 6 = 0 the pair is −2 and −3, giving (x − 2)(x − 3) = 0 and roots 2 and 3. Notice that these roots add to 5 and multiply to 6, which matches −b and c. In general the roots of a quadratic with a = 1 always add to −b and multiply to c, a handy check.

When a ≠ 1, the same idea needs a little more care. For 2x² + 7x + 3 = 0, the numbers must multiply to a × c = 6 and add to 7, which are 1 and 6. Split the middle term: 2x² + x + 6x + 3, then group as x(2x + 1) + 3(2x + 1) = (2x + 1)(x + 3). The roots are x = −1/2 and x = −3.

Special patterns worth recognising
PatternFactored formExample
Common factorax² + bx = x(ax + b)x² − 4x = x(x − 4)
Difference of squaresx² − k² = (x − k)(x + k)x² − 9 = (x − 3)(x + 3)
Perfect squarex² + 2kx + k² = (x + k)²x² + 6x + 9 = (x + 3)²

4. Square roots and completing the square

If the equation has no linear term, solve it by taking square roots. From x² = 49 we get x = ±7, and we must keep both signs because both 7 and −7 square to 49. From 2x² − 18 = 0, add 18 and divide by 2 to get x² = 9, so x = ±3. The same works when a bracket is squared: (x − 3)² = 16 gives x − 3 = ±4, so x = 7 or x = −1.

Any quadratic can be forced into that shape by completing the square. Take x² + 6x + 5 = 0. The expression x² + 6x is almost a perfect square, and half of 6 squared is 9, so adding 9 completes it.

Area model showing x squared plus two 3x rectangles plus a 3 by 3 square forming a larger square
Completing the square, drawn as an area: the missing corner has area 9.
Completing the square for x² + 6x + 5 = 0
StepEquationWhat we did
1x² + 6x = −5move the constant
2x² + 6x + 9 = −5 + 9add (6/2)² = 9 to both sides
3(x + 3)² = 4write the left side as a square
4x + 3 = ±2take square roots
5x = −1 or x = −5subtract 3

Check x = −1: 1 − 6 + 5 = 0. Check x = −5: 25 − 30 + 5 = 0. Both work. Completing the square is slower than factoring, but it always works, and it is how the quadratic formula is derived.

5. The quadratic formula

Doing the completing-the-square steps once, with letters instead of numbers, produces a formula that solves every quadratic: x = (−b ± √(b² − 4ac)) / (2a). The symbol ± means there are two answers, one with a plus and one with a minus.

Use it on 2x² − 4x − 6 = 0. Here a = 2, b = −4 and c = −6. Then b² − 4ac = 16 + 48 = 64, whose square root is 8, so x = (4 ± 8) / 4. That gives x = 3 and x = −1. Check: 2(9) − 12 − 6 = 0 and 2 + 4 − 6 = 0.

Sometimes the square root is not a whole number. For x² + 4x + 1 = 0, b² − 4ac = 16 − 4 = 12, so x = (−4 ± √12) / 2 = −2 ± √3, about −0.27 and −3.73. Leaving the answer as −2 ± √3 is exact, and the decimals are only approximations.

Using the formula: three examples
Equationa, b, cb² − 4acRoots
2x² − 4x − 6 = 02, −4, −6643 and −1
x² + 4x + 1 = 01, 4, 112−2 + √3 and −2 − √3
x² − 4x + 4 = 01, −4, 402 (repeated)

6. The discriminant

The expression under the square root, D = b² − 4ac, is called the discriminant because it discriminates between the possible outcomes before you do any real solving. A positive number has two square roots, zero has one, and a negative number has no real square root.

What the discriminant tells you
Value of DNumber of real rootsThe parabolaExample and its D
D > 0twocrosses the x-axis twicex² − 3x + 1, D = 5
D = 0one (repeated)touches the x-axis oncex² − 4x + 4, D = 0
D < 0nonenever reaches the x-axisx² + 2x + 5, D = −16
Three small parabolas showing two, one and zero x-axis crossings
The discriminant decides how many times the parabola meets the x-axis.

When D is negative, the equation still has solutions, but they are complex numbers that involve the square root of −1. For real-world measurements such as time and length we normally treat that case as "no solution."

7. Graphing a parabola

The graph of any quadratic is a parabola, a symmetric U-shaped curve. If a > 0 it opens upward and has a lowest point; if a < 0 it opens downward and has a highest point. A larger size of a makes the curve narrower and a smaller size makes it wider. That turning point is the vertex, and the vertical line through it is the axis of symmetry.

Four parabolas with different values of a
Changing a flips and stretches the parabola.

Four features are enough to sketch a parabola. The vertex has x-coordinate x = −b / (2a), and you find its y-coordinate by substituting that value back. The y-intercept is c. The roots, if any, come from solving the equation. The two sides mirror each other across the axis.

Parabola y = x² − 4x + 3 with roots, vertex, y-intercept and axis labelled
The features of y = x² − 4x + 3.

For y = x² − 4x + 3, the vertex is at x = 4/2 = 2, where y = 4 − 8 + 3 = −1. The y-intercept is 3 and the roots are 1 and 3, exactly symmetric about x = 2. A table of values confirms the shape.

Table of values for y = x² − 4x + 3
xCalculationy
-1(-1)² − 4(-1) + 38
0(0)² − 4(0) + 33
1(1)² − 4(1) + 30
2(2)² − 4(2) + 3-1
3(3)² − 4(3) + 30
4(4)² − 4(4) + 33
5(5)² − 4(5) + 38

8. Vertex form and transformations

Vertex form, y = a(x − h)² + k, makes the graph easy to read because the vertex is simply (h, k). Notice the sign: (x − 2)² moves the vertex to the right by 2, and (x + 2)² moves it left. Adding k lifts the whole curve, and a negative a flips it over.

Four parabolas shifted, lifted and flipped relative to y = x squared
Each change to a, h and k has a visible effect.
Effect of each parameter in y = a(x − h)² + k
ParameterChangeEffect on the graph
hh > 0shifts right by h
hh < 0shifts left by |h|
kk > 0shifts up by k
kk < 0shifts down by |k|
aa < 0flips the parabola over
a|a| > 1narrower
a|a| < 1wider

To convert from standard form, complete the square. For y = x² − 6x + 11, write x² − 6x + 9 + 2, which is (x − 3)² + 2, so the vertex is (3, 2). In the other direction, y = 2(x − 1)² − 3 expands to 2(x² − 2x + 1) − 3 = 2x² − 4x − 1.

9. Real-world problems

A ball is thrown upward from a platform 25 metres high. Its height after t seconds is h = −5t² + 20t + 25. The negative a reflects gravity pulling the ball back down. The vertex gives the peak: t = −20 / (2 × −5) = 2 seconds, at height −20 + 40 + 25 = 45 metres. The ball lands when h = 0, so −5t² + 20t + 25 = 0. Dividing by −5 gives t² − 4t − 5 = 0, which factors as (t − 5)(t + 1) = 0. The root t = −1 is before the throw, so we reject it, and the ball lands after 5 seconds.

Height of the ball over time
Time t (s)CalculationHeight h (m)
0−5(0)² + 20(0) + 2525
1−5(1)² + 20(1) + 2540
2−5(2)² + 20(2) + 2545
3−5(3)² + 20(3) + 2540
4−5(4)² + 20(4) + 2525
5−5(5)² + 20(5) + 250
Curve of a thrown ball showing the peak and landing point
Height against time is a downward-opening parabola.

Quadratics also solve optimisation problems. You have 40 metres of fence to enclose a rectangle. If the width is x, the length is 20 − x, so the area is A = x(20 − x) = −x² + 20x. The vertex is at x = 10, giving a maximum area of 100 square metres, so the best rectangle is a square.

Area against width for a fixed amount of fencing, peaking at width 10
The best rectangle for 40 m of fence has width 10 m.
Fencing 40 m: area for different widths
Width x (m)Length 20 − x (m)Area (m²)
21836
51575
81296
1010100
12896
15575
18236

10. Choosing a method

With four methods available, the question is which to use. A short decision path saves time. Check for the easy cases first, try factoring, and fall back on the formula, which never fails.

Decision chart for choosing a quadratic solving method
A simple way to choose a method.
Comparing the methods
MethodStrengthWeakness
Square rootsfastest when b = 0only works with no linear term
Factoringquick with whole-number rootsnot always possible
Completing the squarealways works; gives vertex formslower, more steps
Quadratic formulaalways works, mechanicaleasy to slip on signs

11. AI and machine learning

Quadratics are one of the most important shapes in machine learning because of how models are trained. A model makes predictions, and a loss function scores how wrong they are. The most common choice is squared error, L = (ŷ − y)². For a one-weight model ŷ = wx, that loss is (wx − y)², which is a quadratic in w. Averaged over many data points it is still a quadratic, a single smooth bowl with one lowest point.

That bowl shape is the reason training works so reliably. Because the parabola has exactly one minimum and no other dips, an algorithm that keeps stepping downhill is guaranteed to reach it. This procedure is gradient descent. At each step it moves the weight against the slope of the loss, scaled by a step size called the learning rate.

Take L(w) = (w − 3)² + 2, whose minimum is at w = 3. The slope is 2(w − 3), so each update is w ← w − η · 2(w − 3). Starting at w = 0 with learning rate η = 0.25, every step halves the distance to 3.

Gradient descent on L(w) = (w − 3)² + 2, with η = 0.25
StepWeight wLoss L(w)
0011
11.54.25
22.252.5625
32.6252.1406
42.81252.0352
Parabola with red points stepping down toward the minimum at w equals 3
Each step moves closer to the bottom of the bowl.

The learning rate must be chosen well. The distance to the minimum is multiplied by 1 − 2η at every step. If that factor is between −1 and 1 the process converges, and a negative factor means it overshoots the minimum and bounces from side to side.

Effect of the learning rate on L(w) = (w − 3)² + 2
Learning rate ηFactor (1 − 2η)Behaviour
0.250.5converges smoothly
0.50lands on the minimum in one step
0.9-0.8converges, but zigzags across the minimum
1-1bounces between two values forever
1.1-1.2diverges, getting worse each step

Quadratics appear elsewhere in machine learning too. Ridge regularisation adds a quadratic penalty λw² to keep weights small. Variance, the basis of many statistics, is an average of squared deviations. And second-order optimisers approximate a loss locally by a quadratic, because a quadratic can be minimised exactly with the formula x = −b / 2a.

The same ideas, two vocabularies
AlgebraMachine learning
parabolaloss curve for squared error
vertex (lowest point)best weight, the minimum loss
opens upward (a > 0)convex loss: one minimum, safe to descend
slope at a pointgradient
step along the curveweight update
x² termsquared error and quadratic penalties

12. Common mistakes

Frequent mistakes and corrections
MistakeWrongRight
Forgetting the second rootx² = 49 → x = 7x = ±7
Not rearranging to zero firstx(x − 3) = 4 → x = 0 or x = 7x² − 3x − 4 = 0 → x = 4 or x = −1
Dividing away a variablex² = 3x → x = 3x(x − 3) = 0 → x = 0 or x = 3
Sign slip with bb = −4 → −b = −4−b = 4
Expanding a square wrongly(x + 3)² = x² + 9x² + 6x + 9
Skipping the checktrusting the rootssubstitute both back in

13. Practice problems

Try these before looking at the answers.

  1. Solve x² − 7x + 10 = 0 by factoring.
  2. Solve x² = 81.
  3. Solve 2x² + 5x − 3 = 0 with the formula.
  4. Solve x² + 4x + 1 = 0 and leave the answer exact.
  5. Find the discriminant of 3x² − 2x + 5 and say how many real roots it has.
  6. Find the vertex of y = x² + 6x + 5.
  7. A ball's height is h = −5t² + 10t. When does it return to the ground, and what is its maximum height?

Answers.

  1. (x − 2)(x − 5) = 0, so x = 2 or x = 5.
  2. x = ±9.
  3. b² − 4ac = 25 + 24 = 49, so x = (−5 ± 7)/4, giving x = 1/2 or x = −3.
  4. D = 12, so x = −2 ± √3.
  5. D = 4 − 60 = −56, which is negative, so there are no real roots.
  6. x = −6/2 = −3 and y = 9 − 18 + 5 = −4, so the vertex is (−3, −4).
  7. −5t(t − 2) = 0, so it lands at t = 2 s. The peak is at t = 1, where h = −5 + 10 = 5 m.

14. Conclusion

Quadratic equations add a single squared term to the linear world, and that term curves the line into a parabola, brings in two solutions instead of one, and makes the discriminant a quick way to predict the outcome. Factoring, square roots, completing the square and the quadratic formula are four tools for the same job, and the formula is the one that never fails.

Beyond the classroom, the parabola models falling objects and best-area designs, and in machine learning its single smooth minimum is what lets models be trained by stepping downhill. With quadratics understood, you are ready for functions in general, where the equations you have studied become rules that turn inputs into outputs.