Jugami Algebra

Jugami › Algebra › Quadratic Equations

Quadratic Equations

How to solve equations with an x² in them: by square roots, by factoring, by completing the square and with the quadratic formula.

A garden is 3 meters longer than it is wide and covers 40 square meters. How wide is it? If the width is w, the area is w(w + 3) = 40. Multiply it out and you get w² + 3w − 40 = 0. The variable is squared, so the methods for linear equations aren’t enough. That is a quadratic equation, and this unit shows four ways to solve one. (The garden is 5 meters wide.)

Graph of the parabola y = x² − 2x − 3 on a grid. It opens upward, crosses the x-axis at (−1, 0) and (3, 0), marked in coral, crosses the y-axis at (0, −3), marked in gold, and has its lowest point, the vertex, at (1, −4), marked in purple. A dashed gold line x = 1 is the axis of symmetry.xy−5−4−3−224567−5−412345670y = x² − 2x − 3(−1, 0)(3, 0)(0, −3)(1, −4)
The graph of y = x² − 2x − 3 is a parabola. It crosses the x-axis at x = −1 and x = 3, the solutions of x² − 2x − 3 = 0.

What is a quadratic equation?

A quadratic equation is an equation that can be written in standard form

ax² + bx + c = 0, where a ≠ 0.

The numbers a, b and c are the coefficients. The highest power of x is 2: that is what “quadratic” means (it comes from the Latin word for a square). If a were 0 there would be no x² term and the equation would be linear.

Quadratic or not?
EquationQuadratic?Why
3x² − 5x + 2 = 0Yesa = 3, b = −5, c = 2
x² = 16Yesx² − 16 = 0: a = 1, b = 0, c = −16
x(x + 4) = 7YesMultiply out: x² + 4x − 7 = 0
5x − 2 = 0NoNo x² term: it is linear
x³ − x = 0NoThe highest power is 3

A solution (or root) is a value of x that makes the equation true. A quadratic equation has two real solutions, one, or none, and the graph below shows why.

Your turn

Write 2x² = 3x + 5 in standard form and name a, b and c.

Show answer
2x² − 3x − 5 = 0Subtract 3x and 5 from both sidesa = 2, b = −3, c = −5Read the coefficients, signs included

The graph: a parabola

The graph of y = ax² + bx + c is a U-shaped curve called a parabola. The picture at the top of the page shows y = x² − 2x − 3. Four features matter most:

Features of a parabola
FeatureWhat it isFor y = x² − 2x − 3
VertexThe turning point: the lowest point if a > 0 (opens up), the highest if a < 0 (opens down)(1, −4)
Axis of symmetryThe vertical line through the vertex, x = −b/(2a). The two halves are mirror imagesx = 1
Roots (x-intercepts)Where the graph crosses the x-axis, so y = 0. These are the solutions of ax² + bx + c = 0x = −1 and x = 3
y-interceptWhere the graph crosses the y-axis: put x = 0, which gives y = c(0, −3)

Example: find the vertex of y = x² − 2x − 3

x = 2/2 = 1Axis of symmetry x = −b/(2a): here −b = 2 and 2a = 2y = 1² − 2(1) − 3 = −4Put x = 1 into the equation(1, −4)The vertex. a = 1 > 0, so it is the lowest point

Solutions are x-intercepts

Solving ax² + bx + c = 0 is the same as asking where the graph of y = ax² + bx + c has height 0. A parabola can cross the x-axis twice, touch it once at its vertex, or miss it completely.

Parabola explorer

Change a, b and c and watch the parabola move. Make a negative to flip it. Switch to vertex form to move the vertex directly with h and k.

Solving by square roots

When the equation has an x² (or a squared bracket) and no other x term, get the square by itself and take the square root of both sides. Both 4² and (−4)² equal 16, so there are two square roots: write ±, read “plus or minus”.

Example 1: 3x² − 48 = 0

3x² = 48Add 48 to both sidesx² = 16Divide both sides by 3x = ±4Take the square root of both sides; don’t forget ±x = −4 or x = 4Check: 3(16) − 48 = 0 ✓

Example 2: (x − 1)² = 25

x − 1 = ±5Take the square root of both sidesx = 1 ± 5Add 1 to both sidesx = 6 or x = −4Work out the + case and the − case

Example 3: x² + 9 = 0

x² = −9Subtract 9 from both sidesNo real solutionA real number squared is never negative

If the number isn’t a perfect square, leave a square root in the answer: x² = 7 gives x = ±√7, about ±2.65.

Solving by factoring

