# Function definitions and notation

> IB Mathematics: Analysis and Approaches HL · IB AA HL
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u2-function-definitions-and-notation/

This sub-topic covers the core definition of a function, standard IB notation, and key concepts of domain, codomain and range. You will learn how to test whether a relation is a function, the foundation for all further work on functions.

**Prerequisites:** [Basic set notation and interval notation for real numbers](https://www.owlsprep.com/study/ib-math-aa-hl-u1-set-notation/)

## Learning objectives

- Define a function as a unique mapping between sets of inputs and outputs
- Correctly use all standard function notation for IB AA HL
- Calculate domain and range for functions given by an equation
- Distinguish between functions and non-functions using the vertical line test

## Core Definition of a Function

**Function** — A function is a mapping from a domain set \(A\) (inputs) to a codomain set \(B\) (possible outputs) where **every element in the domain maps to exactly one element in the codomain**.

*Notation:* f: A \to B

*Example:* The rule \(f(x) = x^2\) mapping real numbers to real numbers is a function.

Functions can be represented in four common ways: as a mapping diagram, an algebraic equation, a table of values, or a graph. The key requirement of one output per input holds in all representations.

**Worked example:** Determine which of the following mapping diagrams represents a function: (1) Inputs {1, 2, 3} map to outputs {2, 4, 6}: 1→2, 2→4, 3→4. (2) Inputs {1, 2, 3} map to outputs {2, 4, 6}: 1→2, 1→4, 2→6.

1. Recall the core requirement: every input must map to exactly one output for the relation to be a function.
2. Check mapping 1: All inputs 1, 2, 3 each have exactly one output. Multiple inputs can map to the same output, this is allowed.
3. Conclusion: Mapping 1 is a function.
4. Check mapping 2: Input 1 maps to two different outputs (2 and 4). This violates the function definition.
5. Conclusion: Mapping 2 is not a function.

> **Exam tip:** If an input maps to more than one output it is never a function. If multiple inputs map to one output it is always a function.

## Notation, Domain and Range

**Domain** — The set of all valid input values for the function. If no domain is explicitly stated, we use the *implied domain*, which is all real numbers for which the function rule is defined.

*Example:* For \(f(x) = \sqrt{x}\), the implied domain is \(x \geq 0\).

**Range** — The set of all actual output values produced by the function, which is always a subset of the codomain.

*Example:* For \(f(x) = \sqrt{x}\), the range is also \(f(x) \geq 0\).

IB uses two standard forms for function notation: explicit form \(f: A \to B, f(x) = x^2\) that states domain and codomain, and implicit form \(f(x) = x^2\) that relies on the implied domain convention.

**Worked example:** Find the implied domain and range of \(f(x) = \frac{1}{x - 2}\), where \(x \in \mathbb{R}\).

1. To find domain, identify values that make the function undefined. A fraction is undefined when the denominator is 0:
2. $$x - 2 = 0 \implies x = 2$$
3. The implied domain is all real numbers except 2:
4. $$\text{Domain} = \{x \in \mathbb{R} \mid x \neq 2\}$$
5. To find range, let \(y = \frac{1}{x-2}\) and rearrange to solve for x in terms of y:
6. $$y(x - 2) = 1 \implies x = \frac{1}{y} + 2$$
7. x is undefined when \(y = 0\), so no input produces an output of 0. The range is:
8. $$\text{Range} = \{y \in \mathbb{R} \mid y \neq 0\}$$

## The Vertical Line Test for Graphs

When a relation is given as a graph on the \(x\)-\(y\) plane, we can quickly test if it is a function of \(x\) using the vertical line test.

> **tip**
>
> The vertical line \(x = a\) crosses the graph at all points with input \(x = a\). If it crosses more than once, one input maps to multiple outputs, so the relation is not a function.

**Worked example:** Does the graph of the unit circle \(x^2 + y^2 = 1\) represent a function of \(x\)?

1. Draw a vertical line at \(x = 0\). This line intersects the unit circle at two points: \((0, 1)\) and \((0, -1)\).
2. A single input \(x = 0\) maps to two different outputs, \(y = 1\) and \(y = -1\).
3. By the vertical line test, the unit circle is not a function of \(x\).

**Check your understanding**

Test your understanding: Which of these relations is a function of \(x\)?

1. $y = 3x + 2$

   - Yes
   - No

   *Answer:* Yes

   *Why:* Every value of \(x\) maps to exactly one value of \(y\), so this is a function.

2. $y^2 = x$

   - Yes
   - No

   *Answer:* No

   *Why:* For any \(x > 0\), there are two values of \(y\) (positive and negative root), so this is not a function.

## Common pitfalls

- **Wrong:** Claiming a relation is not a function because multiple inputs share the same output
  - Why it fails: The only requirement for a function is one output per input, multiple inputs can map to the same output
  - Correct: Only check that each input has exactly one output, overlapping outputs do not violate the function definition
- **Wrong:** Confusing codomain and range, stating the entire codomain as the range
  - Why it fails: Codomain is the set of all possible outputs, while range only includes outputs that actually occur
  - Correct: Always calculate the range explicitly from the function rule and domain
- **Wrong:** Forgetting to exclude values that make denominators zero or square root arguments negative when finding implied domain
  - Why it fails: Implied domain requires all real numbers where the function rule is defined
  - Correct: Always check for division by zero and negative arguments to even roots when calculating domain
- **Wrong:** Using the horizontal line test to check if a relation is a function
  - Why it fails: The horizontal line test checks if a function is one-to-one, not if a relation is a function
  - Correct: Always use the vertical line test to check if a relation is a function of \(x\)

## Cheatsheet

| Concept | Key Meaning | Standard Notation |
| --- | --- | --- |
| Function | One output per input | $f: A \to B$, $f(x)$ |
| Domain | Set of all valid inputs | $\{x \in \mathbb{R} \mid \dots\}$ |
| Range | Set of all actual outputs | $\{y \in \mathbb{R} \mid \dots\}$ |
| Implied Domain | Domain when not stated explicitly | All reals where rule is defined |
| Vertical Line Test | Test if relation is function of $x$ | Multiple intersections = not function |

## What's next

Understanding function definitions and notation is the foundation for every other topic in the IB AA HL functions unit, from composite and inverse functions to graph transformations, and all further function topics including polynomials, rational functions, exponentials and logarithms. Mastering the core definition of a function and correctly calculating domain and range will help you avoid costly, easy-to-prevent mistakes in both paper 1 and paper 2 questions, regardless of the topic. Clear understanding of notation is critical for interpreting exam questions correctly and writing solutions that examiners can mark easily. Next, you will build on this foundation to learn more advanced function concepts.

- [Domain and Range](https://www.owlsprep.com/study/ib-math-aa-hl-u2-domain-and-range/)
- [Composite and inverse functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-composite-and-inverse-functions/)
- [Transformations of functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-transformations-of-functions/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u2-function-definitions-and-notation/
