Relations and Functions • Topic 3 of 3

Functions and Standard Real Functions

A function $f$ from $A$ to $B$, written $f : A \to B$, is a special relation in which every element of $A$ is paired with exactly one element of $B$. Two conditions are packed into "exactly one":

  • Existence: no input is left out — every $a \in A$ has an image.
  • Uniqueness: no input has two outputs — you can never have both $(a, b)$ and $(a, c)$ with $b \ne c$.

We write $b = f(a)$ for the unique image of $a$. The set $A$ is the domain, $B$ the codomain, and the set of actual images $\{f(a) : a \in A\}$ is the range (a subset of $B$). The quick visual test: in an arrow diagram, every dot of $A$ must have exactly one arrow leaving it.

Real functions and natural domain. A real function has domain and codomain that are subsets of $\mathbb{R}$. When a function is given only by a formula, its natural domain is the largest set of real inputs for which the formula gives a real number. Two rules cover almost every case: a denominator may not be zero, and the expression under an even root must not be negative.

Standard real functions and their graphs. These recur throughout the syllabus and are worth memorising:

FunctionRuleDomainRange
Identity$f(x) = x$$\mathbb{R}$$\mathbb{R}$
Constant$f(x) = c$$\mathbb{R}$$\{c\}$
Polynomial$f(x) = a_n x^n + \dots + a_0$$\mathbb{R}$depends on degree
Rational$f(x) = \dfrac{p(x)}{q(x)}$$\{x : q(x) \ne 0\}$depends
Modulus$f(x) = |x|$$\mathbb{R}$$[0, \infty)$
Signum$f(x) = \dfrac{|x|}{x},\ x \ne 0$$\mathbb{R}$$\{-1, 0, 1\}$
Greatest integer$f(x) = [x]$$\mathbb{R}$$\mathbb{Z}$

The modulus function $|x|$ equals $x$ for $x \ge 0$ and $-x$ for $x < 0$ — a V-shaped graph with its vertex at the origin. The signum function returns the sign of $x$ ($1$ if positive, $-1$ if negative, $0$ at zero). The greatest-integer (floor) function $[x]$ gives the greatest integer not exceeding $x$, so $[2.7] = 2$ but $[-2.7] = -3$ (it rounds down, towards $-\infty$); its graph is a staircase of horizontal steps.

Algebra of real functions. If $f$ and $g$ are real functions with domains $D_f$ and $D_g$, new functions are built pointwise on the common domain $D_f \cap D_g$:

$$(f \pm g)(x) = f(x) \pm g(x), \qquad (fg)(x) = f(x)\,g(x), \qquad (cf)(x) = c\,f(x)$$
$$\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, \quad \text{defined where } g(x) \ne 0$$

The sum, difference and product are defined on $D_f \cap D_g$; the quotient $f/g$ additionally excludes the points where $g(x) = 0$, and $cf$ is the scalar multiple by a real constant $c$.

Finding domain and range of an expression. For the domain, list every constraint (no zero denominators, no negative even-roots) and intersect them. For the range, reason about the output: a square root is $\ge 0$; a modulus is $\ge 0$; a square is $\ge 0$; then track how these shift and scale. For example $|x - 2| + 1 \ge 1$, so its range is $[1, \infty)$.

Deeper Insight — "exactly one output" is the whole idea, and everything downstream depends on it: A function is not just any rule connecting inputs to outputs; it is the disciplined kind where each input commits to a single answer. That one restriction is what makes $f(a)$ a well-defined thing you can compute, graph, differentiate and integrate later — if an input could have two outputs, "the value of $f$ at $a$" would be meaningless. The vertical-line test for graphs is exactly this rule drawn out: any vertical line meets the graph at most once. Everything you will study in Limits, Continuity, Differentiation and Integration is the study of functions, so the habit to build now is automatic: before trusting any formula, ask "what inputs are legal?" (the domain) and "does each give one output?" (the function condition). Get those two reflexes right and the rest of calculus has a solid floor to stand on.

