Mathly

Clear maths education 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 — Linear, Quadratic, Hyperbolic and Exponential Functions

Before working with inverses, we revise the four key function types and their standard forms. Linear functions y = ax + q produce straight lines, with a as the gradient and q as the y-intercept. Quadratic functions y = ax² + q produce parabolas, with turning point at (0, q) when unshifted horizontally, opening upward if a > 0 and downward if a < 0. Hyperbolic functions y = a/x + q have a vertical asymptote at x = 0 and horizontal asymptote at y = q. Exponential functions y = a·bˣ + q have a horizontal asymptote at y = q, growing if b > 1 and decaying if 0 < b < 1.

Colour key:linearquadratichyperbolicexponential

The four standard forms

Linear   y = ax + q

a = gradient (slope of the line)
q = y-intercept
Graph: straight line

Quadratic   y = ax² + q

a > 0: opens upward (smile)
a < 0: opens downward (frown)
Turning point at (0, q)

Hyperbolic   y = a/x + q

Vertical asymptote: x = 0
Horizontal asymptote: y = q
Graph: two branches

Exponential   y = a·bˣ + q

b > 1: growth curve
0 < b < 1: decay curve
Horizontal asymptote: y = q

Why revise these now?

The inverses of all four function types appear in the Grade 12 curriculum. Understanding each function's shape, asymptotes, and key points is essential before reversing them to find their inverses.

Worked Examples

  1. 1
    Identify the form: y = ax + q where a = 2 and q = −3.
  2. 2
    Gradient = 2 — the line rises by 2 units for every 1 unit across.
  3. 3
    y-intercept: set x = 0 → y = 2(0) − 3 = −3. Plot the point (0, −3).
  4. 4Find a second point: let x = 2 → y = 2(2) − 3 = 4 − 3 = 1. Plot the point (2, 1).
  5. 5Draw a straight line through (0, −3) and (2, 1). ✓
AnswerGradient = 2, y-intercept = (0, −3), second point (2, 1)
  1. 1
    Identify the form: y = ax² + q where a = 1 and q = −4.
  2. 2
    Since a = 1 > 0, the parabola opens upward.
  3. 3
    Turning point: (0, q) = (0, −4). This is the lowest point on the graph.
  4. 4
    x-intercepts: set y = 0 → 0 = x² − 4 → x² = 4 → x = ±2. Plot (−2, 0) and (2, 0).
  5. 5Sketch the parabola opening upward through (−2, 0), (0, −4), and (2, 0). ✓
AnswerTurning point (0, −4), x-intercepts at x = ±2
  1. 1
    Identify the form: y = a/x + q where a = 3 and q = 1.
  2. 2
    Vertical asymptote: the denominator is zero when x = 0, so the vertical asymptote is x = 0.
  3. 3
    Horizontal asymptote: as x → ±∞, the term 3/x → 0, so y → q = 1. The horizontal asymptote is y = 1.
  4. 4Find a point: let x = 1 → y = 3/1 + 1 = 4. Plot (1, 4). Let x = −1 → y = 3/(−1) + 1 = −2. Plot (−1, −2).
  5. 5Sketch two branches approaching both asymptotes, passing through (1, 4) and (−1, −2). ✓
AnswerVertical asymptote: x = 0, horizontal asymptote: y = 1
  1. 1
    Identify the form: y = a·bˣ + q where a = 1, b = 2, q = −2.
  2. 2
    Since b = 2 > 1, this is an exponential growth curve.
  3. 3
    Horizontal asymptote: as x → −∞, 2ˣ → 0, so y → q = −2. The asymptote is y = −2.
  4. 4
    y-intercept: set x = 0 → y = 2⁰ − 2 = 1 − 2 = −1. Plot (0, −1).
  5. 5Find a second point: let x = 1 → y = 2¹ − 2 = 0. Plot (1, 0).
  6. 6Sketch the curve approaching y = −2 from above on the left, rising steeply to the right. ✓
AnswerHorizontal asymptote: y = −2, y-intercept (0, −1)
✓

2. 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.
↔

3. 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 1/f(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) ≠ 1/f(x)

The notation f⁻¹ means the inverse function (swapping inputs and outputs), not the reciprocal. For example, if f(x) = 2x, then f⁻¹(x) = x/2, 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. 3Solve 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 = 6/3 = 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 1/f(x) = 1/x².
  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) ≠ 1/x². 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.
🔄

4. 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 = ±√(x/a) is NOT a function. We must restrict the domain (e.g. x ≥ 0) so that only y = +√(x/a) 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
Next: Exponential and Logarithmic Functions→
←Back to Grade 12