Mathly

Clear CAPS study guides and practice for South African students, Grade 4 to Grade 12.

Support

  • Contact Us
  • FAQs
  • About

Account

  • Subscription Plans

Earn Free Access

  • How to get Mathly free

© 2026 Mathly. All rights reserved.

Terms & ConditionsPrivacy Policy
←
Home/Grade 12/Functions (Including Inverses)

Functions (Including Inverses)

Free

Grade 12

📏

1. Revision — The Linear Function

Before inverses make sense you have to be fluent in the four parent functions. Take each one in turn and know the same short list of features cold — the examination asks for them by name.

Standard form

y = mx + c, where m is the gradient and c is the y-intercept. Its graph is a straight line, and it is the only one of the four whose gradient is the same everywhere.

The features to know

Intercepts

y-intercept: set x = 0, giving y = c. x-intercept: set y = 0 and solve for x.

Domain and range

Both are all real numbers — unless m = 0, when the graph is horizontal and the range collapses to the single value y = c.

Shape and behaviour

m > 0 increasing everywhere, m < 0 decreasing everywhere. No turning point, no asymptote, no maximum or minimum.

Average gradient is just the gradient

Because the steepness never changes, the average gradient between any two points on a straight line is m itself. This is the only one of the four functions for which that is true, and it is worth saying out loud when a question asks.

Why this one matters for inverses

A non-horizontal straight line passes both the vertical and the horizontal line test, so its inverse is always a function — no restriction needed. Every other function in this list needs more care.

Worked Examples

  1. 1
    y-intercept: put x = 0, so f(0) = −4 and the point is (0, −4).
  2. 2
    x-intercept: put y = 0, so 2x − 4 = 0, giving 2x = 4 and x = 2 — the point (2, 0).
  3. 3The line is not horizontal, so it climbs without bound in both directions.
  4. 4
    Answer: domain x ∈ ℝ, range y ∈ ℝ. The gradient 2 is positive, so f is increasing on its whole domain.
Answerx-intercept (2, 0), y-intercept (0, −4); domain and range both all real numbers
  1. 1f(−1) = −6 and f(4) = 4.
  2. 2
    Average gradient = 4 − (−6)4 − (−1) = 105 = 2.
  3. 3
    Answer: 2 — the same as m, and it would be 2 for any other pair of points you chose.
Answer2

Diagram

The line y = 2x − 4 with its x-intercept at (2, 0) and its y-intercept at (0, −4) marked

(2, 0)(0, -4)y = 2x − 4: gradient 2, one x-intercept, one y-intercept
🅿️

2. Revision — The Quadratic Function

The parabola is the function that will cause trouble when you come to inverses, because it is the one that fails the horizontal line test. Knowing its features precisely is what makes the restriction step make sense later.

Three forms, three different gifts

y = a(x − p)² + q gives the turning point (p, q) and the axis of symmetry x = p.

y = a(x − x₁)(x − x₂) gives the x-intercepts directly.

y = ax² + bx + c gives the y-intercept c, and x = −b ÷ 2a gives the axis of symmetry.

The features to know

Turning point

a > 0 opens upwards and q is the minimum; a < 0 opens downwards and q is the maximum.

Domain and range

Domain is all real numbers. The range is bounded on one side: y ≥ q when a > 0, y ≤ q when a < 0.

Increase and decrease

The graph changes direction at x = p — decreasing on one side of the axis of symmetry and increasing on the other.

Symmetry is the point

The parabola is symmetrical about x = p, so the two x-intercepts sit the same distance either side of it, and two different x-values give the same y. That symmetry is exactly why the inverse is not a function until you cut the graph in half.

The sign trap

In y = a(x − p)² + q the bracket already carries the minus, so y = (x − 1)² − 4 turns at (1, −4), not (−1, −4).

Worked Examples

  1. 1
    The form is already y = a(x − p)² + q, so the turning point is (1, −4) and a = 1 > 0 means it opens upwards.
  2. 2
    y-intercept: f(0) = (−1)² − 4 = −3.
  3. 3
    x-intercepts: (x − 1)² = 4, so x − 1 = ±2 and x = −1 or x = 3. Note they sit 2 either side of x = 1 ✓
  4. 4
    Since it opens upwards, −4 is the minimum, so the range is y ≥ −4.
  5. 5
    Answer: the graph decreases for x < 1 and increases for x > 1, turning at the axis of symmetry.
