The Basics of Functions (Leaving Cert Mathematics): Revision Notes
The Basics of Functions
What is a function?
A function is like a machine that takes an input number, follows a specific rule, and produces an output number. Think of it as a mathematical recipe that always gives the same result when you put in the same ingredient.
Key Definition: In mathematics, we use the word function for any rule that produces one output value only for each input value.
Function machines
Function machines (also called flow charts) show us visually how functions work. They consist of:
- Input: The number that goes into the machine
- Rule: The operations performed on the input
- Output: The result that comes out
For example, consider this function machine:
7 → [multiply by 4] → [add 1] → 29
Here, 7 is the input, the rule is "multiply by 4 and add 1", and 29 is the output.
If we use x for the input and y for the output, we can write this rule as:
- , or
Real-life examples of functions
Functions are everywhere in daily life:
- A calculator: input 6, press , output is 36
- A barcode scanner: scan a book's barcode (input), the price appears (output)
- Farming: apply fertiliser (input), crop yield increases (output)
These examples help us understand that functions are not just abstract mathematical concepts - they represent relationships we encounter every day where one thing consistently leads to another specific result.
Domain, range and mapping diagrams
Key definitions
- Domain: The set of all possible input values
- Range: The set of all actual output values
- Mapping diagram: A visual way to show how inputs connect to outputs
Understanding mapping diagrams
Consider the function machine: [multiply by 5] → [subtract 4]
If we input the numbers {1, 2, 3, 4, 5, 6}, we get outputs {1, 6, 11, 16, 21, 26}.
This can be shown in a mapping diagram:
Domain Range
(Input) (Output)
1 --------→ 1
2 --------→ 6
3 --------→ 11
4 --------→ 16
5 --------→ 21
6 --------→ 26
The Function Rule: In the mapping diagram, notice that each input has exactly one output. This is the key rule for functions.
Identifying functions
When looking at mapping diagrams, a relationship is a function if and only if:
- Each element in the domain maps to one and only one element in the range
Examples of functions vs non-functions
Function example: {(1,4), (2,5), (3,6), (4,7)} ✓
- Each input (1,2,3,4) has exactly one output
Non-function example: {(2,7), (3,8), (3,9), (4,12)} ✗
- Input 3 has two different outputs (8 and 9), so this is not a function
Couples and ordered pairs
Functions can be written as sets of couples or ordered pairs in the form (input, output).
Rules for couples
When a function is written as couples:
- No two distinct couples will have the same input
- The first number in each pair is the input
- The second number in each pair is the output
Example: {(1,4), (2,5), (3,6), (4,7)} represents a function because no input appears twice.
Function notation
There are three common ways to write the same function rule:
The three notations
For the rule "double the number and add 4":
- f(x) = 2x + 4 (function notation)
- f: x → 2x + 4 (mapping notation)
- y = 2x + 4 (equation form)
All three tell us that if the input is 3, the output is . We can write this as f(3) = 10.
Using function notation
If and we want to find :
- Substitute into the rule
The codomain
Understanding the difference between these three important concepts:
- Domain: The set of inputs = {1, 2, 3}
- Range: The set of actual outputs = {1, 3, 5}
- Codomain: The set of possible outputs = {1, 3, 5, 7, 9, 11}
Key Point: The range is always a subset of the codomain. The codomain includes all possible outputs, while the range only includes the outputs that actually occur.
Worked example
Worked Example: Finding Domain, Range and Couples
Question: A function is defined as . The domain of is {0, 1, 2, 3, 4}. Represent on a mapping diagram and write out the couples generated. What is the range of ?
Solution:
Step 1: Calculate outputs for each input
- When :
- When :
- When :
- When :
- When :
Step 2: Create mapping diagram
Domain Range
0 --------→ -2
1 --------→ 1
2 --------→ 4
3 --------→ 7
4 --------→ 10
Step 3: Write couples The couples are: {(0, -2), (1, 1), (2, 4), (3, 7), (4, 10)}
Step 4: Identify the range
The range is {-2, 1, 4, 7, 10}
Exam tips
Important Exam Strategies
- Always check that each input has exactly one output when identifying functions
- Remember that domain = inputs, range = actual outputs, codomain = possible outputs
- Practice all three function notations: , , and
- When drawing mapping diagrams, use arrows to show the input-output relationships clearly
- In couples, the first number is always the input (x-value)
Key Points to Remember:
- A function produces exactly one output for each input
- The domain is the set of all inputs, the range is the set of all actual outputs
- Mapping diagrams visually show how inputs connect to outputs with arrows
- Functions can be written as couples like (input, output) or using function notation like
- The codomain contains all possible outputs, while the range contains only the actual outputs that occur