Types of relations, functions, domain and range, and the vertical line test.
Relations and functions describe how inputs are paired with outputs. Every function is a relation, but not every relation is a function, because a function gives each input exactly one output.
In CSEC, this topic often asks you to move between representations: ordered pairs, mapping diagrams, tables, equations, and graphs. Keep track of the domain, codomain, and range, because those words describe the input choices, possible targets, and actual outputs.
A relation is simply a connection between two sets of things. It pairs up elements from one set with elements from another set.
Real-world examples:
Before we formalize relations, understand the vocabulary:
Set: A collection of objects (written in curly braces)
Ordered pair: Two elements in a specific order, written as
Cartesian product: All possible ordered pairs from two sets
A relation from set to set is a subset of the Cartesian product .
In simpler terms: Pick some (but not necessarily all) ordered pairs from .
Let (ages) and (heights in inches)
The relation ": person of age has height " might be:
Or it could be any other subset, like (not all pairs need to be included).
Cartesian product has 9 possible pairs total. Our relation uses only 3 of them.
The domain is the set of all first elements (inputs).
For relation :
Domain: (list each once, even if it appears multiple times)
Note: 2 is in the domain only once, even though it appears twice in the relation.
The codomain is the set we're pairing TO (the "target" set we might use, whether we actually use all elements or not).
The range is the set of all second elements (outputs) that actually appear.
For relation :
If codomain is :
Key difference: Codomain is "available to use," Range is "actually used."
Each input connects to exactly one output, and no two inputs connect to the same output.
Example: Student → Student ID (each student has one unique ID)
Multiple inputs can connect to the same output.
Example: City → Country (many cities in one country)
One input connects to multiple outputs.
Example: Person → Hobbies (one person has many hobbies)
Inputs and outputs can have multiple connections.
Example: Students → Subjects (many students in many subjects)
Domain: Set of all FIRST elements (inputs) Range: Set of all SECOND elements (outputs actually used) Codomain: Target set (all possible outputs available)
Domain and Range are determined by the actual relation. Codomain is usually stated separately.
A function is a special type of relation with ONE strict rule:
Each input must have EXACTLY ONE output.
This means:
However: It's okay if two different inputs map to the same output (many-to-one is fine for functions).
When we have a function, we use special notation to show the rule.
Read as: "Function from set to set "
This means:
Examples:
To evaluate a function at a specific value, substitute that value in for .
Given , find :
Step 1: Substitute 3 for every
Step 2: Calculate
Meaning: When input is 3, output is 7. The point is on the graph.
Given , find :
Step 1: Substitute -2 for every (use brackets!)
Step 2: Calculate carefully
Answer:
The vertical line test distinguishes functions from non-functions:
Vertical line test rule: If you draw a vertical line at any -value on the graph, it crosses the graph at most ONCE, the relation is a function.
Is a function?
Rearrange:
This means for each , there are TWO possible values (positive and negative square root).
Example: If , then OR (two outputs for one input).
Answer: NOT a function. Fails the vertical line test.