Factoring rests on one fact, the zero-product property: if AB = 0, then A = 0 or B = 0. If two numbers multiply to 0, one of them has to be 0.

  1. Move every term to one side so the other side is 0.
  2. Factor the quadratic into two brackets.
  3. Set each bracket equal to 0 and solve.
  4. Check each answer in the original equation.

When a = 1

To factor x² + bx + c, find two numbers that multiply to c and add to b.

Example 1: x² − x − 12 = 0

−4 · 3 = −12 and −4 + 3 = −1Two numbers that multiply to −12 and add to −1(x − 4)(x + 3) = 0Factorx − 4 = 0 or x + 3 = 0Zero-product propertyx = −3 or x = 4Check: 16 − 4 − 12 = 0 and 9 + 3 − 12 = 0 ✓

Example 2: x² = 6x

x² − 6x = 0Subtract 6x so one side is 0. Don’t divide by x: that would lose x = 0x(x − 6) = 0Factor out the common xx = 0 or x − 6 = 0Zero-product propertyx = 0 or x = 6Two solutions

When a ≠ 1: the ac method

For ax² + bx + c, find two numbers that multiply to a · c and add to b. Use them to split the middle term into two, then factor in pairs (this is called factoring by grouping).

Example 3: 2x² + 5x − 3 = 0

2 · (−3) = −6Multiply a · c6 · (−1) = −6 and 6 + (−1) = 5Two numbers that multiply to −6 and add to 52x² + 6x − x − 3 = 0Split 5x into 6x − x2x(x + 3) − (x + 3) = 0Factor each pair; both share (x + 3)(2x − 1)(x + 3) = 0Factor out (x + 3)2x − 1 = 0 or x + 3 = 0Zero-product propertyx = −3 or x = 1/2Solve each one

Check the signs

The bracket (x + 3) is 0 when x = −3, not 3. Each solution has the opposite sign of the number in its bracket.

Completing the square

Not every quadratic factors nicely. Completing the square works on any of them: rewrite the left side as a perfect square (x + h)², then use square roots. The key fact is that x² + 2hx + h² = (x + h)², so you add the square of half the x-coefficient.

  1. If a ≠ 1, divide every term by a.
  2. Move the constant to the right side.
  3. Take half of the x-coefficient, square it, and add it to both sides.
  4. Write the left side as a square and take square roots.

Example 1: x² + 6x − 7 = 0

x² + 6x = 7Add 7 to both sidesx² + 6x + 9 = 7 + 9Half of 6 is 3, and 3² = 9: add 9 to both sides(x + 3)² = 16The left side is a perfect squarex + 3 = ±4Take square rootsx = −3 ± 4Subtract 3x = 1 or x = −7Work out both cases

Example 2: x² − 4x − 1 = 0

x² − 4x = 1Add 1 to both sidesx² − 4x + 4 = 1 + 4Half of −4 is −2, and (−2)² = 4(x − 2)² = 5Perfect squarex − 2 = ±√5Take square rootsx = 2 ± √5Exact answers: about 4.24 and −0.24

The quadratic formula

Completing the square on ax² + bx + c = 0 with letters instead of numbers gives a formula that solves every quadratic equation:

x = (−b ± √(b² − 4ac))/(2a)

Write the equation in standard form first, read off a, b and c with their signs, and put them in.

Example 1: 2x² − 3x − 2 = 0

a = 2, b = −3, c = −2Read the coefficients(−3)² − 4(2)(−2) = 9 + 16 = 25Work out b² − 4ac firstx = (3 ± √25)/4−b = 3 and 2a = 4x = (3 ± 5)/4√25 = 5x = 8/4 or x = −2/4The + case and the − casex = 2 or x = −1/2Simplify

Example 2: x² − 2x − 1 = 0

a = 1, b = −2, c = −1Read the coefficients(−2)² − 4(1)(−1) = 8b² − 4acx = (2 ± √8)/2Use the formulax = (2 ± 2√2)/2√8 = √4 · √2 = 2√2x = 1 ± √2Divide both terms on top by 2: about 2.41 and −0.41

Which method?

Use square roots when there is no x-term, factoring when you can spot the numbers quickly, and the formula when you can’t. Completing the square is how the formula is proved, and it is the way to get vertex form.

The discriminant: how many solutions?

The part under the square root, b² − 4ac, is called the discriminant. You can tell how many real solutions there are before you solve:

The discriminant and the number of solutions
b² − 4acReal solutionsThe graph
positivetwocrosses the x-axis twice
zeroone (a double root)touches the x-axis at its vertex
negativenonenever meets the x-axis
The parabola y = x² − 4x + 3 crosses the x-axis twice, at (1, 0) and (3, 0).xy−1245−2−11230(1, 0)(3, 0)
Two. (−4)² − 4(1)(3) = 4, which is positive.
The parabola y = x² − 4x + 4 touches the x-axis once, at its vertex (2, 0).xy−11345−2−112340(2, 0)
One. (−4)² − 4(1)(4) = 0
The parabola y = x² − 4x + 6 stays above the x-axis. Its vertex is (2, 2), so it never crosses.xy−112345−2−11234560(2, 2)
None. (−4)² − 4(1)(6) = −8, which is negative.

Example: x² + 2x + 5 = 0

a = 1, b = 2, c = 5Read the coefficients2² − 4(1)(5) = −16The discriminant is negativeNo real solutionThere is no real number whose square is −16

Vertex form

A quadratic written as y = a(x − h)² + k is in vertex form. Its vertex is (h, k) and its axis of symmetry is x = h, so you can read them straight off. Watch the sign: (x − 2)² means h = 2, and (x + 2)² means h = −2.

Example 1: the vertex of y = −(x − 2)² + 4

h = 2, k = 4, a = −1Compare with a(x − h)² + kVertex (2, 4)a < 0, so it opens down and (2, 4) is the highest point0 = −(x − 2)² + 4Roots: set y = 0(x − 2)² = 4Add (x − 2)² to both sidesx − 2 = ±2Take square rootsx = 0 or x = 4The x-intercepts
The parabola y = −(x − 2)² + 4 opens downward. Its vertex (2, 4), marked in purple, is the highest point, and it crosses the x-axis at (0, 0) and (4, 0).xy−2−11356123456(2, 4)(0, 0)(4, 0)

Example 2: write y = x² − 6x + 5 in vertex form

y = (x² − 6x + 9) − 9 + 5Complete the square: add and subtract (−3)² = 9y = (x − 3)² − 4Vertex formVertex (3, −4)h = 3 and k = −4

Word problems

Quadratics model areas (length times width) and objects thrown or dropped. Write the equation, get 0 on one side, solve, and then ask whether each answer makes sense: a length or a time can’t be negative.

Example 1: the garden

w(w + 3) = 40Let w be the width in meters; the length is w + 3w² + 3w − 40 = 0Multiply out and subtract 40(w + 8)(w − 5) = 08 · (−5) = −40 and 8 + (−5) = 3w = −8 or w = 5Zero-product propertyw = 5A width can’t be negative: the garden is 5 m wide and 8 m long. Check: 5 × 8 = 40 ✓

Example 2: a ball thrown upward

−5t² + 20t + 25 = 0Its height is h = −5t² + 20t + 25 meters after t seconds. It lands when h = 0t² − 4t − 5 = 0Divide every term by −5(t − 5)(t + 1) = 0Factort = 5 or t = −1Zero-product propertyt = 5Time after the throw can’t be negative: the ball lands after 5 seconds

The question in Example 2: a ball is thrown upward at 20 m/s from the top of a 25 m cliff. In the model, −5t² is the pull of gravity: gravity is about 9.8 meters per second squared, and the 5 is half of that, rounded; 20t is the throw and 25 is the starting height. When does it hit the ground?

Answer the question

Finish with a sentence and units: “The garden is 5 m wide.” Check it against the story, not just the equation.

Common mistakes

✗Taking only the positive square root: x² = 25 so x = 5.✓There are two: x = ±5, so x = 5 or x = −5.
✗Dividing both sides by x: x² = 6x so x = 6.✓Dividing by x loses x = 0. Subtract 6x, then factor: x(x − 6) = 0.
✗Using the zero-product property when the other side isn’t 0: (x − 2)(x + 1) = 4 so x = 2 or x = −1.✓Get 0 on one side first: x² − x − 6 = 0, so (x − 3)(x + 2) = 0 and x = 3 or x = −2.
✗Reading the wrong sign from a factor: (x + 3) = 0 so x = 3.✓x + 3 = 0 gives x = −3.
✗Squaring a negative b wrongly: with b = −3, writing b² = −9.✓(−3)² = 9. Always put a negative number in brackets before squaring.
✗Adding the completing-the-square number to one side only.✓Add it to both sides: x² + 6x + 9 = 7 + 9.
✗Dividing only part of the top by 2a: (2 ± 2√2)/2 = 2 ± √2.✓Divide every term on top: (2 ± 2√2)/2 = 1 ± √2.
✗Keeping a negative answer to a length or time problem.✓Check each answer against the story and say which one makes sense.

Practice problems