Modulus and greatest-integer function graphs f(x) = |x|xyV-shape, range [0, ∞) f(x) = [x] (step)jumps at each integer, range ℤ
1
Worked Example
Is $R = \{(1,2),(2,3),(1,4)\}$ from $A=\{1,2\}$ a function? Why or why not?
Solution
  1. Check the uniqueness condition: each first component must appear once.
  2. Here $1$ appears in both $(1,2)$ and $(1,4)$ — the input $1$ has two outputs.

Answer: No — it is not a function, because the input $1$ is mapped to both $2$ and $4$.

2
Worked Example
Find the domain of $f(x) = \dfrac{1}{x^2 - 4}$.
Solution
  1. The denominator must not be zero: $x^2 - 4 \ne 0$.
  2. $x^2 = 4 \Rightarrow x = \pm 2$, so exclude these.

Answer: Domain $= \mathbb{R} \setminus \{-2, 2\}$.

3
Worked Example
Find the domain and range of $f(x) = \sqrt{x - 3}$.
Solution
  1. Even root needs a non-negative radicand: $x - 3 \ge 0 \Rightarrow x \ge 3$.
  2. The square root itself is always $\ge 0$.

Answer: Domain $= [3, \infty)$; range $= [0, \infty)$.

4
Worked Example
Evaluate the greatest integer function: $[2.7]$, $[-2.7]$ and $[5]$.
Solution
  1. $[x]$ is the greatest integer not exceeding $x$ (rounds down towards $-\infty$).
  2. $[2.7] = 2$; $[-2.7] = -3$ (since $-3 \le -2.7 < -2$); $[5] = 5$.

Answer: $[2.7] = 2$, $[-2.7] = -3$, $[5] = 5$.

5
Worked Example
If $f(x) = x^2$ and $g(x) = 2x + 1$, find $(f + g)(x)$ and $(fg)(2)$.
Solution
  1. $(f+g)(x) = f(x) + g(x) = x^2 + 2x + 1$.
  2. $(fg)(2) = f(2)\,g(2) = 4 \times 5 = 20$.

Answer: $(f+g)(x) = x^2 + 2x + 1$ and $(fg)(2) = 20$.

6
Worked Example
Find the range of $f(x) = |x - 2| + 1$.
Solution
  1. The modulus is always $\ge 0$, so $|x-2| \ge 0$.
  2. Adding $1$: $|x-2| + 1 \ge 1$, with equality at $x = 2$.

Answer: Range $= [1, \infty)$.

7
Worked Example
Sketch-describe and give the range of the signum function $f(x) = \dfrac{|x|}{x}$ for $x \ne 0$, with $f(0) = 0$.
Solution
  1. For $x > 0$, $|x| = x$, so $f(x) = x/x = 1$.
  2. For $x < 0$, $|x| = -x$, so $f(x) = -x/x = -1$.
  3. At $x = 0$ the value is defined to be $0$.

Answer: $f(x) = 1$ for $x>0$, $-1$ for $x<0$, $0$ at $x=0$; the range is $\{-1, 0, 1\}$.

8
Worked Example
If $f(x) = x^2 + 1$ and $g(x) = x - 1$, find $\left(\dfrac{f}{g}\right)(x)$ and state its domain.
Solution
  1. $\left(\dfrac{f}{g}\right)(x) = \dfrac{x^2 + 1}{x - 1}$.
  2. The quotient is undefined where $g(x) = 0$, i.e. $x = 1$.
  3. Both $f$ and $g$ have domain $\mathbb{R}$, so only $x = 1$ is excluded.

Answer: $\left(\dfrac{f}{g}\right)(x) = \dfrac{x^2 + 1}{x - 1}$, with domain $\mathbb{R} \setminus \{1\}$.