AnswerTP (1, −4); x-intercepts −1 and 3; y-intercept −3; range y ≥ −4; increasing for x > 1
  1. 1
    Take the horizontal line y = 0. It cuts the graph at x = −1 and at x = 3.
  2. 2
    So the single output 0 comes from two different inputs.
  3. 3
    Answer: a horizontal line meets the graph twice, so the reflection in y = x would have two y-values for one x — a relation, not a function.
Answerf(−1) = f(3) = 0, so one output comes from two inputs

Diagram

The parabola y = (x − 1)² − 4 with its turning point (1, −4), axis of symmetry x = 1, and x-intercepts at −1 and 3

(−1, 0)(3, 0)(1, −4)x = 1y = (x − 1)² − 4: turning point (1, −4), roots −1 and 3
〰️

3. Revision — The Hyperbolic Function

The hyperbola is the one with a hole in its domain. Its two asymptotes are the first thing to find and the last thing to check, because everything else on the sketch hangs off them.

Standard form

y = ax − p + q, with a vertical asymptote at x = p and a horizontal asymptote at y = q. The graph has two separate branches and never touches either dashed line.

The features to know

Domain and range

Domain x ≠ p, range y ≠ q — the asymptotes are exactly the values that are excluded.

Intercepts

Found the usual way, but there is at most one of each — and if the asymptote sits on an axis there may be none at all.

Shape

a > 0 puts the branches in the top-right and bottom-left of the asymptote cross; a < 0 puts them in the other two.

Its own kind of symmetry

The hyperbola has point symmetry about where the asymptotes cross, at (p, q) — rotate it half a turn about that point and it maps onto itself. There is no turning point, no maximum and no minimum.

The mistake that costs the marks

Joining the two branches through the vertical asymptote. They are separate curves — a pen stroke across x = p claims the function has a value there, and it has none.

Worked Examples

  1. 1
    Read the asymptotes straight off the form: x = 1 from the bracket, y = 1 from the constant added on the end.
  2. 2
    y-intercept: f(0) = 2 ÷ (−1) + 1 = −2 + 1 = −1.
  3. 3
    x-intercept: set 2 ÷ (x − 1) + 1 = 0, so 2 ÷ (x − 1) = −1, giving x − 1 = −2 and x = −1.
  4. 4
    Answer: domain x ≠ 1 and range y ≠ 1 — read directly off the two asymptotes.
AnswerAsymptotes x = 1 and y = 1; x-intercept (−1, 0); y-intercept (0, −1); domain x ≠ 1, range y ≠ 1
  1. 1
    The bracket is (x + 2), so p = −2 and the vertical asymptote is x = −2. The constant gives y = −3.
  2. 2Substitute the point: 1 = a ÷ (−1 + 2) − 3, so 1 = a ÷ 1 − 3.
  3. 3
    Therefore a = 4.
  4. 4
    Answer: g(x) = 4 ÷ (x + 2) − 3, with asymptotes x = −2 and y = −3.
Answera = 4; asymptotes x = −2 and y = −3

Diagram

The hyperbola y = 2/(x − 1) + 1 with its asymptotes x = 1 and y = 1 dashed, and both intercepts marked

(−1, 0)(0, −1)x = 1y = 1y = 2/(x − 1) + 1: asymptotes x = 1 and y = 1
📈

4. Revision — The Exponential Function

The exponential is the one whose inverse you will meet as the logarithm. It has a single horizontal asymptote, and unlike the parabola it never repeats an output — which is what makes its inverse a function with no restriction at all.

Standard form

y = a·bˣ + q with b > 0 and b ≠ 1. The horizontal asymptote is y = q, and the graph approaches it on one side without ever reaching it.

The features to know

Domain and range

Domain is all real numbers; the range is bounded by the asymptote — y > q when a > 0 and y < q when a < 0.

Growth or decay

b > 1 grows as x increases; 0 < b < 1 decays. Either way the graph is increasing or decreasing over its whole domain — it never turns.

Intercepts

There is always a y-intercept, found at x = 0. There is an x-intercept only if the graph crosses its asymptote's side — that is, only when a and q have opposite signs.

Why its inverse needs no restriction

Because the graph is always increasing or always decreasing, no horizontal line can cut it twice. It passes the horizontal line test as it stands, so reflecting it in y = x gives a function straight away — the logarithmic function.

The mistake that costs the marks

