Relations and functions
Overview
A relation connects members of one set with members of another set. A function is a special relation in which each input has exactly one output.
This topic helps learners describe patterns using ordered pairs, tables, rules, and function notation. It prepares learners for Domain and range, Inverse relations and functions, Graphs of relations and functions, and later algebra work where a rule such as $f(x)=3x^2$ must be interpreted correctly.
The central habit in this chapter is to read every representation from the input side to the output side. Ask: "What value goes in?", "What value comes out?", and "Does any input try to produce two different outputs?" Those three questions prevent most early mistakes with functions.
+ Syllabus Alignment
- Subject: Mathematics
- Level: CSEE
- Form: Mathematics Form III
- Competence: Use geometry, approximations, relations, and functions in various contexts
- Source topic ID:
topic-relations-and-functions - Hub: Algebra And Matrices
This page expands the official Form III Mathematics syllabus topic Relations and functions. The syllabus remains the authority for topic placement and scope. Exam records are used only as unreviewed assessment signals until checked against original papers.
Prerequisites
- Sets, subsets, operations with sets, and Venn diagrams of two sets - Relations and functions use sets of inputs and outputs.
- Coordinate geometry: gradient and straight-line equations - Relations are often written as ordered pairs and later plotted on axes.
- Algebraic expressions and equations - Function rules are usually algebraic expressions.
- Exponents - Some function rules include powers such as $x^2$.
Learning Scope
This chapter covers the meaning of a relation, the meaning of a function, ordered-pair notation, mapping diagrams, function notation, evaluation of a function at given inputs, table building, and simple recognition of whether a relation is a function.
This page does not fully teach domain and range, inverse functions, or graph sketching. Those are treated in the linked pages, while this page builds the language needed for them.
Subtopics
Relations
A relation is any rule, description, or collection of ordered pairs that connects inputs to outputs. If $A=\{1,2,3\}$ and $B=\{2,4,6\}$, one relation from $A$ to $B$ can be:
$$ R=\{(1,2),(2,4),(3,6)\} $$
The first number in each ordered pair is the input. The second number is the output.
Key insight: A relation may connect one input to one output, one input to many outputs, or some inputs to no output at all.
Why this works: an ordered pair keeps the direction clear. In $(1,2)$, the relation sends $1$ to $2$. The pair $(2,1)$ would mean a different connection because the input and output have changed places.
Relations can be described in several equivalent ways:
- As words: "multiply the input by $2$."
- As a rule: $y=2x$.
- As ordered pairs: $\{(1,2),(2,4),(3,6)\}$.
- As a table with an input column and an output column.
- As a mapping diagram with arrows from inputs to outputs.
Functions
A function is a relation where every input in the domain has exactly one output.
For example:
$$ f=\{(1,3),(2,5),(3,7)\} $$
is a function because no input is repeated with a different output.
But:
$$ g=\{(1,3),(1,5),(2,7)\} $$
is not a function because input $1$ has two different outputs, $3$ and $5$.
Key insight: Repeated outputs are allowed. Repeated inputs with different outputs are not allowed in a function.
A quick test is to make a list of inputs only. If an input occurs more than once, compare its outputs. The relation fails the function test only when the same input is matched to two different outputs.
This is why $\{(1,4),(2,4),(3,4)\}$ is a function. The output $4$ repeats, but each input has one clear answer.
Function Notation
The notation $f(x)$ means "the output of function $f$ when the input is $x$." It does not mean $f \times x$.
If:
$$ f(x)=2x+1 $$
then the output when $x=4$ is:
$$ f(4)=2(4)+1=9 $$
Why this notation is useful: the letter $f$ names the rule, while the value inside the brackets names the input being used at that moment. So $f(4)$ asks for the output when the input is $4$, and $f(a)$ asks for the output when the input is $a$.
When substituting a negative input, brackets protect the sign:
$$ f(-3)=2(-3)+1=-5 $$
Tables Of Values
A function can be represented by a table. For $f(x)=x^2-1$:
| $x$ | $f(x)$ | |---:|---:| | $-2$ | $3$ | | $-1$ | $0$ | | $0$ | $-1$ | | $1$ | $0$ | | $2$ | $3$ |
The same function can also be written as ordered pairs:
$$ \{(-2,3),(-1,0),(0,-1),(1,0),(2,3)\} $$
To build a table safely, use the same routine for every row:
- Copy the input.
- Substitute the input into the rule using brackets.
- Simplify carefully.
- Write the output beside the input.
Piecewise Function Rules
Some functions use different rules for different input intervals. For example:
$$ f(x)= \begin{cases} x+1, & -4 \le x < 0 \\ 2, & 0 \le x \le 5 \end{cases} $$
To evaluate this function, first decide which interval contains the input, then use the matching rule.
Key insight: In a piecewise function, the interval condition is part of the rule. Do not substitute before checking the interval.
The interval signs decide which rule is active. For example, if one branch says $-4 \le x < 0$, then $x=0$ is not in that branch because the sign before $0$ is $<$. A learner should check the endpoint signs before doing any arithmetic.
Key Terms
- Relation: A connection between inputs and outputs, often shown by ordered pairs, a table, a mapping, a graph, or a rule.
- Function: A relation in which each input has exactly one output.
- Input: The value placed into a relation or function.
- Output: The value produced by a relation or function.
- Ordered pair: A pair $(x,y)$ where order matters; usually $x$ is the input and $y$ is the output.
- Function notation: A notation such as $f(x)$ used to name the output of a function.
- Mapping: A representation showing how inputs are connected to outputs.
Worked Examples
Example 1: Decide Whether A Relation Is A Function
Given:
$$ R=\{(2,5),(3,5),(4,7),(5,9)\} $$
Decide whether $R$ is a function.
The inputs are:
$$ 2,\ 3,\ 4,\ 5 $$
Each input appears once, so each input has exactly one output.
Therefore, $R$ is a function.
Check:
| Input | Output | | ---: | ---: | | $2$ | $5$ | | $3$ | $5$ | | $4$ | $7$ | | $5$ | $9$ |
The output $5$ appears twice, but that is allowed. The warning sign would be one input appearing with two different outputs.
Example 2: Evaluate A Function
If $f(x)=3x^2-2x$, find $f(-2)$.
Substitute $x=-2$:
$$ \begin{aligned} f(-2) &= 3(-2)^2-2(-2) \\ &=3(4)+4 \\ &=12+4 \\ &=16 \end{aligned} $$
So $f(-2)=16$.
Check:
Since the rule contains $x^2$, the square part is never negative. The term $-2(-2)$ also becomes positive. So a positive answer is reasonable.
Example 3: Use A Piecewise Rule
Given:
$$ f(x)= \begin{cases} -2, & 0 < x \le 5 \\ x+1, & -6 \le x < 0 \end{cases} $$
Find $f(4)$ and $f(-5)$.
Since $4$ is in $0 < x \le 5$:
$$ f(4)=-2 $$
Since $-5$ is in $-6 \le x < 0$:
$$ f(-5)=-5+1=-4 $$
Therefore:
$$ f(4)=-2,\quad f(-5)=-4 $$
Check:
- For $x=4$, do not use $x+1$ because $4$ is not in $-6 \le x < 0$.
- For $x=-5$, do not use $-2$ because $-5$ is not in $0 < x \le 5$.
Example 4: Build A Table And Ordered Pairs
For $p(x)=2x-3$, make a table for $x=-1,0,1,2$ and write the ordered pairs.
Use one row at a time:
| $x$ | Working | $p(x)$ | | ---: | --- | ---: | | $-1$ | $2(-1)-3=-2-3$ | $-5$ | | $0$ | $2(0)-3=0-3$ | $-3$ | | $1$ | $2(1)-3=2-3$ | $-1$ | | $2$ | $2(2)-3=4-3$ | $1$ |
So the ordered pairs are:
$$ \{(-1,-5),(0,-3),(1,-1),(2,1)\} $$
Check:
Each time $x$ increases by $1$, the output increases by $2$. That matches the coefficient $2$ in $2x-3$.
Example 5: Find The Input From The Output
A function is defined by $g(x)=4x-1$. Find the input when $g(x)=15$.
The statement $g(x)=15$ means the output is $15$:
$$ 4x-1=15 $$
Solve:
$$ \begin{aligned} 4x-1 &= 15 \\ 4x &= 16 \\ x &= 4 \end{aligned} $$
Check by substituting:
$$ g(4)=4(4)-1=16-1=15 $$
So the input is $4$.
Example 6: Recognize A Relation That Is Not A Function
Given:
$$ T=\{(0,1),(1,2),(1,4),(2,5)\} $$
The input list is:
$$ 0,\ 1,\ 1,\ 2 $$
The input $1$ appears twice. Now compare the outputs attached to $1$:
$$ (1,2)\quad \text{and}\quad (1,4) $$
The same input gives two different outputs, so $T$ is not a function.
Warning sign:
If a repeated input has the same output, such as $(1,2)$ and $(1,2)$, that is only repetition. If a repeated input has different outputs, the relation is not a function.
Common Mistakes
- Treating $f(x)$ as multiplication. Correction: $f(x)$ means the output of function $f$ at input $x$. Warning sign: if you start looking for a value of $f$ to multiply by $x$, pause and reread the notation.
- Calling every relation a function. Correction: check whether any input has more than one output. Warning sign: the question uses ordered pairs, a mapping, or a table and asks "is it a function?"
- Rejecting a function because two inputs share one output. Correction: repeated outputs are allowed. Warning sign: you are looking down the output column instead of the input column.
- Ignoring a repeated input. Correction: when an input repeats, compare its outputs. If they are different, the relation is not a function.
- Substituting into a piecewise function before checking the interval. Correction: choose the correct branch first. Warning sign: the rule is written with braces and interval conditions.
- Dropping negative signs during substitution. Correction: use brackets, especially in expressions like $(-2)^2$. Warning sign: your answer changes if you type the expression into a calculator with brackets.
- Mixing input and output positions in ordered pairs. Correction: in $(x,y)$, the first value is the input and the second value is the output. Warning sign: your table has the rule working backwards.
- Forgetting to check an answer. Correction: substitute the input back into the original rule or reread the ordered pairs to see whether the result matches.
Practice Tasks
Foundation
- In each ordered pair, identify the input and output: $(3,7)$, $(-2,5)$, $(0,-4)$.
- Write the ordered pairs represented by the rule $y=2x+3$ for $x=0,1,2,3$.
- Explain in one sentence why $f(6)$ does not mean $f \times 6$.
Skill-Building
- Decide whether $\{(1,4),(2,4),(3,6),(4,8)\}$ is a function. Give a reason.
- Decide whether $\{(1,4),(1,6),(2,8)\}$ is a function. Give a reason.
- If $f(x)=x^2+2x-3$, find $f(0)$, $f(2)$, and $f(-3)$. Show substitution for the negative input.
- Create a table of values for $h(x)=3x^2$ using $x=0,1,2,3,4$.
Exam-Style
- A function is defined by $g(x)=4x-1$. Find the input $x$ when $g(x)=15$, and check your answer.
- Given $p(x)=x^2-4x+1$, find $p(-1)$ and $p(5)$. State one check that helps you trust your arithmetic.
- For
$$ q(x)= \begin{cases} x+3, & -2 \le x < 1 \\ 2x, & 1 \le x \le 4 \end{cases} $$ find $q(-2)$, $q(1)$, and $q(4)$.
Challenge
- Give an example of a relation that is not a function and explain why.
- Give an example of a function where two different inputs have the same output. Explain why it is still a function.
- Create a relation with four ordered pairs that becomes a function only after one ordered pair is removed. Identify the pair you would remove.
Generated Question Layer
- Recognition questions: identify relations, functions, inputs, outputs, and ordered pairs.
- Evaluation questions: substitute positive, zero, and negative values into function rules.
- Representation questions: convert between tables, ordered pairs, mapping descriptions, and rules.
- Reasoning questions: explain why a relation is or is not a function.
- Piecewise questions: choose the correct branch before evaluating.
Learner Aid Opportunities
- chart: Build a relation-versus-function organizer with columns for definition, allowed patterns, not-allowed patterns, and a learner check question.
- diagram: Prepare mapping diagrams for one-to-one, many-to-one, and one-to-many cases, with the one-to-many case labelled as relation but not function.
- interactive: Design a sorting task where learners drag tables, mappings, and ordered-pair sets into function or not function, then must state the repeated-input evidence.
- LLM tutor: Use a prompt routine that asks learners to list inputs first, mark repeated inputs, compare outputs, and then give the final classification.
Exam-Derived Signals
These signals are assessment leads, not verified official past-question links. They should be checked against original papers and marking schemes before being used as final learner-facing references.
| Source | Current Signal | Review Status | Use Carefully As | | --- | --- | --- | --- | | data/exam_format_topic_crosswalk_2022.jsonl | Official 2022 format group Linear Programming/Functions/Relations maps to this topic and sibling pages; one item; weight 7.14. | Official format mapping; topic-page use still unreviewed. | Evidence that functions and relations belong to a tested format group. | | data/topic_frequency_2021_2025.json | topic-relations-and-functions has total count 3 in the 2021-2025 extraction set. | Unreviewed aggregate. | Rough retrieval priority, not a final frequency claim. | | data/question_map_2021_2025.jsonl | Examples include function evaluation and inverse-function notation in 2022, a piecewise function in 2023, a quadratic function context in 2024, and a secondary link inside a 2025 linear-programming formulation item. | mapped_unreviewed. | Leads for future reviewed past-question linking. |
Source And Review Notes
- Topic registry status: official in
data/curriculum_map.json. - Learner expansion status: original prose drafted from the official syllabus topic and local assessment signals.
- Exam mapping status: unreviewed except for the official exam-format crosswalk group.
- Review risk: relation/function signals sometimes overlap with domain, range, inverse functions, graphs, and linear programming, so future review should decide the best primary page for each past-question link.