9
Worked Example
Find the domain of $f(x) = \dfrac{\sqrt{x + 2}}{x - 3}$.
Solution
  1. Even root: $x + 2 \ge 0 \Rightarrow x \ge -2$.
  2. Denominator non-zero: $x - 3 \ne 0 \Rightarrow x \ne 3$.
  3. Intersect the two constraints.

Answer: Domain $= [-2, \infty) \setminus \{3\}$, i.e. $[-2, 3) \cup (3, \infty)$.

10
Worked Example
Identify the type of each function and give its range: (a) $f(x) = 7$, (b) $f(x) = x$, (c) $f(x) = |x|$.
Solution
  1. (a) Output is always $7$ — a constant function; range $= \{7\}$.
  2. (b) Output equals input — the identity function; range $= \mathbb{R}$.
  3. (c) The modulus function; $|x| \ge 0$ always, so range $= [0, \infty)$.

Answer: (a) constant, range $\{7\}$; (b) identity, range $\mathbb{R}$; (c) modulus, range $[0, \infty)$.

11
Worked Example
If $f(x) = 2x - 3$ and $g(x) = x^2$, find $(f - g)(x)$ and $(3f)(x)$, and evaluate $(f - g)(2)$.
Solution
  1. $(f - g)(x) = f(x) - g(x) = (2x - 3) - x^2$.
  2. $(3f)(x) = 3\,f(x) = 3(2x - 3) = 6x - 9$.
  3. $(f - g)(2) = (4 - 3) - 4 = 1 - 4 = -3$.

Answer: $(f - g)(x) = 2x - 3 - x^2$, $(3f)(x) = 6x - 9$, and $(f - g)(2) = -3$.

12
Worked Example
Find the range of $f(x) = \dfrac{x^2}{1 + x^2}$.
Solution
  1. Write $y = \dfrac{x^2}{1 + x^2}$ and solve for $x^2$: $y(1 + x^2) = x^2 \Rightarrow y = x^2(1 - y) \Rightarrow x^2 = \dfrac{y}{1 - y}$.
  2. Need $x^2 \ge 0$ and $1 - y \ne 0$: the fraction $\dfrac{y}{1-y} \ge 0$ holds for $0 \le y < 1$.
  3. $y = 1$ is impossible (denominator zero); $y = 0$ occurs at $x = 0$.

Answer: Range $= [0, 1)$.

Key Points

  • A function $f : A \to B$ is a relation in which every input has exactly one output; no input is skipped and none has two images.
  • Notation: $b = f(a)$; $A$ is the domain, $B$ the codomain, and $\{f(a) : a \in A\}$ the range (a subset of $B$).
  • Natural domain rules: denominators $\ne 0$ and expressions under even roots $\ge 0$.
  • Know the standard graphs: identity $x$, constant $c$, modulus $|x|$ (V-shape), signum (range $\{-1,0,1\}$) and greatest-integer $[x]$ (staircase, rounds towards $-\infty$).
  • Algebra of functions on $D_f \cap D_g$: $(f \pm g)(x) = f(x) \pm g(x)$, $(fg)(x) = f(x)g(x)$, $(cf)(x) = c\,f(x)$.
  • The quotient $(f/g)(x) = f(x)/g(x)$ is defined only where $g(x) \ne 0$.
  • For range, exploit non-negativity: squares, moduli and even roots are all $\ge 0$, then track shifts and scalings.
  • Every function is a relation, but not every relation is a function — the vertical-line test captures the difference.
Tap an option to check your answer0 / 4
Q1.A function from $A$ to $B$ assigns to each element of $A$:
Explanation: A function gives each input exactly one output.
Q2.The domain of $f(x)=\dfrac{1}{x-2}$ is:
Explanation: The denominator must be non-zero.
Q3.The range of $f(x)=x^2$ (with $f:\mathbb{R}\to\mathbb{R}$) is:
Explanation: Squares are non-negative.
Q4.The domain of $f(x)=\sqrt{x}$ is:
Explanation: The radicand must be non-negative.