Drawing the curve flattening onto the x-axis when the asymptote is somewhere else. If q = −4 the graph flattens towards y = −4, not towards zero — and the range is y > −4, not y > 0.

Worked Examples

  1. 1
    The constant on the end gives the horizontal asymptote y = −4.
  2. 2
    y-intercept: f(0) = 2⁰ − 4 = 1 − 4 = −3.
  3. 3
    x-intercept: 2ˣ − 4 = 0 means 2ˣ = 4, so x = 2.
  4. 4
    Since the base 2 is greater than 1 and a = 1 is positive, the graph increases over its whole domain and sits above its asymptote.
  5. 5
    Answer: range y > −4 — bounded below by the asymptote, unbounded above.
AnswerAsymptote y = −4; y-intercept (0, −3); x-intercept (2, 0); range y > −4; increasing
  1. 1
    f(0) = −3 and f(2) = 0.
  2. 2
    Average gradient = 0 − (−3)2 − 0 = 32 = 1,5.
  3. 3
    Answer: 1,5. An exponential gets steeper as x grows, so at x = 0 the curve is flatter than 1,5 and at x = 2 it is steeper — 1,5 is only the average across the interval.
Answeraverage gradient = 1,5

Diagram

The exponential y = 2ˣ − 4 with its horizontal asymptote y = −4 dashed, and its intercepts at (0, −3) and (2, 0)

(2, 0)(0, −3)y = −4y = 2ˣ − 4: horizontal asymptote y = −4
✓

5. The Formal Definition of a Function

A function is a relation where every input (x-value) maps to exactly one output (y-value). We formally test this using the vertical line test — if any vertical line drawn on a graph crosses the curve more than once, the relation is not a function. We also distinguish one-to-one functions (where each output also corresponds to exactly one input, passing a horizontal line test too) from many-to-one functions (where multiple inputs can share the same output).

Colour key:function (passes test)not a functionone-to-one

Two important tests

Vertical Line Test

Draw vertical lines across the graph. If every vertical line crosses the graph at most once, it is a function. If any vertical line crosses it more than once, it is not a function.

Horizontal Line Test

Draw horizontal lines across the graph. If every horizontal line crosses the graph at most once, the function is one-to-one. If any line crosses more than once, it is many-to-one.

Why does this matter for inverses?

Only one-to-one functions have inverses that are also functions. If a function is many-to-one, its inverse fails the vertical line test and is therefore a relation, not a function — unless we restrict the domain.

Worked Examples

  1. 1
    Vertical line test: For every x-value, y = x² + 1 gives exactly one y-value (squaring is well-defined). No vertical line crosses the parabola more than once. It is a function.
  2. 2
    Horizontal line test: Try the horizontal line y = 5. This crosses the parabola at x = 2 (giving y = 4 + 1 = 5) and at x = −2 (giving y = 4 + 1 = 5).
  3. 3
    Since two different x-values (x = 2 and x = −2) give the same y-value (y = 5), the horizontal line test fails. It is NOT one-to-one — it is a many-to-one function.
AnswerYes, it is a function (passes the vertical line test). Not one-to-one — it is many-to-one.
  1. 1Rearrange to understand the relation: for a given x-value, the equation gives y = ±√x, meaning one input can produce two outputs.
  2. 2
    Example: let x = 4 → y² = 4 → y = 2 or y = −2. A single x-value (x = 4) maps to two different y-values (2 and −2).
  3. 3
    Vertical line test: The vertical line x = 4 crosses the graph at (4, 2) and (4, −2) — two points. The vertical line test fails.
  4. 4
    Conclusion: x = y² is a relation, not a function, because one input gives two outputs. ✓
Answerx = y² is NOT a function — it fails the vertical line test.
↔

6. Definition of the Inverse Function

The inverse of a function f, written f⁻¹, reverses the input-output relationship — if f(a) = b, then f⁻¹(b) = a. To find an inverse algebraically, we swap x and y in the equation, then solve for y. Importantly, f⁻¹(x) is different from 1f(x) — the inverse notation only applies to one-to-one functions, since many-to-one functions would create an inverse that fails the function test itself.

Colour key:original functionswapped variablesinverse function

Steps to find an inverse algebraically

1

Write the original function as y = f(x).

2

Swap x and y — replace every x with y and every y with x.

3

Solve for y to express the inverse function as y = f⁻¹(x).

Common misconception: f⁻¹(x) ≠ 1f(x)

