The quadratic formula x=(−b±√b2−4ac)/(2a) solves any equation ax2+bx+c=0 with a=0. The discriminant b2−4ac tells you, before you solve, whether there are two, one or no real solutions.
Guessing finds x=2, since 4+12=16. Is there another? Picture x2+6x 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 5or −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+6x=10, where (x+3)2=19 and x=−3±√19.
x2+6x+9=25⟹(x+3)2=25⟹x=2 or x=−8
x2+6x+9=25(x+3)2=25x=2 or x=−8
The pieces of x2+6x, and the corner that completes the square
x
+3
x
x2
3x
+3
3x
9, the missing corner
The rule
The quadratic formula
A quadratic equation in standard form is ax2+bx+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+bx+c=0 (a=0)⟹x=2a−b±√b2−4ac
ax2+bx+c=0 (a=0)x=2a−b±√b2−4ac
The discriminant counts the real solutions
The quantity under the root, D=b2−4ac, is the discriminant. A positive discriminant gives two different real solutions. Zero gives one repeated solution, x=−b/(2a). 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−4ac
What the discriminant tells you
Discriminant
Real solutions
Graph of y=ax2+bx+c
D>0
Two
Crosses the x-axis twice
D=0
One (repeated)
Touches the x-axis at its vertex
D<0
None (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/(2a), so the missing corner is (b/2a)2. Add it to both sides, and the left side becomes a perfect square.
The right side, over a common denominator, is (b2−4ac)/(4a2). Take both square roots, then subtract b/(2a). 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.
The square root of 4a2 is 2∣a∣, but the ± already includes both signs, so writing 2a gives the same pair of solutions.
The method
The method in six steps
The table solves x2=3x+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=2√5, and divide the whole numerator by 2a. Round only when a decimal is asked for, and round each solution separately.
x=2(1)−(−3)±√25=23±5
Solving x2=3x+4 with the formula
Step
What to do
For x2=3x+4
1
Move every term to one side
x2−3x−4=0
2
Read a,b and c with their signs
a=1,b=−3,c=−4
3
Work out the discriminant
D=(−3)2−4(1)(−4)=9+16=25
4
Put −b,D and 2a into the formula
x=(3±√25)/2
5
Simplify each sign separately
x=(3+5)/2=4 or x=(3−5)/2=−1
6
Check in the original equation
16=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−3x−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 ais 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+3x−6=0 is linear, and the formula would divide by 2a=0. Solve it directly instead, x=2.
The formula reads a,b and c from standard form only. In x2=3x+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+2x+5=0 has D=4−20=−16. Its solutions are the complex numbers −1+2iand −1−2i, and its parabola never meets the x-axis.
The formula is for degree 2.x3−3x+1=0 is a cubic, and no a,b and c turn it into a quadratic.
x2=3x+4⟹x2−3x−4=0⟹b=−3, c=−4
x2=3x+4x2−3x−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+3x−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+bx+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)/(2a), 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+2x+5=0, reads ✓. The rows x=(−2±4i)/2 and x=−1±2i read ✓ as well, and a slip such as x=−1±4i reads ✗.
Without solving, can 3x2−7x−11=0 have no real solution?
No. When a and c have opposite signs, −4ac is positive, so D=b2−4ac 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+bx+c=0, then ax2+bx+c=a(x−r)(x−s). Expanding the right side gives ax2−a(r+s)x+ars. Matching coefficients gives r+s=−b/a and rs=c/a.
Some equations of higher degree are quadratics in disguise. x4−5x2+4=0 is u2−5u+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 4ac.Then −b and √D nearly cancel for one of the signs. Programs find the other root first and use the product rs=c/a for the small one.
ax2+bx+c=a(x−r)(x−s)⟹r+s=−ab, rs=ac
ax2+bx+c=a(x−r)(x−s)r+s=−ab,rs=ac
Common mistakes
Using the formula before the equation is in standard form. In x2=3x+4, move every term to one side first, so b=−3 and c=−4, not 3and 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 2a. The whole numerator −b±√b2−4ac is over 2a, 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+3x−1=0.
Calling a negative discriminant “no solution”. It means no real solution. The equation still has two complex solutions, such as −1±2i for x2+2x+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+bx+c=0 with a=0:x=(−b±√b2−4ac)/(2a). It comes from completing the square and works for every quadratic, including those that do not factor over the integers.
Discriminant
The quantity b2−4ac 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+bx 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+bi, 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+3x−1=0. Give the exact solutions and their values to three decimal places.