TExcelTAD
Home › Algebra › Defining Quadratic Equations

Defining Quadratic Equations

A quadratic equation is an equation of degree 2: the variable appears squared, and no higher power appears. Quadratics describe anything that speeds up or slows down at a steady rate, from a thrown ball to the area of a growing square. This lesson defines the standard form, explains what a solution (a root) is, and gives an overview of the five ways to solve one, each covered in its own lesson.

Standard form

A quadratic equation in standard form is

ax2+bx+c=0,a≠0ax^2 + bx + c = 0, \qquad a \ne 0

aa is the coefficient of the quadratic term, bb of the linear term, and cc is the constant term. If aa were 0, the x2x^2 term would vanish and the equation would be linear, which is why a≠0a \ne 0 is part of the definition. bb and cc may be 0.

Equation Standard form aa bb cc
x2−5x+6=0x^2 - 5x + 6 = 0 already 1 −5 6
3x2=123x^2 = 12 3x2−12=03x^2 - 12 = 0 3 0 −12
x2=7xx^2 = 7x x2−7x=0x^2 - 7x = 0 1 −7 0
(x+2)(x−3)=4(x + 2)(x - 3) = 4 x2−x−10=0x^2 - x - 10 = 0 1 −1 −10
5−2x2=x5 - 2x^2 = x −2x2−x+5=0-2x^2 - x + 5 = 0, or 2x2+x−5=02x^2 + x - 5 = 0 2 1 −5

To get standard form, expand any products (Multiplying Polynomials), move every term to one side, and combine like terms. Multiplying the whole equation by −1 to make aa positive is allowed and often convenient.

Note: x3−x2=0x^3 - x^2 = 0 is not quadratic (degree 3), and 1x2+x=2\frac{1}{x^2} + x = 2 is not a polynomial equation at all. An equation is quadratic only if, in standard form, the highest power is exactly 2.

Roots

A solution or root of ax2+bx+c=0ax^2 + bx + c = 0 is a number that makes the equation true. To check a candidate, substitute it:

x2−5x+6=0x=2:4−10+6=0 ✓x=3:9−15+6=0 ✓x=1:1−5+6=2 ×\begin{aligned} &x^2 - 5x + 6 = 0 \\ x = 2{:}\quad &4 - 10 + 6 = 0\ \checkmark \\ x = 3{:}\quad &9 - 15 + 6 = 0\ \checkmark \\ x = 1{:}\quad &1 - 5 + 6 = 2\ \boldsymbol{\times} \end{aligned}

A quadratic has at most two roots. Graphically, the roots are where the parabola y=ax2+bx+cy = ax^2 + bx + c crosses the x-axis. A parabola can cross it twice, touch it once, or miss it entirely, so there are three cases: two real roots, one repeated root, or no real roots (the roots are then complex numbers, see The Discriminant and Complex Roots).

python · try it yourself
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 5, 200)
plt.figure(figsize=(6, 4))
for (a, b, c), label in [((1, -5, 6), "x² − 5x + 6: two roots"),
                         ((1, -4, 4), "x² − 4x + 4: one root"),
                         ((1, -3, 4), "x² − 3x + 4: no real root")]:
    plt.plot(x, a * x**2 + b * x + c, label=label)
plt.axhline(0, color="black", linewidth=0.8)
plt.ylim(-2, 8)
plt.legend()
plt.title("Roots are where the parabola meets the x-axis")
plt.show()
print("plotted three parabolas: two, one and zero x-intercepts")
plotted three parabolas: two, one and zero x-intercepts

Five ways to solve

Method Best when Lesson
factoring the trinomial factors nicely over the integers Solving by Factoring
square root method there is no xx term (ax2+c=0ax^2 + c = 0) or it is (x−h)2=k(x - h)^2 = k The Square Root Method
completing the square you want the vertex form, or to derive the formula Completing the Square
quadratic formula always works The Quadratic Formula
graphing estimating, or seeing the shape Solving Quadratics by Graphing

SymPy can solve any quadratic exactly, which is handy for checking:

python · try it yourself
import sympy as sp

x = sp.symbols("x")
print(sp.expand((x + 2)*(x - 3) - 4))                 # standard form of (x+2)(x−3) = 4
print(sp.solve(x**2 - 5*x + 6, x))
print(sp.solve(sp.Eq((x + 2)*(x - 3), 4), x))
print(sp.solve(x**2 - 3*x + 4, x))
x**2 - x - 10
[2, 3]
[1/2 - sqrt(41)/2, 1/2 + sqrt(41)/2]
[3/2 - sqrt(7)*I/2, 3/2 + sqrt(7)*I/2]

SymPy writes the imaginary unit as I. The last equation has no real roots, so its roots are complex.

In software: when does it hit the ground?

