Chalk−1

Math · College algebra · Concept

The quadratic formula and the discriminant

The quadratic formula x=(−b±b2−4⁢a⁢c)⁢/⁢(2⁢a) solves any equation ax2+b⁢x+c=0 with a≠0. The discriminant b2−4⁢a⁢c tells you, before you solve, whether there are two, one or no real solutions.

Try one — Chalk checks each line

A concrete case

Finish the square

Find every number x with x2+6⁢x=16.

Guessing finds x=2, since 4+12=16. Is there another? Picture x2+6⁢x as a square of side x with two strips beside it, each 3 by x. The pieces almost make a bigger square of side x+3. Only a 3-by-3 corner is missing, and its area is 9.

Add that corner to both sides. The left side becomes the full square, (x+3)2, and the right side becomes 16+9=25. A number whose square is 25 is 5 or −5. From x+3=5, x=2. From x+3=−5, x=−8. Check the new one: (−8)2+6⁢(−8) =64−48 =16.

Guessing found one answer. Completing the square found both, and it works when no guess would, as with x2+6⁢x=10, where (x+3)2=19 and x=−3±19.

x2+6⁢x+9=25⟹(x+3)2=25⟹x=2 or x=−8
x2+6⁢x+9=25(x+3)2=25x=2 or x=−8
The pieces of x2+6⁢x, and the corner that completes the square
x+3
xx23⁢x
+33⁢x9, the missing corner

The rule

The quadratic formula

A quadratic equation in standard form is ax2+b⁢x+c=0, with every term on one side and 0 on the other. The letters a, b and c are its coefficients, read with their signs, and a is not 0.

Completing the square on that general equation, once and for all, gives the quadratic formula. It solves every quadratic equation, including those whose solutions are irrational or complex. The ± means the formula gives two values, one with + and one with −.

ax2+b⁢x+c=0  (a≠0)⟹x=−b±b2−4⁢a⁢c2⁢a
ax2+b⁢x+c=0  (a≠0)x=−b±b2−4⁢a⁢c2⁢a

The discriminant counts the real solutions

The quantity under the root, D=b2−4⁢a⁢c, is the discriminant. A positive discriminant gives two different real solutions. Zero gives one repeated solution, x=−b⁢/⁢(2⁢a). A negative discriminant gives no real solutions, because a negative number has no real square root. The two solutions are then complex numbers.

Work out D before anything else. It tells you what kind of answer to expect, and a perfect square, such as 25 or 1, means the quadratic also factors with whole numbers.

D=b2−4⁢a⁢c
What the discriminant tells you
DiscriminantReal solutionsGraph of y =ax2+b⁢x+c
D>0TwoCrosses the x-axis twice
D=0One (repeated)Touches the x-axis at its vertex
D<0None (two complex)Stays above or below the x-axis

Why it works

Where the formula comes from

The formula is the corner trick from the concrete case, done with letters. Divide by a so the x2 coefficient is 1. Move c⁢/⁢a to the right. Half the x coefficient is b⁢/⁢(2⁢a), so the missing corner is (b⁢/2⁢a)2. Add it to both sides, and the left side becomes a perfect square.

The right side, over a common denominator, is (b2−4⁢a⁢c)⁢/⁢(4a2). Take both square roots, then subtract b⁢/⁢(2⁢a). Each line is equivalent to the one before, so the formula loses no solution and adds none.

The discriminant sits under the root, which is why its sign decides everything. A positive number has two square roots, zero has one, and a negative number has none among the real numbers.

x2+bax=−ca(x+b2⁢a)2=b2−4⁢a⁢c4a2x+b2⁢a=±b2−4⁢a⁢c2⁢a
Why is the denominator 2⁢a and not 2⁢∣⁢a⁢∣?

The square root of 4a2 is 2⁢∣⁢a⁢∣, but the ± already includes both signs, so writing 2⁢a gives the same pair of solutions.

The method

The method in six steps

The table solves x2=3⁢x+4 with the formula.

Keep the radical exact until the end. Simplify it by taking out a perfect-square factor, such as 20=4⋅5=25, and divide the whole numerator by 2⁢a. Round only when a decimal is asked for, and round each solution separately.

x=−(−3)±252⁢(1)=3±52
Solving x2 =3⁢x+4 with the formula
StepWhat to doFor x2 =3⁢x+4
1Move every term to one sidex2−3⁢x−4 =0
2Read a, b and c with their signsa=1, b=−3, c=−4
3Work out the discriminantD =(−3)2−4⁢(1)⁢(−4) =9+16 =25
4Put −b, D and 2⁢a into the formulax =(3±25)⁢/2
5Simplify each sign separatelyx =(3+5)⁢/2 =4 or x =(3−5)⁢/2 =−1
6Check in the original equation16 =12+4 and 1 =−3+4

Which method to use

Three methods solve a quadratic. Each is best at something.

Factor when the discriminant is a perfect square and the numbers are small. x2−3⁢x−4 =(x−4)⁢(x+1) is quicker than the formula.

Complete the square when you also want the vertex of the parabola, since the same steps give its vertex form. It is also the natural move when b is even and a is 1.

Use the formula when the others are awkward. It never fails, and it is the safe choice when the discriminant is not a perfect square.

Where it breaks

Where it breaks

The formula needs a≠0. With a=0, the equation 0x2+3⁢x−6=0 is linear, and the formula would divide by 2⁢a=0. Solve it directly instead, x=2.

The formula reads a, b and c from standard form only. In x2=3⁢x+4 the coefficients are not b=3 and c=4. Move every term to one side first, so b=−3 and c=−4.

