Sub topic 1
Writing a Quadratic in Standard Form
The quadratic formula takes three numbers as input: a, b and c. Before you can use it, you have to read those numbers correctly from the equation in front of you. Most wrong answers come from this first step, not from the formula itself. This chapter covers how to get any quadratic equation into standard form and read a, b and c from it without sign mistakes.
Prerequisites
This chapter assumes you can already do the following:
- Solve linear equations, including moving terms from one side to the other.
- Expand products such as (x + 3)(x − 1) and distribute a number over a bracket.
- Simplify square roots and other radicals.
- Plot points and read a graph on the coordinate plane. This matters in later chapters, not in this one.
You do not need to know how to solve a quadratic yet. That comes later in the tutorial.
What standard form is
A quadratic equation in one variable is in standard form when it looks like this:
ax² + bx + c = 0
The conditions are:
- The right-hand side is exactly 0.
- The left-hand side is arranged by descending powers of x: the x² term, then the x term, then the constant.
- a, b and c are real numbers (for now), and a ≠ 0.
The numbers have names. a is the leading coefficient (it multiplies x²). b is the linear coefficient. c is the constant term.
The condition a ≠ 0 is what makes the equation quadratic. If a = 0, the x² term disappears and you have a linear equation bx + c = 0, which has a single solution (when b ≠ 0) and needs no quadratic formula. The b and c coefficients are allowed to be zero.
Why the form matters
The quadratic formula, which you will derive in a later chapter, is written entirely in terms of a, b and c:
x = (−b ± √(b² − 4ac)) / (2a)
The formula only gives correct answers if a, b and c are the coefficients of the equation arranged with 0 on the right. If the equation is x² − 4x = 5 and you read c as 5, every answer will be wrong. The constant is −5 once the 5 moves to the left.
The discriminant b² − 4ac, which tells you how many real roots exist, has the same dependence. A sign error in c changes the discriminant, so it can change your conclusion about how many solutions exist.
The procedure
Follow the same steps every time:
- Expand any products and powers of brackets, such as x(x + 4) or (x − 2)².
- Clear fractions by multiplying both sides by a common denominator, if you want integer coefficients.
- Move every term to one side so the other side is 0.
- Combine like terms.
- Order the terms by descending power.
- Read a, b and c, including their signs. A missing term has coefficient 0.
You can move the terms to either side. Moving them so that a ends up positive is a convenient habit, because it makes the later arithmetic easier. The equation 5 − x² = 3x can become x² + 3x − 5 = 0 (moving the left side's terms to the right), which has a = 1, b = 3, c = −5. If you instead moved everything to the left, you would get −x² − 3x + 5 = 0, with a = −1, b = −3, c = 5. Both are valid, and both give the same roots, because multiplying an equation by −1 does not change its solutions.
Worked examples
The table shows five equations, the standard form of each, and the coefficients.
| Original equation | Standard form | a | b | c |
|---|---|---|---|---|
| 2x² = 3x − 7 | 2x² − 3x + 7 = 0 | 2 | −3 | 7 |
| x(x + 4) = 5 | x² + 4x − 5 = 0 | 1 | 4 | −5 |
| (x − 2)² = 9 | x² − 4x − 5 = 0 | 1 | −4 | −5 |
| 4x² = 25 | 4x² − 25 = 0 | 4 | 0 | −25 |
| x² + 6x = 0 | x² + 6x = 0 | 1 | 6 | 0 |
Take the third row in detail. Expanding (x − 2)² gives x² − 4x + 4, so the equation is x² − 4x + 4 = 9. Subtracting 9 from both sides gives x² − 4x − 5 = 0. The constant is 4 − 9 = −5. Note that you cannot read the coefficients straight from (x − 2)² = 9. The expansion and the move both change the constant.
A second example shows terms cancelling. Start with x² + 2x − 3 = 2x + 5. Subtract 2x and 5 from both sides:
x² + 2x − 3 − 2x − 5 = 0, which simplifies to x² − 8 = 0.
Here a = 1, b = 0, c = −8. The x terms cancelled, so b is zero. This is a legitimate quadratic.
Edge cases
Missing terms
If the x term is missing, b = 0. If the constant is missing, c = 0. Write them out explicitly as 0 when you substitute into the formula, so you do not drop a term or shift a number into the wrong slot. For 4x² = 25, the standard form is 4x² + 0x − 25 = 0.
Fractions and decimals
Fractions are allowed as coefficients, but they invite arithmetic slips. Multiply through by the least common denominator first. For x²/2 − x/3 = 1, multiply every term by 6:
3x² − 2x = 6, so 3x² − 2x − 6 = 0, with a = 3, b = −2, c = −6.
You must multiply every term, including the one on the right. Multiplying both sides by the same nonzero number does not change the roots.
A common factor
Standard form is not unique. 2x² + 6x − 8 = 0 and x² + 3x − 4 = 0 have the same roots, because the first is the second multiplied by 2. Dividing by a common factor makes the numbers smaller, so it is worth doing when it is easy. The formula works either way.
Factored products
If the equation is 2(x − 1)(x + 4) = 0, expand first: (x − 1)(x + 4) = x² + 3x − 4, and then 2 times that gives 2x² + 6x − 8 = 0. Here a = 2, b = 6, c = −8. You can also solve this one at sight, since a product is zero only if a factor is zero. Standard form is still the right route when the factors are not obvious.
Other variable names and equations that only look quadratic
The variable does not have to be x. In 3t² − 12 = t, the standard form is 3t² − t − 12 = 0, so a = 3, b = −1, c = −12. Notice the coefficient of t is −1, not 1 and not missing.
An equation with a variable in a denominator, such as (x + 1)/(x − 1) = x, can become a quadratic after you multiply by the denominator. Multiplying out gives x + 1 = x² − x, so x² − 2x − 1 = 0. Whenever you multiply by an expression containing the variable, check the final answers against the original equation. A root that makes the denominator zero is not a valid solution.
When a is zero
Some equations include a parameter. For (k − 3)x² + 5x − 2 = 0 to be quadratic, you need k − 3 ≠ 0, so k ≠ 3. At k = 3 the equation becomes the linear equation 5x − 2 = 0.
Doing it in code
You can mechanize the procedure. The function below takes the two sides of an equation as dictionaries that map a power of x to its coefficient. It subtracts the right side from the left and returns a, b and c.
def to_standard_form(left, right):
"""Return (a, b, c) for left = right, moved so the right side is 0.
Each side is a dict mapping a power of x (0, 1 or 2) to its coefficient.
"""
coeffs = {2: 0, 1: 0, 0: 0}
for side, sign in ((left, 1), (right, -1)):
for power, coef in side.items():
if power not in coeffs:
raise ValueError(f"power {power} is not allowed in a quadratic")
coeffs[power] += sign * coef
a, b, c = coeffs[2], coeffs[1], coeffs[0]
if a == 0:
raise ValueError("a is zero, so the equation is not quadratic")
return a, b, c
# 3x^2 - 5x = 2x + 4
print(to_standard_form({2: 3, 1: -5}, {1: 2, 0: 4})) # (3, -7, -4)
# x^2 + 2x - 3 = 2x + 5
print(to_standard_form({2: 1, 1: 2, 0: -3}, {1: 2, 0: 5})) # (1, 0, -8)The first call confirms the hand calculation: 3x² − 5x − 2x − 4 = 3x² − 7x − 4. The second shows that b comes out as 0 when the x terms cancel. The function does not expand brackets for you. That step is still yours, done before you build the dictionaries.
Common errors
- Reading coefficients before moving terms. In x² − 4x = 5, the constant is −5, not 5.
- Dropping the sign. The coefficient belongs to the term including its sign. In x² − 4x + 7 = 0, b is −4.
- Treating a missing term as absent from the formula. Use 0 for it.
- Forgetting that x alone has coefficient 1. In x² + x − 6 = 0, b = 1. A term such as −x has coefficient −1.
- Not multiplying every term when clearing fractions. The right-hand side needs the same factor as the left.
- Expanding (x − 2)² as x² − 4. The correct expansion is x² − 4x + 4. The middle term is the one people lose.
- Leaving the equation with a nonzero right-hand side. The standard form requires 0 there.
Exercises
Exercise
Write (2x − 1)(x + 3) = x² + 4 in standard form and give a, b and c.
Show answer
Expand the left side: (2x − 1)(x + 3) = 2x² + 6x − x − 3 = 2x² + 5x − 3. Subtract x² + 4 from both sides: x² + 5x − 7 = 0. So a = 1, b = 5, c = −7.
Exercise
Write x²/4 + x/2 = 3/4 in standard form with integer coefficients, then state a, b and c.
Show answer
Multiply every term by 4: x² + 2x = 3. Subtract 3 from both sides: x² + 2x − 3 = 0. So a = 1, b = 2, c = −3.
Exercise
For which values of k is (k − 3)x² + 5x − 2 = 0 a quadratic equation, and what does it become at the excluded value?
Show answer
It is quadratic when k − 3 ≠ 0, that is, when k ≠ 3. At k = 3 the x² term vanishes and the equation becomes the linear equation 5x − 2 = 0.