← IGCSE / O Level Mathematics

IGCSE / O Level Mathematics · Topic 2 Algebra and graphs · Chapter 18 · pp. 193–218

Graphs of functions

A graph turns an equation into a picture. Make a table of values, plot the points and join them with a smooth curve, and you can read off solutions, turning points and gradients without solving anything by algebra. The shape of the curve tells you the type of function before you plot a single point.

Learning objectives

  1. Construct a table of values and plot the graph of a quadratic function.
  2. Solve quadratic equations by reading where a graph crosses the x-axis or a line.
  3. Find the turning point of a quadratic from its completed square form. (Extended)
  4. Plot reciprocal, cubic and exponential graphs, and recognise each type by its shape.
  5. Estimate the gradient of a curve by drawing a tangent. (Extended)
  6. Solve equations by drawing a line on a graph, and sketch functions from their key points. (Extended)

Book exercises: 18.1 to 18.11 and Student assessments 1 to 3 (pp. 193–218).

Quadratic graphs

🔑 Key ideas

  • A quadratic function has the form y = ax2 + bx + c, where a, b and c are constants and a ≠ 0.
  • Its graph is a smooth curve called a parabola.
  • a > 0 gives a ∪ shape. a < 0 gives an ∩ shape.
  • A parabola is symmetrical: the y values in the table repeat either side of the turning point.
x−4−3−2−101234
y = x216941014916
y = −x2−16−9−4−10−1−4−9−16
−4−3−2−11234 −16−12−8−4481216 y = x² y = −x²
y = x² (solid) is a ∪-shaped parabola with a minimum at (0, 0). y = −x² (dashed) is the same curve turned upside down, an ∩ shape with a maximum at (0, 0).
1. Pick x values from the range given 2. Substitute bracket negatives 3. Plot (x, y) from the table 4. Join smoothly a curve, no ruler
Plotting any curve: table of values first, then points, then one smooth curve through them all.

📘 Example 1 · Plot y = x2 − 5x + 6 for 0 ≤ x ≤ 5

  1. List the x values: 0, 1, 2, 3, 4, 5.
  2. Substitute each one. For x = 1: 12 − 5(1) + 6 = 1 − 5 + 6 = 2.
  3. For x = 4: 42 − 5(4) + 6 = 16 − 20 + 6 = 2. The values are symmetrical, as expected.
  4. The full table: y = 6, 2, 0, 0, 2, 6.
  5. Plot the six points and join them with a smooth ∪-shaped curve (a > 0).
  6. Check: the curve dips below the x-axis between x = 2 and x = 3. At x = 2.5, y = 6.25 − 12.5 + 6 = −0.25. ✔
−1123456 −11234567 y = x² − 5x + 6
The six points from Example 1 joined by a smooth parabola. It crosses the x-axis at x = 2 and x = 3.

📘 Example 2 · Table of values for y = −x2 + x + 2, −3 ≤ x ≤ 4

  1. Bracket negative x values. x = −3: −(−3)2 + (−3) + 2 = −9 − 3 + 2 = −10.
  2. Careful: −x2 means −(x2), so −(−3)2 = −9, not +9.
  3. x = 0: −0 + 0 + 2 = 2. x = 2: −4 + 2 + 2 = 0.
  4. Full table for x = −3 to 4: y = −10, −4, 0, 2, 2, 0, −4, −10.
  5. a = −1 < 0, so the curve is ∩-shaped. Its highest point is between x = 0 and x = 1.

📘 Example 3 · Find y for y = 2x2 − 2x − 3 when x = −2 and x = −1

  1. x = −2: 2(−2)2 − 2(−2) − 3.
  2. Square first: (−2)2 = 4, so 2 × 4 = 8.
  3. −2(−2) = +4, so y = 8 + 4 − 3 = 9.
  4. x = −1: 2(1) + 2 − 3 = 1.

🧪 Try it: function plotter

Pick a type, set the numbers and the x range. The plotter builds the table of values, draws the graph and lists its key features.

