# Concept of functions: domain, range, graphs

> IB Mathematics Applications and Interpretation HL · IB AI HL
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u2-concept-of-functions-domain-range/

This foundational subtopic introduces the core definition of a function, the building block for all calculus, modelling and statistics in IB AI HL. You will learn to identify valid functions, calculate domain and range, and interpret key graph features.

**Prerequisites:** Basic algebraic manipulation of polynomials and roots; Set and interval notation for inequalities

## Learning objectives

- Distinguish functions from general relations using the definition and vertical line test
- Determine the domain of a function accounting for common restrictions
- Calculate and express the range of common function types
- Interpret key features of function graphs from the equation and plot

## Definition of a Function

**Function** — A relation that maps every input in the set of valid inputs to exactly one output. Multiple inputs can map to the same output, but one input can never map to multiple outputs.

*Notation:* f(x)

*Example:* f(x) = 3x - 2$ is a function, $x = y^2$ is not a function for all real $x$.

To quickly check if a graph represents a function, we use the **vertical line test**: if any vertical line crosses the graph more than once, the relation is not a function.

**Worked example:** Determine if $x^2 + y^2 = 9$ (a circle of radius 3 centered at the origin) is a function using the vertical line test.

1. Rearrange the equation to solve for $y$:
2. $$y^2 = 9 - x^2 \implies y = \pm\sqrt{9 - x^2}$$
3. For any $x$ between $-3$ and $3$, there are two distinct values of $y$ for the same input $x$.
4. When we draw any vertical line in this interval, it crosses the circle twice, which violates the function definition.
5. Conclusion: The circle is not a function.

> **Exam tip:** Only one-to-one functions pass the horizontal line test, but all functions pass the vertical line test. Don't confuse the two in exams!

## Domain and Range

**Domain and Range** — Domain: All valid input $x$ values where the function is defined. Range: All possible output $f(x)$ values the function produces.

*Example:* Domain of $f(x) = \frac{1}{x}$ is all real numbers except $0$; range is also all real numbers except $0$.

The most common domain restrictions come from three rules: (1) you cannot divide by zero, (2) you cannot take the square root of a negative number, (3) you cannot take the logarithm of a non-positive number. Always check for these first when finding domain.

**Worked example:** Find the domain and range of $f(x) = \sqrt{6 - 2x}$. State your answer in interval notation.

1. First find domain: the expression under the square root must be non-negative:
2. $$6 - 2x \geq 0 \implies 2x \leq 6 \implies x \leq 3$$
3. Write domain in interval notation, including the endpoint because $x=3$ gives $\sqrt{0} = 0$, which is valid:
4. Domain = $(-\infty, 3]$
5. Find range: the principal square root function only outputs non-negative values. As $x$ decreases, $\sqrt{6-2x}$ increases from 0 to infinity:
6. Range = $[0, \infty)$

> **info**
>
> IB exams accept both interval notation and set notation for domain and range, as long as your answer is clear and correct.

## Key Features of Function Graphs

The graph of a function $f(x)$ is the set of all points $(x, f(x))$ on the coordinate plane. For exams, you will be expected to identify the following key features from an equation or graph: x-intercepts (roots, where $f(x)=0$), y-intercept (where $x=0$), turning points, horizontal/vertical asymptotes, and intervals of increase/decrease.

**Worked example:** For $f(x) = (x+1)(x-4)$, find the x-intercepts, y-intercept, and state the range of the function.

1. Find x-intercepts where $f(x) = 0$:
2. $$(x+1)(x-4) = 0 \implies x = -1, x = 4$$
3. X-intercepts are at $(-1, 0)$ and $(4, 0)$.
4. Find y-intercept where $x=0$:
5. $$f(0) = (0+1)(0-4) = -4$$
6. Y-intercept is at $(0, -4)$.
7. This is a quadratic with positive leading coefficient, so it opens upwards with minimum value at the vertex. The vertex is at $x = 1.5$, $f(1.5) = -6.25$, so the range is:
8. $$[-6.25, \infty)$$

## Common pitfalls

- **Wrong:** Writing the domain of $\sqrt{x-4}$ as $(4, \infty)$ instead of $[4, \infty)$.
  - Why it fails: Forgetting that $x=4$ gives an output of 0, which is perfectly valid.
  - Correct: Always include endpoints when the restriction inequality is non-strict ($\geq$ or $\leq$).
- **Wrong:** Claiming a relation is not a function because a horizontal line crosses it twice.
  - Why it fails: Confusing the vertical line test (for functions) with the horizontal line test (for one-to-one functions).
  - Correct: Only the vertical line test determines if a relation is a function, regardless of what horizontal lines do.
- **Wrong:** Including the $x$ value that makes a denominator zero in the domain of a rational function.
  - Why it fails: Forgetting that division by zero is undefined, so the function does not exist at that point.
  - Correct: Always exclude any $x$ that makes any denominator equal to zero, regardless of other factors.
- **Wrong:** Stating the range of $f(x) = x^2 + 2$ as $[2, 10]$ when the domain is given as $0 \leq x \leq 3$.
  - Why it fails: Forgetting that the maximum value of a quadratic with positive leading coefficient on a closed interval occurs at one of the endpoints.
  - Correct: Check the value of the function at both endpoints of the domain interval when finding the range of a restricted quadratic.
- **Wrong:** Writing the range of $f(x) = \sqrt{x-4}$ as $(-\infty, \infty)$, matching the form of the domain.
  - Why it fails: Confusing domain and range, and forgetting the principal square root only produces non-negative outputs.
  - Correct: Always calculate domain and range separately, don't assume they are the same.

## Cheatsheet

| Function Type | Common Domain Restriction | Typical Range |
| --- | --- | --- |
| Linear $f(x) = mx + c$ | None | $(-\infty, \infty)$ |
| Quadratic $f(x) = ax^2+bx+c, a>0$ | None | $[\text{min}(f), \infty)$ |
| Rational $f(x) = 1/g(x)$ | Exclude $x: g(x) = 0$ | Depends on $g(x)$ |
| Square Root $f(x) = \sqrt{g(x)}$ | Require $g(x) \geq 0$ | $[0, \infty)$ |
| Logarithm $f(x) = \log(g(x))$ | Require $g(x) > 0$ | $(-\infty, \infty)$ |

## What's next

The concepts you learned here are the foundation for all function work in IB AI HL, appearing in every topic from calculus to statistical modelling. Mastering domain, range, and function definitions early will help you avoid avoidable mistakes in every exam question involving functions. Next, you will build on this knowledge to explore composite and inverse functions, then learn about specific function types used for modelling, before applying these concepts to differentiation and integration. Solid understanding here is critical for success in higher level topics.

- [Composition of functions and inverse functions](https://www.owlsprep.com/study/ib-math-ai-hl-u2-composition-of-functions-and-inverse/)
- [Transformations of graphs](https://www.owlsprep.com/study/ib-math-ai-hl-u2-transformations-of-graphs/)
- [Quadratic functions: roots, vertices, inequalities](https://www.owlsprep.com/study/ib-math-ai-hl-u2-quadratic-functions-roots-vertices-inequalities/)

---

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-ai-hl-u2-concept-of-functions-domain-range/
