Skip to content
Mathematics

Quadratic Equations

Learn what makes an equation quadratic, how its roots appear on a graph, and when to factor, complete the square, or use the quadratic formula.

What is a quadratic equation?

A quadratic equation has a highest power of two. Bring every term to one side to write it in standard form. Its coefficients are real numbers, and the leading coefficient must be nonzero.

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

A root is a value of xx that makes the left side zero. On the graph of y=ax2+bx+cy=ax^2+bx+c, real roots are the horizontal intercepts. The graph is a parabola, opening upward when a>0a>0 and downward when a<0a<0.

See where the roots come from

Change the coefficients or choose an example. The view adjusts to keep the vertex and real roots visible.

y=x2−3x+2y=x^2-3x+2
The horizontal axis is xx and the vertical axis is yy. Filled dots mark real roots; the outlined dot marks the vertex. Values are rounded to three decimal places.

A positive value opens upward; a negative value opens downward. Zero is excluded so the equation stays quadratic.

b=−3b=-3
c=2c=2

D=b2−4ac=1D=b^2-4ac=1

Two distinct real roots: the curve crosses the horizontal axis twice.

x=1or2x=1\quad\text{or}\quad2

Vertex: (1.5,−0.25)(1.5,-0.25).

Count the real roots first

The discriminant is the quantity inside the square root of the quadratic formula. Its sign tells you the kind of roots to expect.

D=b2−4acD=b^2-4ac

D>0D>0

Two real roots

The parabola crosses the horizontal axis twice.

D=0D=0

One repeated real root

The vertex touches the horizontal axis.

D<0D<0

No real roots

The parabola misses the horizontal axis. There are two complex conjugate roots.

When the discriminant is negative, the square root uses the imaginary unit ii, defined by i2=−1i^2=-1. For example, x2+1=0x^2+1=0 has the roots x=±ix=\pm i.

Three ways to solve

Factor when the factors are easy to see

For a leading coefficient of one, look for two numbers whose sum is bb and whose product is cc. If a product is zero, at least one of its factors must be zero.

x2−5x+6=(x−2)(x−3)=0x^2-5x+6=(x-2)(x-3)=0
x−2=0  or  x−3=0⟹x=2  or  x=3x-2=0\;\text{or}\;x-3=0\quad\Longrightarrow\quad x=2\;\text{or}\;x=3

This is often the quickest method when the polynomial has simple integer factors.

Complete the square to expose the structure

Make the leading coefficient one, move the constant, and add the square of half the linear coefficient to both sides. The left side becomes a perfect square.

x2+6x+5=0⟹x2+6x=−5x^2+6x+5=0\quad\Longrightarrow\quad x^2+6x=-5
x2+6x+9=4⟹(x+3)2=4x^2+6x+9=4\quad\Longrightarrow\quad(x+3)^2=4
x+3=±2⟹x=−1  or  x=−5x+3=\pm2\quad\Longrightarrow\quad x=-1\;\text{or}\;x=-5

Keep both square-root signs. This method also reveals the vertex form y=a(x−h)2+ky=a(x-h)^2+k, whose vertex is (h,k)(h,k).

Use the quadratic formula for any quadratic

Completing the square on the general equation gives a formula that works even when the factors are hard to spot. Include each coefficient’s sign when you substitute.

x=−b±b2−4ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

For 2x2+3x−2=02x^2+3x-2=0, substitute a=2,b=3,c=−2a=2,\quad b=3,\quad c=-2:

x=−3±32−4(2)(−2)4=−3±54x=\frac{-3\pm\sqrt{3^2-4(2)(-2)}}{4}=\frac{-3\pm5}{4}
x=12  or  x=−2x=\frac12\;\text{or}\;x=-2

Substitute each root into the original equation to check it. Keep radicals exact until you need a decimal approximation.

Try it yourself

Solve each equation on paper, then reveal the explanation.

  1. 1. Factor the equation and find both roots.

    x2+x−6=0x^2+x-6=0
    Show solution
    (x+3)(x−2)=0⟹x=−3  or  x=2(x+3)(x-2)=0\quad\Longrightarrow\quad x=-3\;\text{or}\;x=2

    The two numbers add to the linear coefficient and multiply to the constant term. Set each factor equal to zero.

  2. 2. Decide how many real roots exist before solving.

    2x2−4x+2=02x^2-4x+2=0
    Show solution
    D=(−4)2−4(2)(2)=0,x=44=1D=(-4)^2-4(2)(2)=0,\qquad x=\frac{4}{4}=1

    A zero discriminant gives one repeated real root. Factoring gives the same result.

  3. 3. Use the quadratic formula to find the exact roots.

    x2+2x−1=0x^2+2x-1=0
    Show solution
    D=22−4(1)(−1)=8,x=−2±82=−1±2D=2^2-4(1)(-1)=8,\qquad x=\frac{-2\pm\sqrt{8}}{2}=-1\pm\sqrt{2}

    The discriminant is positive, so both roots are real. Simplify the square root to keep the answer exact.