Graph of the function.

    ✏️ Try it

    1. For y = x2 + x − 2, find y when x = −3, x = 0 and x = 2.
    2. Is the graph of y = −x2 + 2x + 3 ∪-shaped or ∩-shaped? Find y when x = 4.
    3. For y = x2 − 2x − 15, find y when x = −4.
    Answers

    1. 9 − 3 − 2 = 4; −2; 4 + 2 − 2 = 4 · 2. ∩ (a = −1 is negative); −16 + 8 + 3 = −5 · 3. 16 + 8 − 15 = 9

    Next: solving equations with a graph →

    Graphical solution of a quadratic equation

    🔑 Key ideas

    • On the x-axis, y = 0. So the solutions of ax2 + bx + c = 0 are the x values where the graph of y = ax2 + bx + c crosses the x-axis.
    • One graph can solve many equations: rearrange the new equation so one side is the function you plotted, then draw the other side as a line.
    • The solutions are the x values where the curve and the line cross. Read them to 1 d.p.
    • No crossing points means no real solutions.
    −2−112345 481216 y = 2 ≈ 0.3 ≈ 3.7 y = x² − 4x + 3
    The curve crosses the x-axis at x = 1 and x = 3: the solutions of x² − 4x + 3 = 0. It meets the line y = 2 at x ≈ 0.3 and x ≈ 3.7: the solutions of x² − 4x + 1 = 0.

    📘 Example 4 · Use the graph of y = x2 − 4x + 3 to solve x2 − 4x + 3 = 0

    1. Table for −2 ≤ x ≤ 5: y = 15, 8, 3, 0, −1, 0, 3, 8.
    2. Plot and join the points (the graph above).
    3. The equation says y = 0, so look where the curve crosses the x-axis.
    4. It crosses at x = 1 and x = 3.
    5. Check: 1 − 4 + 3 = 0 ✔ and 9 − 12 + 3 = 0 ✔.
    1. Rearrange one side = f(x) 2. Other side is the line to draw 3. Draw it on the same axes 4. Read off x where they cross
    Solving a new equation with a graph you already have: whatever is left over after you make one side f(x) is the line to draw.

    📘 Example 5 · Use the same graph to solve x2 − 4x + 1 = 0

    1. The plotted function is x2 − 4x + 3. The new equation has + 1 instead of + 3.
    2. Add 2 to both sides: x2 − 4x + 3 = 2.
    3. So draw the line y = 2 on the same axes.
    4. Read the x values where the line meets the curve: x ≈ 0.3 and x ≈ 3.7.
    5. Check: 0.32 − 4(0.3) + 1 = 0.09 − 1.2 + 1 = −0.11, close to 0. ✔

    📘 Example 6 · Use the same graph to solve x2 − 4x = 0

    1. Add 3 to both sides: x2 − 4x + 3 = 3.
    2. Draw the line y = 3.
    3. It meets the curve at x = 0 and x = 4.
    4. Check by factorising: x(x − 4) = 0 gives x = 0 or x = 4. ✔

    ✏️ Try it

    1. Where does the graph of y = x2 − x − 6 cross the x-axis?
    2. Which line would you draw on the graph of y = x2 − 4x + 3 to solve x2 − 4x − 2 = 0? Estimate the solutions.
    3. Use the graph above to explain why x2 − 4x + 5 = 0 has no solutions.
    Answers

    1. x = −2 and x = 3 · 2. Add 5: x2 − 4x + 3 = 5, so draw y = 5. x ≈ −0.4 and x ≈ 4.4 · 3. It becomes x2 − 4x + 3 = −2. The line y = −2 is below the curve's lowest point (y = −1), so they never cross.

    Next: turning points →

    The completed square form and the turning point Extended

    🔑 Key ideas

    • A quadratic can be written in completed square form: y = a(x − b)2 + c. For example, y = x2 + 6x − 4 = (x + 3)2 − 13.
    • You can plot it straight from this form: there is no need to expand the brackets.
    • The turning point is at (b, c). Watch the sign: (x + 3)2 means b = −3.
    • a > 0: ∪ shape, the turning point is a minimum. a < 0: ∩ shape, it is a maximum.
    a > 0: ∪ shape minimum at (b, c) a < 0: ∩ shape maximum at (b, c)
    For y = a(x − b)² + c the dashed line x = b is the line of symmetry, and the turning point (b, c) sits on it. The sign of a decides whether it is a minimum or a maximum.

    📘 Example 7 · Plot y = (x − 4)2 + 2 for 0 ≤ x ≤ 6 and give its turning point

    1. Work inside the bracket first. x = 0: (0 − 4)2 + 2 = 16 + 2 = 18.
    2. x = 1: (−3)2 + 2 = 11. x = 2: (−2)2 + 2 = 6.
    3. Full table for x = 0 to 6: y = 18, 11, 6, 3, 2, 3, 6.
    4. Plot and join: a ∪ shape, because a = 1 is positive.
    5. The lowest point is at x = 4, y = 2: the turning point is a minimum at (4, 2).
    6. Check with the rule: (x − b)2 + c with b = 4, c = 2 gives (4, 2). ✔
    −112345678 48121620 minimum (4, 2) x = 4 (line of symmetry) y = (x − 4)² + 2
    y = (x − 4)² + 2, extended to x = 8 to show the symmetry. Points the same distance either side of x = 4 have the same height.

    📘 Example 8 · Turning point of y = −2(x − 5)2 + 30, without plotting

    1. Match to a(x − b)2 + c: a = −2, b = 5, c = 30.
    2. a is negative, so the curve is ∩-shaped and the turning point is a maximum.
    3. Answer: maximum at (5, 30).
    4. Check: (x − 5)2 is never negative, so −2(x − 5)2 is at most 0. y is largest, 30, when x = 5. ✔

    📘 Example 9 · Turning point of y = x2 + 6x − 4

    1. Halve the x coefficient: 6 ÷ 2 = 3, so start with (x + 3)2 = x2 + 6x + 9.
    2. That has + 9 but we need − 4, so subtract 13: y = (x + 3)2 − 13.
    3. (x + 3) = (x − (−3)), so b = −3 and c = −13.
    4. a = 1 > 0, so the answer is a minimum at (−3, −13).

    ✏️ Try it

    1. Give the turning point of y = (x + 3)2 − 6. Is it a maximum or a minimum?
    2. Give the turning point of y = −(x − 2)2 + 3. Is it a maximum or a minimum?
    3. For y = 2(x − 1)2 − 3, find y when x = 3, and write down the turning point.
    Answers

    1. (−3, −6), minimum · 2. (2, 3), maximum · 3. 2(2)2 − 3 = 5; minimum at (1, −3)

    Next: reciprocal, cubic and exponential graphs →

    The reciprocal function

    🔑 Key ideas

    • A reciprocal function has the form y = . Its graph is a hyperbola.
    • x = 0 has no y value (you cannot divide by 0), so the table has a gap there and the graph comes in two separate branches.
    • Never join the two branches across the y-axis.
    x−4−3−2−101234
    y = 2/x−0.5−0.7−1−2—210.70.5
    −4−3−2−11234 −5−4−3−2−112345 y = 2/x no point at x = 0
    y = 2/x: one branch in the top right, one in the bottom left. Each branch gets closer to both axes without ever touching them.

    Types of graph Extended

    Graphs of f(x) = axn take a different shape for each value of n. Learn to name them on sight.

    f(x) = x⁰ linear: horizontal line f(x) = x¹ linear: straight line f(x) = x² quadratic: parabola f(x) = x³ cubic: cubic curve f(x) = x⁻¹ = 1/x reciprocal: hyperbola f(x) = x⁻² = 1/x² reciprocal
    The six graphs of f(x) = xⁿ for n = 0, 1, 2, 3, −1 and −2. Changing a stretches the curve (or flips it if a is negative) but keeps the type.

    📘 Example 10 · Plot y = 2x2 for −3 ≤ x ≤ 3

    1. Square first, then double. x = −3: 2 × 9 = 18. x = −2: 2 × 4 = 8. x = −1: 2 × 1 = 2.
    2. x = 0 gives 0, and the positive x values repeat the pattern.
    3. Table: y = 18, 8, 2, 0, 2, 8, 18.
    4. n = 2, so it is a quadratic: a ∪-shaped parabola, narrower than y = x2.

    Exponential functions Extended

    🔑 Key ideas

    • An exponential function has the form y = ax: the x is in the index.
    • Every graph y = ax passes through (0, 1), because a0 = 1.
    • For negative x, a−x = , which gets closer and closer to 0. The x-axis is an asymptote.
    −3−2−112 −112345678 (0, 1) y = 2ˣ y = 3ˣ y = 4ˣ
    y = 2ˣ, 3ˣ and 4ˣ all pass through (0, 1). The bigger the base, the steeper the curve for x > 0 and the faster it flattens onto the x-axis for x < 0.

    📘 Example 11 · Table of values for y = 2x, −3 ≤ x ≤ 3

    1. x = 0: 20 = 1.
    2. Positive x: 21 = 2, 22 = 4, 23 = 8.
    3. Negative x mean “one over”: 2−1 = 0.5, 2−2 = 0.25, 2−3 = 0.125.
    4. Table: y = 0.125, 0.25, 0.5, 1, 2, 4, 8.
    5. Check: each step right doubles y. ✔

    ✏️ Try it

    1. For y = , find y when x = −4 and when x = 0.5.
    2. For f(x) = 3x, find f(−2) as a fraction and a decimal (2 d.p.).
    3. Name the type of graph for f(x) = 2x3 and for f(x) = x−2.
    Answers

    1. −0.5 and 4 · 2. ≈ 0.11 · 3. Cubic curve; reciprocal (both branches above the x-axis)

    Next: gradients and graphical methods →

    Gradients of curves Extended

    🔑 Key ideas

    • A straight line has one gradient everywhere: .
    • A curve's gradient changes from point to point.
    • The gradient of a curve at a point = the gradient of the tangent at that point. A tangent is a straight line that just touches the curve there.
    • Pick two points on the tangent far apart: the answer is more accurate.
    1. Mark point on the curve 2. Tangent just touches there 3. Two points far apart on it 4. Rise ÷ run = the gradient
    Gradient of a curve at a point: draw the tangent, then treat it like any straight line.
    −3−2−1123 −4481216 run = 3 rise = 12 (0, −2) (3, 10) (1, 2) y = 2x²
    The tangent to y = 2x² at x = 1 (straight line). Two points on it, (0, −2) and (3, 10), give rise 12 over run 3.

    📘 Example 12 · Gradient of y = 2x2 at x = 1

    1. Find the point: x = 1 gives y = 2(1)2 = 2, so (1, 2).
    2. Draw the tangent at (1, 2) with a ruler: it touches the curve there and nowhere else nearby.
    3. Choose two points on the tangent: (0, −2) and (3, 10).
    4. Gradient = = = 4.

    Solving equations by graphical methods Extended

    The same trick as before works for any curve: rearrange so one side is the plotted function, then draw the other side as a line.

    −3−2−1123 −551015202530 ≈ −1.5 ≈ 1.5 y = 3x² − x − 2 y = −x + 5
    y = 3x² − x − 2 meets y = −x + 5 at x ≈ −1.5 and x ≈ 1.5: the solutions of 3x² − 7 = 0.

    📘 Example 13 · Use the graph of y = 3x2 − x − 2 to solve 3x2 − 7 = 0

    1. First, 3x2 − x − 2 = 0 is where the curve crosses the x-axis: x ≈ −0.7 and x = 1.
    2. For 3x2 − 7 = 0, we need the left side to be 3x2 − x − 2.
    3. Subtract x from both sides: 3x2 − x − 7 = −x.
    4. Add 5 to both sides: 3x2 − x − 2 = −x + 5.
    5. Draw the line y = −x + 5 and read the crossing points: x ≈ −1.5 and x ≈ 1.5.
    6. Check: x2 = 7 ÷ 3 ≈ 2.33, so x ≈ ±1.53. ✔

    📘 Example 14 · Use the graph of y = + x to solve x2 − x = 1

    1. Table for −4 ≤ x ≤ 4 (no value at x = 0): −4.25, −3.3, −2.5, −2, —, 2, 2.5, 3.3, 4.25.
    2. The graph never touches the x-axis, so + x = 0 has no solution.
    3. For x2 − x = 1, divide both sides by x: x − 1 = .
    4. Add x to both sides: 2x − 1 = + x.
    5. Draw y = 2x − 1 and read the crossings: x ≈ −0.6 and x ≈ 1.6.
    6. Check: 1.62 − 1.6 = 2.56 − 1.6 = 0.96 ≈ 1. ✔

    ✏️ Try it

    1. A tangent to a curve passes through (1, 3) and (3, 11). What is the gradient of the curve at that point?
    2. The tangent to y = x2 at x = 1 passes through (0, −1) and (2, 3). Find the gradient at x = 1.
    3. You have the graph of y = x3 + x − 2. Which line do you draw to solve x3 = 7 − x?
    Answers

    1. = 4 · 2. = 2 · 3. Add x − 2 to both sides: x3 + x − 2 = 5, so draw y = 5.

    Next: sketching graphs →

    Recognising and sketching functions Extended

    🔑 Key ideas

    • A plot uses a table of values on graph paper. A sketch shows only the shape and the key points, and is much quicker.
    • Every sketch shows where the graph crosses both axes.
    • Quadratics: if the curve never meets the x-axis, show the turning point instead.
    • Reciprocal and exponential graphs: show the asymptotes, dotted if they are not the axes.
    1. y-intercept put x = 0 2. x-intercepts put y = 0, solve 3. Shape sign of top power 4. Extras turning pt, asymptote
    The four things to work out before you sketch any graph.
    TypeShapeWhat to label
    Linear y = mx + cStraight lineBoth intercepts
    Quadratic∪ if x2 term positive, ∩ if negativeIntercepts; turning point if it misses the x-axis
    CubicRises overall if x3 term positive, falls if negative; up to 3 x-interceptsBoth intercepts; a repeated root just touches
    Reciprocal , Two branchesAsymptotes
    Exponential axThrough (0, 1), flat on one sidey-intercept, asymptote

    📘 Example 15 · Sketch y = −3x + 5

    1. y-axis: put x = 0, so y = 5.
    2. x-axis: put y = 0, so 0 = −3x + 5, 3x = 5, x = ≈ 1.67.
    3. Gradient −3 is negative, so the line slopes down to the right.
    4. Sketch: a straight line through (0, 5) and (, 0).

    📘 Example 16 · Sketch y = x2 − 8x + 15

    1. y-axis: x = 0 gives y = 15.
    2. x-axis: x2 − 8x + 15 = 0 factorises to (x − 3)(x − 5) = 0, so x = 3 or x = 5.
    3. The x2 term is positive, so the curve is ∪-shaped.
    4. Turning point: halfway between the roots, x = 4. Then y = 16 − 32 + 15 = −1.
    5. Sketch through (0, 15), (3, 0), (5, 0), with a minimum at (4, −1).

    📘 Example 17 · Sketch y = −x2 − 4x − 9

    1. y-axis: x = 0 gives y = −9.
    2. x-axis: −x2 − 4x − 9 = 0 does not factorise, and the quadratic formula gives no solutions (b2 − 4ac = 16 − 36 < 0). The curve never meets the x-axis.
    3. So find the turning point. Completed square: y = −(x + 2)2 − 5, giving (−2, −5).
    4. The x2 term is negative, so the curve is ∩-shaped with a maximum at (−2, −5), crossing the y-axis at (0, −9).
    15 3 5 (4, −1) y = x² − 8x + 15 −30 235 y = (x − 2)(x − 3)(x − 5) y = 2 y = 1/x² + 2 Sketches, not to scale: only the key points are labelled.
    Left: a quadratic with its intercepts and minimum. Middle: a cubic with three roots, crossing the y-axis at −30. Right: 1/x² moved up 2, so its asymptotes are y = 2 (dotted) and the y-axis.

    📘 Example 18 · Sketch y = (x − 2)(x − 3)(x − 5)

    1. y-axis: x = 0 gives (−2)(−3)(−5) = −30.
    2. x-axis: (x − 2)(x − 3)(x − 5) = 0, so x = 2, 3 or 5.
    3. Expanding would give +x3, so the curve rises overall from bottom left to top right.
    4. Sketch through (0, −30), (2, 0), (3, 0), (5, 0).

    📘 Example 19 · Sketch y = (−x + 1)(x2 − 6x + 9)

    1. y-axis: x = 0 gives (1)(9) = 9.
    2. Factorise the quadratic: x2 − 6x + 9 = (x − 3)2.
    3. So (−x + 1)(x − 3)2 = 0 gives x = 1 or x = 3 (a repeated root).
    4. Expanding would give −x3, so the curve falls overall from top left to bottom right.
    5. The repeated root means the curve just touches the x-axis at x = 3. It crosses at x = 1 and meets the y-axis at (0, 9).
    three intersections two (one just touches) one intersection
    A cubic with a positive x³ term can meet the x-axis three times, twice (touching at a repeated root) or once.

    📘 Example 20 · Sketch y = + 2 and give its asymptotes

    1. Start from y = : both branches above the x-axis, asymptotes x = 0 and y = 0.
    2. + 2 adds 2 to every y value, so the whole graph moves up 2 units.
    3. The horizontal asymptote moves up too: y = 2 (draw it dotted). The vertical asymptote is still the y-axis.

    📘 Example 21 · Recognise y = 2x against y = −2x

    1. y = 2x: passes through (0, 1), rises steeply to the right, and flattens onto the x-axis to the left.
    2. y = −2x makes every y value negative: it is the same curve reflected in the x-axis.
    3. So y = −2x passes through (0, −1), falls steeply to the right, and its asymptote is still y = 0.

    ✏️ Try it

    1. Where does the line y = 2x − 4 cross each axis?
    2. For y = (x − 4)(x − 6), give the intercepts and the turning point.
    3. For y = 2x − 4, give the y-intercept, the x-intercept and the asymptote.
    Answers

    1. (0, −4) and (2, 0) · 2. (0, 24), (4, 0), (6, 0); minimum at (5, −1) · 3. (0, −3); 2x = 4 gives (2, 0); asymptote y = −4

    Next: summary and quiz →

    Chapter summary

    • Plot a curve from a table of values, bracketing negative x values, and join the points with a smooth curve.
    • Quadratic y = ax2 + bx + c: a parabola, ∪ if a > 0 and ∩ if a < 0.
    • Solutions of f(x) = 0 are where the graph crosses the x-axis. For other equations, make one side f(x) and draw the other side as a line.
    • y = a(x − b)2 + c has its turning point at (b, c): a minimum if a > 0, a maximum if a < 0.
    • Reciprocal : a hyperbola with two branches and asymptotes. Cubic: up to three x-intercepts. Exponential ax: through (0, 1) with the x-axis as an asymptote.
    • Gradient of a curve = gradient of the tangent at that point.
    • A sketch shows the shape, the intercepts and, where needed, the turning point and asymptotes.

    📄 Practice questions

    The book's Exercises 18.1 to 18.11 and Student assessments 1 to 3 are in the printable assignment for this chapter.

    Mini-quiz

    1. What shape is the graph of y = x² − 5x + 6?
    2. For y = x² − 3x + 1, what is y when x = −2?
    3. The graph of y = x² − x − 6 crosses the x-axis at which x values?
    4. You have the graph of y = x² − 4x + 3. Which line do you draw to solve x² − 4x − 1 = 0?
    5. What is the turning point of y = (x − 2)² + 5?
    6. Describe the turning point of y = −3(x + 1)² + 4.
    7. Which name fits the graph of y = 4/x?
    8. Every graph of the form y = aˣ (with a > 0) passes through which point?
    9. A tangent to a curve passes through (1, 3) and (3, 11). What is the gradient of the curve there?
    10. Where does the line y = 3x − 6 cross the x-axis?
    11. Where does y = (x − 1)(x − 4)(x + 2) cross the y-axis?
    12. What are the asymptotes of y = 1/x² + 3?

    Source: Cambridge IGCSE Mathematics Core and Extended (4th edition, Pimentel and Wall), Chapter 18 (Graphs of functions). Explanations, the Try it answers, the tool and the quiz are Guru Jazzy's own. This page is not made or endorsed by Cambridge or Hodder Education.