Skip to content
EN - Language: English
MathematicsHigh school

Quadratic functions - from the graph to the formula, step by step

· 16 min read

In short

The graph of every quadratic function is a parabola - the graph of y = x², moved and stretched. The vertex form a(x − h)² + k shows the vertex (h, k), the factorised form a(x − x₁)(x − x₂) shows the roots, and the expanded form ax² + bx + c shows where the graph crosses the y axis. To find the formula from a graph, read the vertex or the roots and work out a from one more point.

Words to know

Parabola
The curve that is the graph of a quadratic function. It has one line of symmetry, which goes through its vertex.
Vertex (turning point)
The lowest point of a parabola that opens upwards, or the highest point of one that opens downwards.
Vertex form
f(x) = a(x − h)² + k, the vertex being (h, k). In the UK it is also called the completed-square form.
Roots (zeros)
The values of x where f(x) = 0 - where the graph crosses or touches the x axis.
Discriminant
The number Δ = b² − 4ac. Its sign tells you whether the parabola has two roots, one or none.

What do you think?

How does the graph of y=(x−3)2y = (x - 3)^2 sit compared with the graph of y=x2y = x^2?

The idea: one parabola, moved and stretched

The graph of every quadratic function is a parabola, and every parabola is the graph of y=x2y = x^2 moved and stretched. Three numbers decide how:

  • aa stretches the graph: it opens upwards when a>0a > 0 and downwards when a<0a < 0. The larger ∣a∣|a|, the narrower the parabola,
  • hh moves it to the right (to the left when hh is negative),
  • kk moves it up (down when kk is negative).

The same function can be written in three forms. Each form shows a different point of the graph, so you choose the form that fits what the graph shows you:

  • the vertex form a(x−h)2+ka(x - h)^2 + k shows the vertex (h,k)(h, k),
  • the factorised form a(x−x1)(x−x2)a(x - x_1)(x - x_2) shows the roots x1x_1 and x2x_2,
  • the expanded form ax2+bx+cax^2 + bx + c shows the point (0,c)(0, c), where the graph crosses the y axis.

The number aa is the same in all three forms. To find a formula from a graph, read the vertex or the roots, and then work out aa from one more point.

From the graph to the formula, step by step

Below is a parabola whose formula we do not know yet. Go through the animation with the buttons or the arrow keys. The dashed curve is the graph of y=x2y = x^2.

-11234-22461a = 213(0, 6)V

V = (2, −2) · f(x) = ?

Step 1 of 7
Steps of the animation. Arrow keys move between steps.

Here is the graph of a quadratic function - a parabola. We do not know its formula yet. Start with the point that stands out: the vertex V = (2, −2), the lowest point of the graph.

The trick from step 4 works for every parabola. One step to the right of the vertex, the graph rises by aa. Two steps away it rises by 4a4a, three steps by 9a9a - just like y=x2y = x^2, only aa times taller. Here, two steps from the vertex, the graph is 4⋅2=84 \cdot 2 = 8 higher than the vertex: at x=4x = 4 it reaches −2+8=6-2 + 8 = 6, the same height as at x=0x = 0.

Try it yourself: move and stretch the parabola

Set aa and the moves hh and kk. The readouts give the same function in all three forms. Choose a form, and the picture marks what that form shows: the vertex, the point on the y axis or the roots.

-6-4-2246-55aV
Show on the graph
a = 2
h = 2
k = −2
vertex form
f(x) = 2(x − 2)² − 2
expanded form
f(x) = 2x² − 8x + 6
factorised form
f(x) = 2(x − 1)(x − 3)
vertex V
(2, −2)
discriminant Δ
16

What to notice:

  • hh and kk move the whole parabola, and the vertex is always (h,k)(h, k),
  • the sign of aa turns the parabola upside down, and a larger ∣a∣|a| makes it narrower. With a=0a = 0 the x2x^2 term disappears, and the graph is a straight line,
  • the number cc changes when you move the parabola sideways, even though kk stays the same: c=ah2+kc = ah^2 + k,
  • there are roots only when the vertex is on the x axis or on the other side of it from where the parabola opens: above the axis for a<0a < 0, below it for a>0a > 0.

The definitions

A quadratic function is a function f(x)=ax2+bx+cf(x) = ax^2 + bx + c, where aa, bb and cc are numbers and a≠0a \neq 0. Its graph is a parabola. When a>0a > 0 it opens upwards and the vertex is its lowest point (a minimum). When a<0a < 0 it opens downwards and the vertex is its highest point (a maximum).