A negative discriminant means no real solution, not no solution. x2+2⁢x+5=0 has D=4−20=−16. Its solutions are the complex numbers −1+2⁢i and −1−2⁢i, and its parabola never meets the x-axis.

The formula is for degree 2. x3−3⁢x+1=0 is a cubic, and no a, b and c turn it into a quadratic.

x2=3⁢x+4⟹x2−3⁢x−4=0⟹b=−3, c=−4
x2=3⁢x+4x2−3⁢x−4=0b=−3, c=−4

Check your answer

Check your answer

The formula’s answers can be tested against the equation they came from.

Substitute each solution into the original equation. With exact values both sides match exactly. With rounded values they match to about the digits you kept, and that small remainder is rounding, not an error.

Add and multiply the two solutions. Their sum is always −b⁢/⁢a, and their product is always c⁢/⁢a. For 2x2+3⁢x−1=0 the solutions (−3±17)⁢/4 add to −3⁢/2 and multiply to (9−17)⁢/16=−1⁢/2. Those are −b⁢/⁢a and c⁢/⁢a.

Graph y=ax2+b⁢x+c. The real solutions are its x-intercepts, so the graph shows how many there are and roughly where.

To have Chalk check the work, put the equation on the first row of a Math box and x=(−b±D)⁢/⁢(2⁢a), with numbers in place of the letters, on the row below. The Checker reads the ± as both solutions and marks the row ✓ “Same solutions.” Rounded values joined by “or” on a later row read ✓ too. Work the discriminant in a box of its own, D=32−4⁢(2)⁢(−1) and then D=17. With a negative discriminant, the row with the negative number under the root, such as x=(−2±−16)⁢/2 for x2+2⁢x+5=0, reads ✓. The rows x=(−2±4⁢i)⁢/2 and x=−1±2⁢i read ✓ as well, and a slip such as x=−1±4⁢i reads ✗.

Without solving, can 3x2−7⁢x−11=0 have no real solution?

No. When a and c have opposite signs, −4⁢a⁢c is positive, so D=b2−4⁢a⁢c is positive whatever b is. Here D=49+132=181, and there are two real solutions. The graph agrees. It opens upward and sits below the axis at x=0, where its height is −11, so it must cross twice. A negative D needs a and c of the same sign.

Sums, products and equations that hide a quadratic

The sum and product check is a theorem. If r and s are the solutions of ax2+b⁢x+c=0, then ax2+b⁢x+c =a⁢(x−r)⁢(x−s). Expanding the right side gives a x2−a⁢(r+s)⁢x+a r⁢s. Matching coefficients gives r+s=−b⁢/⁢a and r⁢s=c⁢/⁢a.

Some equations of higher degree are quadratics in disguise. x4−5x2+4=0 is u2−5⁢u+4=0 with u=x2. That gives u=1 or u=4, so x=±1 or x=±2.

On a computer, the formula can lose accuracy when b2 is much larger than 4⁢a⁢c. Then −b and D nearly cancel for one of the signs. Programs find the other root first and use the product r⁢s=c⁢/⁢a for the small one.

ax2+b⁢x+c=a⁢(x−r)⁢(x−s)⟹r+s=−ba,  r⁢s=ca
ax2+b⁢x+c=a⁢(x−r)⁢(x−s)r+s=−ba,r⁢s=ca

Common mistakes

  • Using the formula before the equation is in standard form. In x2=3⁢x+4, move every term to one side first, so b=−3 and c=−4, not 3 and 4.
  • Squaring a negative b incorrectly. With b=−3, b2 is (−3)2=9, not −9, because the square of a negative number is positive.
  • Dividing only the square root by 2⁢a. The whole numerator −b±b2−4⁢a⁢c is over 2⁢a, so (4±20)⁢/2 is 2±5, not 4±5.
  • Writing only the + solution. The ± gives two values, (−3+17)⁢/4 and (−3−17)⁢/4, and both solve 2x2+3⁢x−1=0.
  • Calling a negative discriminant “no solution”. It means no real solution. The equation still has two complex solutions, such as −1±2⁢i for x2+2⁢x+5=0.
  • Rounding the square root before dividing. Round 17 to 4 and you get (−3+4)⁢/4=0.25 instead of 0.281. Keep the exact value until the last step.

Key terms

Quadratic formula
The solutions of ax2+b⁢x+c=0 with a≠0: x=(−b±b2−4⁢a⁢c)⁢/⁢(2⁢a). It comes from completing the square and works for every quadratic, including those that do not factor over the integers.
Discriminant
The quantity b2−4⁢a⁢c under the root in the quadratic formula. A positive value gives two real solutions, zero gives one repeated real solution, and a negative value gives no real solutions (two complex ones).
Completing the square
Rewriting x2+b⁢x as (x+b⁢/2)2−(b⁢/2)2 by adding and subtracting (b⁢/2)2. It turns a quadratic equation into a square equal to a constant, and a quadratic function into vertex form.
x-intercept
A point where a graph crosses or touches the x-axis, so its y-value is 0. For y=f⁡(x), its x-value is a zero (root) of f.
Zero-product property
If a product equals zero, at least one of its factors is zero. That is why you move everything to one side, leaving 0, before factoring to solve.
Complex number
A number a+b⁢i, where a and b are real and i2=−1. It can be plotted as the point (a,b) in a plane. The real numbers are the complex numbers with b=0.

Work through an example

Solve 2x2+3⁢x−1=0. Give the exact solutions and their values to three decimal places.

Solve a quadratic with the quadratic formula →

Solve a quadratic by completing the square →

Count real solutions with the discriminant →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Check the solution in Math See the x-intercepts in Graph Study the 6 key terms Open worked example on a board Quadratic formula in Math Reference

Your existing work stays on this device. Examples open as editable copies.