p is the number in front of x and q is the number standing on its own. The formula only applies once the
equation is written as x² + px + q = 0 — a single x² at the front, everything gathered on the left, and a
zero on the right.
The ± sign means the calculation is done twice, once with plus and once with minus. That is why a
quadratic equation normally has two solutions.
Getting the equation into that shape
If it does not start there, three things may need doing, in this order:
- Gather everything on the left. x² + 3x = 10 becomes x² + 3x − 10 = 0.
- Divide by the number in front of x². 2x² + 6x − 8 = 0 becomes x² + 3x − 4 = 0. Every term is
divided, including the zero — which stays zero.
- Read off p and q with their signs. In x² + 3x − 4 = 0, p = 3 and q = −4.
Step two is the difference from the
quadratic formula, which handles the
coefficient in front of x² without you dividing it away.
How many roots are there?
Everything is decided by the number under the root, (p/2)² − q, known as the
discriminant:
| Under the root |
Number of roots |
| Positive |
Two distinct |
| Zero |
One (a double root) |
| Negative |
No real root |
A negative value there does not mean you made a mistake. It means the parabola y = x² + px + q lies
entirely above the x-axis and never crosses it.
Worked examples
Example 1. Solve x² − 2x − 3 = 0.
Here p = −2 and q = −3.
x = −(−2)/2 ± √((−2/2)² − (−3)) = 1 ± √(1 + 3) = 1 ± 2
The roots are x = 3 and x = −1.
Example 2. Solve 2x² + 10x + 8 = 0.
Divide by 2 first: x² + 5x + 4 = 0, so p = 5 and q = 4.
x = −5/2 ± √((5/2)² − 4) = −2.5 ± √(6.25 − 4) = −2.5 ± 1.5
The roots are x = −1 and x = −4.
Always check. Put the roots back into the original equation. 2 · (−1)² + 10 · (−1) + 8 = 0. It holds.
Common mistakes
- Losing the minus in front of p. The formula starts at −p/2, not p/2. When p is negative that first
term comes out positive.
- Not dividing by the number in front of x². 3x² + 6x − 9 = 0 does not have p = 6. Divide first, then
read off.
- Squaring p instead of half of p. Under the root it is (p/2)², not p².
- Taking the root term by term. √(1 + 3) is √4 = 2, not 1 + √3.
- Stopping at one root. Plus and minus give two answers, and unless the question says otherwise both
of them belong in your solution.
Common questions
Why does the card give one answer when the formula has ±?
The formula is stated with ±, as in the textbook, but an answer is one number. The card works out the
plus branch and prints the other root as a note directly under the answer, so both are there.
What if a term is missing?
Set it to zero. x² − 9 = 0 has p = 0, and x² + 4x = 0 has q = 0. Both can be solved with the pq
formula, although the first is quicker with the
difference of squares and the second by
taking out a factor of x.
Where does the formula come from?
From completing the square. Write
x² + px as (x + p/2)² − (p/2)², and the equation becomes (x + p/2)² = (p/2)² − q, which only needs a
square root on both sides.