The vertex form is f(x)=a(x−h)2+kf(x) = a(x - h)^2 + k. The vertex is (h,k)(h, k), and the line of symmetry is x=hx = h. From the expanded form you get the vertex with the discriminant Δ=b2−4ac\Delta = b^2 - 4ac:

h=−b2ak=−Δ4a\begin{aligned} h &= -\frac{b}{2a} \\ k &= -\frac{\Delta}{4a} \end{aligned}

The roots are the solutions of ax2+bx+c=0ax^2 + bx + c = 0. When Δ>0\Delta > 0 there are two:

x1,2=−b±Δ2ax_{1,2} = \frac{-b \pm \sqrt{\Delta}}{2a}

When Δ=0\Delta = 0 there is one root, x=hx = h: the parabola touches the x axis at its vertex. When Δ<0\Delta < 0 there are no roots. The factorised form f(x)=a(x−x1)(x−x2)f(x) = a(x - x_1)(x - x_2) exists only when Δ≥0\Delta \geq 0 (with x1=x2x_1 = x_2 when Δ=0\Delta = 0). The vertex lies halfway between the roots:

h=x1+x22h = \frac{x_1 + x_2}{2}

For the parabola from the animation, f(x)=2x2−8x+6f(x) = 2x^2 - 8x + 6, these formulas give Δ=64−48=16\Delta = 64 - 48 = 16, then h=84=2h = \frac{8}{4} = 2 and k=−168=−2k = -\frac{16}{8} = -2. The roots are 8−44=1\frac{8 - 4}{4} = 1 and 8+44=3\frac{8 + 4}{4} = 3.

Example 1: from the vertex and one point

A parabola has its vertex at (2,4)(2, 4) and goes through the origin (0,0)(0, 0). Find its formula.

Step 1. Write the vertex form

The vertex gives h=2h = 2 and k=4k = 4, so only aa is unknown.

f(x)=a(x−2)2+4f(x) = a(x - 2)^2 + 4

Step 2. Put in the second point

The graph goes through (0,0)(0, 0), so f(0)=0f(0) = 0.

0=a(0−2)2+40=4a+44a=−4a=−1\begin{aligned} 0 &= a(0 - 2)^2 + 4 \\ 0 &= 4a + 4 \\ 4a &= -4 \\ a &= \boxed{-1} \end{aligned}

Step 3. Write the formula

We put a=−1a = -1 back into the vertex form.

f(x)=−(x−2)2+4f(x) = -(x - 2)^2 + 4

Step 4. Multiply out

We expand the square first, and then multiply each term by −1-1.

f(x)=−(x2−4x+4)+4=−x2+4x−4+4=−x2+4x\begin{aligned} f(x) &= -(x^2 - 4x + 4) + 4 \\ &= -x^2 + 4x - 4 + 4 \\ &= -x^2 + 4x \end{aligned}

Answer

f(x)=−(x−2)2+4=−x2+4xf(x) = -(x - 2)^2 + 4 = -x^2 + 4x. Here a<0a < 0, so the parabola opens downwards and the vertex is its highest point.

Example 2: from the roots and one point

A parabola crosses the x axis at −4-4 and 22, and the y axis at (0,−8)(0, -8). Find its formula in all three forms.

Step 1. Write the factorised form

The roots are −4-4 and 22. The root −4-4 gives the bracket x−(−4)=x+4x - (-4) = x + 4.

f(x)=a(x+4)(x−2)f(x) = a(x + 4)(x - 2)

Step 2. Put in the point on the y axis

The graph goes through (0,−8)(0, -8), so f(0)=−8f(0) = -8.

−8=a(0+4)(0−2)−8=−8aa=1\begin{aligned} -8 &= a(0 + 4)(0 - 2) \\ -8 &= -8a \\ a &= \boxed{1} \end{aligned}

Step 3. Multiply out the brackets

We multiply each term of the first bracket by each term of the second, then collect the xx terms.

f(x)=(x+4)(x−2)=x2−2x+4x−8=x2+2x−8\begin{aligned} f(x) &= (x + 4)(x - 2) \\ &= x^2 - 2x + 4x - 8 \\ &= \boxed{x^2 + 2x - 8} \end{aligned}

Step 4. Find the vertex

The vertex lies halfway between the roots. Its height is the value of the function there.

h=−4+22=−1k=f(−1)=3⋅(−3)=−9\begin{aligned} h &= \frac{-4 + 2}{2} = -1 \\ k &= f(-1) \\ &= 3 \cdot (-3) \\ &= -9 \end{aligned}