The notation f⁻¹ means the inverse function (swapping inputs and outputs), not the reciprocal. For example, if f(x) = 2x, then f⁻¹(x) = x2, not 1(2x).

Worked Examples

  1. 1
    Write the original function as y = 3x + 1.
  2. 2
    Swap x and y: x = 3y + 1.
  3. 3
    Solve for y: subtract 1 from both sides → x − 1 = 3y → divide both sides by 3 → y = (x − 1)3.
  4. 4
    Write the inverse function: f⁻¹(x) = (x − 1)3. ✓
  5. 5
    Check: Apply f and then f⁻¹: f(2) = 3(2) + 1 = 7, then f⁻¹(7) = (7 − 1)3 = 63 = 2. ✓ The inverse reverses f.
Answerf⁻¹(x) = (x − 1)3
  1. 1
    Lerato has confused two different things: the inverse function f⁻¹ (swapping inputs and outputs) and the reciprocal 1f(x) = 1x².
  2. 2
    To find the correct inverse, write the original function: y = x².
  3. 3
    Swap x and y: x = y².
  4. 4Solve for y: y = ±√x.
  5. 5
    This gives y = ±√x, which fails the vertical line test — for any x > 0, there are two outputs (+√x and −√x). The inverse is therefore a relation, not a function (unless we restrict the domain of f).
  6. 6
    Conclusion: Lerato is incorrect. f⁻¹(x) ≠ 1x². The actual inverse is y = ±√x, and because f(x) = x² is many-to-one, its inverse is not a function without a domain restriction. ✓
AnswerNo — Lerato confused the inverse with the reciprocal. The actual inverse is y = ±√x, which is not a function.
🔄

7. Sketching Inverses of Linear, Quadratic and Exponential Functions

The graph of f⁻¹ is always the reflection of f in the line y = x. This means every point (a, b) on f corresponds to the point (b, a) on f⁻¹. The behaviour of the inverse depends on the type of original function:

Colour key:original functiony = x (axis of reflection)inverse function

The three function types and their inverses

Linear   y = ax + q

The inverse is also a linear function. Swap x and y and solve: the inverse is y = (x − q)a. Both lines are reflections of each other across y = x.

Quadratic   y = ax²

A parabola is many-to-one, so its inverse y = ±√(xa) is NOT a function. We must restrict the domain (e.g. x ≥ 0) so that only y = +√(xa) is used.

Exponential   y = bˣ

The exponential is one-to-one, so its inverse is the logarithmic function y = log_b(x). The asymptote and domain/range swap: the vertical asymptote of log is x = 0.

Key insight — points swap across y = x

If the point (a, b) lies on f, then the point (b, a) lies on f⁻¹. The line y = x is always the mirror line between a function and its inverse when both are drawn on the same set of axes.

Interactive

A function and its inverse

The inverse swaps every x with its y. On the graph that is a reflection in the line y = x, and the domain and range trade places with it.

a — 2
y = x

A straight line reflects into another straight line. Its gradient turns into its own reciprocal, which makes sense: rise and run have swapped roles.

Swapping x and y

The function

y = 2x

Its inverse

y = x ÷ 2

Domain of f

x ∈ ℝ

Range of f

y ∈ ℝ

Domain of the inverse

x ∈ ℝ

What swaps

domain ↔ range

Is the inverse a function?

Yes

Worked Examples

  1. 1
    Write the original function: y = 2x − 4. Key points: set x = 0 → y = −4 giving (0, −4); set y = 0 → 0 = 2x − 4 → x = 2 giving (2, 0).
  2. 2
    Draw the axis of reflection y = x as a dashed grey line. This is the mirror line.
  3. 3
    Find f⁻¹ by swapping x and y: x = 2y − 4. Solve for y: x + 4 = 2y → y = (x + 4)2.
  4. 4Key points on f⁻¹: the point (0, −4) on f swaps to (−4, 0) on f⁻¹; the point (2, 0) on f swaps to (0, 2) on f⁻¹.
  5. 5
    f passes through (0, −4) and (2, 0). f⁻¹ passes through (−4, 0) and (0, 2). Both lines are reflections of each other across y = x. ✓