The height of an object thrown straight up, ignoring air resistance, is

h(t)=h0+v0t−12gt2h(t) = h_0 + v_0 t - \tfrac{1}{2}gt^2

with starting height h0h_0, launch speed v0v_0 and g≈9.81 m/s2g \approx 9.81\ \text{m/s}^2. Asking "when is the height 0?" gives a quadratic equation in tt. A game uses exactly this to predict where a grenade lands or when a jumping character touches the floor (see Collision Timing with Quadratics and game physics integration).

python · try it yourself
import sympy as sp

t = sp.symbols("t")
h0, v0, g = 2, 12, sp.Rational(981, 100)      # metres, m/s, m/s²
h = h0 + v0*t - g*t**2/2
print("standard form:", sp.expand(h), "= 0")
roots = sp.solve(h, t)
for r in roots:
    print("t =", round(float(r), 3), "s")
print("lands at t ≈", round(float(max(roots)), 3), "s (the negative root is before the throw)")
standard form: -981*t**2/200 + 12*t + 2 = 0
t = -0.157 s
t = 2.603 s
lands at t ≈ 2.603 s (the negative root is before the throw)

Both roots are valid algebra, but only the positive one is physically meaningful. Choosing the right root is a normal part of applying quadratics.

Exercises

Exercise 1: Is it quadratic?

Which are quadratic equations? (a) 4x2−1=04x^2 - 1 = 0 (b) x(x+3)=x2+5x(x + 3) = x^2 + 5 (c) 2x−x2=72x - x^2 = 7 (d) x3+x2=x3+1x^3 + x^2 = x^3 + 1

Answer

(a), (c) and (d). (b) is linear.

Solution
(b)x2+3x=x2+5→3x−5=0the x2 terms cancel: linear(c)−x2+2x−7=0quadratic(d)x3 cancels: x2−1=0quadratic\begin{aligned} &\text{(b)}\quad x^2 + 3x = x^2 + 5 \quad\to\quad 3x - 5 = 0 && \text{the } x^2 \text{ terms cancel: linear} \\ &\text{(c)}\quad -x^2 + 2x - 7 = 0 && \text{quadratic} \\ &\text{(d)}\quad x^3 \text{ cancels: } x^2 - 1 = 0 && \text{quadratic} \end{aligned}

Exercise 2: Standard form

Write (2x−1)2=3x+4(2x - 1)^2 = 3x + 4 in standard form and give aa, bb, cc.

Answer

4x2−7x−3=04x^2 - 7x - 3 = 0: a=4a = 4, b=−7b = -7, c=−3c = -3.

Solution
4x2−4x+1=3x+44x2−7x−3=0\begin{aligned} 4x^2 - 4x + 1 &= 3x + 4 \\ 4x^2 - 7x - 3 &= 0 \end{aligned}

Exercise 3: Check roots

Which of −2-2, 13\frac{1}{3} and 33 are roots of 3x2+5x−2=03x^2 + 5x - 2 = 0?

Answer

−2-2 and 13\frac{1}{3}.

Solution
python · try it yourself
from fractions import Fraction as F

for x in [F(-2), F(1, 3), F(3)]:
    print(x, 3*x**2 + 5*x - 2)
-2 0
1/3 0
3 40

Exercise 4: Write the equation

A rectangle is 3 m longer than it is wide and has area 40 m240\ \text{m}^2. Write a quadratic equation for the width ww in standard form and find ww by testing whole numbers.

Answer

w2+3w−40=0w^2 + 3w - 40 = 0; w=5w = 5 m (the other root, −8, is not a length).

Solution
w(w+3)=40→w2+3w−40=0w=5: 25+15−40=0 ✓(and (w+8)(w−5)=0 gives the second root −8)\begin{aligned} &w(w + 3) = 40 \quad\to\quad w^2 + 3w - 40 = 0 \\ &w = 5{:}\ 25 + 15 - 40 = 0\ \checkmark && \text{(and } (w + 8)(w - 5) = 0 \text{ gives the second root } -8\text{)} \end{aligned}

Test yourself

In 7−3x2=2x7 - 3x^2 = 2x, written as ax2+bx+c=0ax^2 + bx + c = 0 with a>0a > 0, what are a,b,ca, b, c?

  1. 3, 2, −7
  2. −3, 2, 7
  3. 3, −2, 7
  4. 7, −3, 2

How many real roots can a quadratic equation have?

  1. Exactly 2
  2. 0, 1 or 2
  3. Any number
  4. At least 1

Why must a≠0a \ne 0 in ax2+bx+c=0ax^2 + bx + c = 0?

  1. Otherwise there are no roots
  2. Otherwise the roots are complex
  3. Otherwise the equation is linear, not quadratic
  4. Because the formula divides by cc