Answer

f(x)=(x+4)(x−2)=x2+2x−8=(x+1)2−9f(x) = (x + 4)(x - 2) = x^2 + 2x - 8 = (x + 1)^2 - 9. The vertex is (−1,−9)(-1, -9), and a=1a = 1, so the parabola has the same width as y=x2y = x^2.

Your turn

A parabola has its vertex at (−1,−8)(-1, -8) and goes through the point (2,10)(2, 10). Find its formula in all three forms.

Hintshow

Start from the vertex form f(x)=a(x+1)2−8f(x) = a(x + 1)^2 - 8 - the vertex has h=−1h = -1. Put in the point (2,10)(2, 10) to find aa. For the roots, set the vertex form equal to zero.

Solutiontry it on your own first

Step 1. Write the vertex form

The vertex gives h=−1h = -1 and k=−8k = -8, and x−(−1)=x+1x - (-1) = x + 1.

f(x)=a(x+1)2−8f(x) = a(x + 1)^2 - 8

Step 2. Put in the second point

The graph goes through (2,10)(2, 10), so f(2)=10f(2) = 10.

10=a(2+1)2−810=9a−89a=18a=2\begin{aligned} 10 &= a(2 + 1)^2 - 8 \\ 10 &= 9a - 8 \\ 9a &= 18 \\ a &= \boxed{2} \end{aligned}

Step 3. Multiply out

We expand the square, multiply each term by 22 and collect the numbers.

f(x)=2(x2+2x+1)−8=2x2+4x+2−8=2x2+4x−6\begin{aligned} f(x) &= 2(x^2 + 2x + 1) - 8 \\ &= 2x^2 + 4x + 2 - 8 \\ &= \boxed{2x^2 + 4x - 6} \end{aligned}

Step 4. Find the roots

We set the vertex form equal to zero and get the square on its own.

2(x+1)2−8=0(x+1)2=4\begin{aligned} 2(x + 1)^2 - 8 &= 0 \\ (x + 1)^2 &= 4 \end{aligned}

A number whose square is 44 is 22 or −2-2, so there are two cases.

x+1=2  ⇒  x=1x+1=−2  ⇒  x=−3\begin{aligned} x + 1 = 2 &\;\Rightarrow\; x = 1 \\ x + 1 = -2 &\;\Rightarrow\; x = -3 \end{aligned}

Step 5. Write the factorised form

The roots −3-3 and 11 give the brackets x+3x + 3 and x−1x - 1, and a=2a = 2 stays in front.

f(x)=2(x+3)(x−1)f(x) = 2(x + 3)(x - 1)

Answer

f(x)=2(x+1)2−8=2x2+4x−6=2(x+3)(x−1)f(x) = 2(x + 1)^2 - 8 = 2x^2 + 4x - 6 = 2(x + 3)(x - 1). All three formulas give f(2)=10f(2) = 10.

Common mistakes

  • The wrong sign in the bracket. y=(x+3)2−1y = (x + 3)^2 - 1 has its vertex at (−3,−1)(-3, -1), not at (3,−1)(3, -1). The bracket x+3x + 3 is zero when x=−3x = -3.
  • The vertex without aa. The vertex (2,−2)(2, -2) alone gives y=(x−2)2−2y = (x - 2)^2 - 2, which goes through (0,2)(0, 2). The graph from the animation goes through (0,6)(0, 6). Every value of aa gives another parabola with the same vertex, so you always need one more point.
  • Multiplying out too quickly. (x−2)2(x - 2)^2 is x2−4x+4x^2 - 4x + 4, not x2−4x^2 - 4. And aa multiplies every term in the bracket: 2(x2−4x+4)=2x2−8x+82(x^2 - 4x + 4) = 2x^2 - 8x + 8.
  • A factorised form for every parabola. y=x2+2y = x^2 + 2 has its vertex at (0,2)(0, 2) and opens upwards, so it never meets the x axis: Δ=0−8=−8<0\Delta = 0 - 8 = -8 < 0. It has no roots and no factorised form. And the roots alone do not fix a parabola: (x−1)(x−3)(x - 1)(x - 3) and 2(x−1)(x−3)2(x - 1)(x - 3) have the same roots.

At GCSE and A-level

In England, GCSE Mathematics asks you to identify and interpret the roots, intercepts and turning points of quadratic functions from their graphs. You find the roots algebraically and the turning point by completing the square, which turns the expanded form into the vertex form. GCSE also asks you to sketch translations and reflections of a given graph - exactly what moving y=x2y = x^2 does.