Answerf⁻¹(x) = (x + 4)2
  1. 1Without restriction, f(x) = x² is many-to-one (e.g. f(2) = f(−2) = 4), so its full inverse would be y = ±√x, which fails the vertical line test.
  2. 2
    We restrict the domain to x ≥ 0, keeping only the right-hand branch of the parabola where f is one-to-one.
  3. 3
    Write the restricted function as y = x² for x ≥ 0. Swap x and y: x = y².
  4. 4
    Solve for y: y = ±√x. Because we restricted the original domain to x ≥ 0, the output of the inverse must satisfy y ≥ 0, so we take only the positive root: y = √x.
  5. 5
    f⁻¹(x) = √x is a valid function with domain x ≥ 0 and range y ≥ 0. Its graph is the reflection of the right-hand branch of the parabola across y = x. ✓
Answerf⁻¹(x) = √x (positive root only)
  1. 1
    Write the original function: y = 2ˣ. This exponential is one-to-one (it passes the horizontal line test), so its inverse is a function.
  2. 2
    Swap x and y: x = 2ʸ.
  3. 3
    Convert from exponential form to logarithmic form: if x = 2ʸ then y = log₂x.
  4. 4
    So f⁻¹(x) = log₂x. The domain of f⁻¹ is x > 0 (corresponding to the range of f), and it has a vertical asymptote at x = 0 (corresponding to the horizontal asymptote y = 0 of f).
  5. 5
    The graph of f⁻¹(x) = log₂x is the reflection of f(x) = 2ˣ across y = x. Key point: (0, 1) on f becomes (1, 0) on f⁻¹. ✓
Answerf⁻¹(x) = log₂x
✂️

8. Restricting the Domain of y = ax² So Its Inverse Is a Function

Every graph has an inverse relation — reflect it in y = x and there it is. But an inverse is only a function if each input gives exactly one output, and for the parabola that fails badly.

Why the unrestricted parabola fails

y = x² maps both 2 and −2 to 4. Reflecting it gives a sideways parabola in which x = 4 has two y-values, +2 and −2 — so the reflection fails the vertical line test and is a relation, not a function.

The fix: throw half the parabola away

Restrict the domain to x ≥ 0 and the inverse is y = √x. Restrict it to x ≤ 0 instead and the inverse is y = −√x.

Either restriction works — but you must state which one you chose, because the two give different inverses.

Domain and range swap over

This is the whole idea in one line: the domain of f becomes the range of f⁻¹, and the range of f becomes the domain of f⁻¹. For f(x) = x² with x ≥ 0, the range is y ≥ 0, so f⁻¹(x) = √x has domain x ≥ 0 and range y ≥ 0.

Finding the inverse, step by step

Write y = ax², swap x and y to get x = ay², make y the subject to get y = ±√(x ÷ a), and then choose the sign that matches your restriction. The swap is the algebra of the reflection in y = x.

Where the marks are lost

Writing y = ±√x as the final answer. The ± is the honest result of the algebra, but it is exactly the thing that makes the answer not a function — the restriction is what lets you drop one sign, and dropping it without saying which restriction you used earns nothing.

Worked Examples

  1. 1
    Restrict f to x ≥ 0 — the right-hand half of the parabola. State this explicitly; it carries a mark.
  2. 2
    Write y = 2x², then swap x and y: x = 2y².
  3. 3
    Make y the subject: y² = x ÷ 2, so y = ±√(x ÷ 2).
  4. 4
    The restriction x ≥ 0 on f means the range of f⁻¹ is y ≥ 0, so take the positive root: f⁻¹(x) = √(x ÷ 2).
  5. 5
    Answer: domain of f⁻¹ is x ≥ 0 (the range of f) and range is y ≥ 0 (the restricted domain of f).
AnswerFor x ≥ 0: f⁻¹(x) = √(x ÷ 2), with domain x ≥ 0 and range y ≥ 0
  1. 1
    Swapping gives y = ±√x exactly as before — the algebra does not know about the restriction.
  2. 2
    But g was restricted to x ≤ 0, so the range of g⁻¹ must be y ≤ 0. That forces the negative root.
  3. 3
    Answer: g⁻¹(x) = −√x, the lower half of the sideways parabola. Its domain is still x ≥ 0, because the range of g is still y ≥ 0 — only the sign of the output changed.
Answerg⁻¹(x) = −√x

Diagram

y = x² restricted to x ≥ 0 in blue with the discarded half dashed, its inverse y = √x in green, and the line y = x they reflect in

(2, 4)(4, 2)y = x², x ≥ 0y = √xy = xdiscardedreflect in y = x: (2, 4) becomes (4, 2)
Next: Exponential and Logarithmic Functions→
←Back to Grade 12