Solve each one on paper (problems 1 to 8 ask you to solve for x), then open the answer to check your work.

  1. x² = 49
    Show answer
    x = ±7Take square rootsx = −7 or x = 7
  2. 3x² − 75 = 0
    Show answer
    3x² = 75Add 75x² = 25Divide by 3x = ±5Take square rootsx = −5 or x = 5
  3. (x − 2)² = 9
    Show answer
    x − 2 = ±3Take square rootsx = 2 ± 3Add 2x = 5 or x = −1
  4. x² + 7x + 12 = 0
    Show answer
    3 · 4 = 12 and 3 + 4 = 7Multiply to 12, add to 7(x + 3)(x + 4) = 0Factorx = −4 or x = −3Zero-product property
  5. x² − 9x = 0
    Show answer
    x(x − 9) = 0Factor out xx = 0 or x = 9Zero-product property
  6. 3x² − 10x − 8 = 0
    Show answer
    3 · (−8) = −24a · c−12 · 2 = −24 and −12 + 2 = −10Multiply to −24, add to −103x² − 12x + 2x − 8 = 0Split the middle term3x(x − 4) + 2(x − 4) = 0Factor each pair(3x + 2)(x − 4) = 0Factor out (x − 4)x = −2/3 or x = 4Zero-product property
  7. Solve by completing the square: x² + 8x + 11 = 0
    Show answer
    x² + 8x = −11Subtract 11x² + 8x + 16 = −11 + 16Half of 8 is 4, and 4² = 16(x + 4)² = 5Perfect squarex + 4 = ±√5Take square rootsx = −4 ± √5About −1.76 and −6.24
  8. Use the quadratic formula: 2x² + x − 6 = 0
    Show answer
    a = 2, b = 1, c = −6Read the coefficients1² − 4(2)(−6) = 49b² − 4acx = (−1 ± 7)/4√49 = 7x = 3/2 or x = −26/4 = 3/2 and −8/4 = −2
  9. How many real solutions does 2x² − x + 3 = 0 have?
    Show answer
    (−1)² − 4(2)(3) = −23The discriminantNoneIt is negative, so there is no real solution
  10. Write y = x² + 4x + 1 in vertex form and give the vertex.
    Show answer
    y = (x² + 4x + 4) − 4 + 1Add and subtract 2² = 4y = (x + 2)² − 3Vertex formVertex (−2, −3)h = −2 and k = −3
  11. A ball’s height is h = −5t² + 10t + 15 meters after t seconds. When does it hit the ground?
    Show answer
    −5t² + 10t + 15 = 0Set h = 0t² − 2t − 3 = 0Divide by −5(t − 3)(t + 1) = 0Factort = 3t = −1 makes no sense here: it lands after 3 seconds

History: from Babylonian tablets to al-Khwarizmi

Problems that we would now write as quadratic equations appear on clay tablets from Babylonia (in present-day Iraq) from around 1800 BC. The scribes had no symbols and no idea of an “equation” as we use the word. Instead they wrote out a recipe of steps for a problem about lengths and areas, and historians describe their method as essentially completing the square. Their answers were positive numbers, which makes sense when the answer is a length.

More than two thousand years later, in the early 800s, the scholar Muhammad ibn Musa al-Khwarizmi worked in Baghdad at the House of Wisdom. His book on al-jabr and al-muqabala (“restoring” and “balancing”) gives us the word algebra. He sorted equations into six types, wrote everything in words with no symbols and no negative numbers, and backed up his rules with geometric pictures.

One of his examples, in words, was “a square and ten roots equal thirty-nine”: x² + 10x = 39. His recipe was to halve the 10 to get 5, square it to get 25, add the 39 to get 64, take the square root to get 8, and subtract the 5 to get 3. For the proof he drew a square of side x with four rectangles of breadth 10/4 on its sides, then filled in the four small corner squares, each with area 25/4. That adds 25 in total and makes one big square of area 39 + 25 = 64, so its side, x + 5, is 8.

The same steps today

Show the modern version
x² + 10x + 25 = 39 + 25Add (10/2)² = 25 to both sides: the four corner squares(x + 5)² = 64The big squarex + 5 = ±8Take square rootsx = 3 or x = −13al-Khwarizmi gave only x = 3. Today we also accept the negative solution, −13

Practice: Find the Roots

A new quadratic equation every time, with hints, full steps and a graph. Choose a level, or mix them all. Type every solution, separated by a comma, like 3, −2 or x = 3, x = −2. Fractions like 3/2 are fine. If there is none, use the No real solution button.

Sources

Credits: all graphs on this page are original SVG drawings made for Jugami. Every equation, solution and step was checked by a script.