A-level Mathematics builds on this. You work with quadratic functions and their graphs, use the discriminant to decide whether there are real or repeated roots, and complete the square. You also study the effect of transformations such as y=af(x)y = af(x), y=f(x)+ay = f(x) + a and y=f(x+a)y = f(x + a) on any graph. Those are the same three moves as aa, kk and hh for a parabola.

Check yourself

Test yourself

Where is the vertex of the parabola f(x)=−3(x+2)2+5f(x) = -3(x + 2)^2 + 5?

Where does the graph of f(x)=2x2−8x+6f(x) = 2x^2 - 8x + 6 cross the y axis?

A parabola crosses the x axis at 11 and 33, and the y axis at (0,6)(0, 6). What is aa?

How many roots does f(x)=x2+4x+5f(x) = x^2 + 4x + 5 have?

One step to the right of its vertex, a parabola goes down by 33. What is aa?

Flashcards for review

Flip a card and say whether you knew the answer. The ones you did not know come back at the end of the deck. Why it pays to come back to them in a few days is explained in the guide Spaced repetition.

Flashcards

  1. What are the three forms of a quadratic function?

    Expanded ax2+bx+cax^2 + bx + c, vertex a(x−h)2+ka(x - h)^2 + k and factorised a(x−x1)(x−x2)a(x - x_1)(x - x_2). The number aa is the same in all three.
  2. What does the vertex form a(x−h)2+ka(x - h)^2 + k show?

    The vertex (h,k)(h, k). The line of symmetry is x=hx = h.
  3. What does the number cc in ax2+bx+cax^2 + bx + c show?

    Where the graph crosses the y axis: at (0,c)(0, c), because f(0)=cf(0) = c.
  4. What does the factorised form a(x−x1)(x−x2)a(x - x_1)(x - x_2) show?

    The roots x1x_1 and x2x_2 - where the graph crosses the x axis.
  5. How do you read aa off a graph?

    Go one step to the right of the vertex: the graph rises by aa (or falls, when aa is negative).
  6. Where is the vertex of y=(x−3)2y = (x - 3)^2?

    At (3,0)(3, 0): the graph of y=x2y = x^2 moved 3 to the right.
  7. How do you get the vertex from ax2+bx+cax^2 + bx + c?

    h=−b2ah = -\frac{b}{2a} and k=−Δ4ak = -\frac{\Delta}{4a}, where Δ=b2−4ac\Delta = b^2 - 4ac.
  8. When does a quadratic function have no factorised form?

    When Δ<0\Delta < 0: the parabola does not meet the x axis, so there are no roots.
  9. What does the sign of aa tell you?

    With a>0a > 0 the parabola opens upwards and the vertex is its lowest point. With a<0a < 0 it opens downwards and the vertex is its highest point.
  10. Where does the line of symmetry of a parabola lie?

    At x=hx = h, halfway between the roots: h=x1+x22h = \frac{x_1 + x_2}{2}.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. Illustrative Mathematics - Algebra 1, Unit 6, Lesson 9: Standard Form and Factored Form (ax² + bx + c with a not 0; a constant times two linear factors) · CC BY 4.0
  2. Illustrative Mathematics - Algebra 1, Unit 6, Lesson 11: Graphing from the Factored Form (the zeros are the x-intercepts; the vertex lies halfway between them) · CC BY 4.0
  3. Illustrative Mathematics - Algebra 1, Unit 6, Lesson 12: Graphing the Standard Form, Part 1 (a positive opens upwards, a negative downwards; a larger a makes the graph narrower) · CC BY 4.0
  4. Illustrative Mathematics - Algebra 1, Unit 6, Lesson 16: Graphing from the Vertex Form (a(x − h)² + k has its vertex at (h, k), a minimum or a maximum) · CC BY 4.0
  5. Illustrative Mathematics - Algebra 1, Unit 6, Lesson 17: Changing the Vertex ((x − 3)² moves the graph 3 units right, (x + 3)² moves it 3 units left) · CC BY 4.0
  6. Wikibooks - A-level Mathematics/OCR/C1/Polynomials (the constant term gives the y-intercept; the discriminant and the number of roots; completing the square and the turning point) · CC BY-SA 4.0
  7. Wikipedia - Quadratic function (vertex at x = −b/2a, the axis of symmetry, the factored form with the roots) · CC BY-SA 4.0
  8. Wikipedia - Discriminant (the vertex (−b/2a, −Δ/4a); a parabola touches the x axis at its vertex when Δ = 0) · CC BY-SA 4.0

More explainers