Study Vault
All PostsFlashcardsResourcesAI ChatBlog
  1. Home
  2. /↳All Posts
  3. /↳Math
  4. /↳Relations & Functions
Study VaultStudy Vault

Free, comprehensive study notes for CSEC students.

matthewlloydw@gmail.com

Navigate

  • Home
  • All Posts
  • Flashcards
  • Resources
  • AI Chat

Community

  • Contributors
  • Changelog
  • Suggest a Feature
  • My Suggestions
  • Bookmarks

Mathematics and Science

  • Mathematics
  • Additional Mathematics
  • Biology
  • Chemistry
  • Physics

Arts and Humanities

  • Caribbean History
  • Geography

Business and Human Development Studies

  • Principles of Accounts
  • Principles of Business
  • Economics

Modern Languages

  • English A (Language)
  • English B (Literature)
  • French
  • Spanish

Technical Studies and Creative Arts

  • Electrical & Electronic Technology
  • Information Technology

© 2026 Matthew Williams. Made with other contributors for all.

Mathematics

Relations & Functions

PDF
Matthew Williams
|May 6, 2026|6 min read
FunctionsPaper 01Paper 02Relations

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 a Connection

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:

  • Each student paired with their test score
  • Each city paired with its temperature
  • Each book paired with its author
  • Each date paired with the day's closing stock price

Sets and Notation

Before we formalize relations, understand the vocabulary:

  • Set: A collection of objects (written in curly braces)

    • Example: A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\}A={1,2,3,4,5} (the set of single digits 1-5)
    • Example: B={a,e,i,o,u}B = \{a, e, i, o, u\}B={a,e,i,o,u} (vowels)
  • Ordered pair: Two elements in a specific order, written as (x,y)(x, y)(x,y)

    • (3,6)(3, 6)(3,6) is different from (6,3)(6, 3)(6,3)
    • First element: input
    • Second element: output
  • Cartesian product: All possible ordered pairs from two sets

    • If A={1,2}A = \{1, 2\}A={1,2} and B={a,b}B = \{a, b\}B={a,b}
    • Then A×B={(1,a),(1,b),(2,a),(2,b)}A \times B = \{(1,a), (1,b), (2,a), (2,b)\}A×B={(1,a),(1,b),(2,a),(2,b)} (4 pairs total)

Defining a Relation Formally

A relation from set AAA to set BBB is a subset of the Cartesian product A×BA \times BA×B.

In simpler terms: Pick some (but not necessarily all) ordered pairs from A×BA \times BA×B.

Example

Let A={1,2,3}A = \{1, 2, 3\}A={1,2,3} (ages) and B={68,72,76}B = \{68, 72, 76\}B={68,72,76} (heights in inches)

The relation "RRR: person of age xxx has height yyy" might be: R={(1,68),(2,72),(3,76)}R = \{(1, 68), (2, 72), (3, 76)\}R={(1,68),(2,72),(3,76)}

Or it could be any other subset, like {(1,72),(3,76)}\{(1, 72), (3, 76)\}{(1,72),(3,76)} (not all pairs need to be included).

Cartesian product A×BA \times BA×B has 9 possible pairs total. Our relation RRR uses only 3 of them.

Key Properties of Relations

Domain

The domain is the set of all first elements (inputs).

Example

For relation R={(2,5),(3,7),(4,9),(2,11)}R = \{(2, 5), (3, 7), (4, 9), (2, 11)\}R={(2,5),(3,7),(4,9),(2,11)}:

Domain: {2,3,4}\{2, 3, 4\}{2,3,4} (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.

Codomain

The codomain is the set we're pairing TO (the "target" set we might use, whether we actually use all elements or not).

Range (or Image)

The range is the set of all second elements (outputs) that actually appear.

Example

For relation R={(2,5),(3,7),(4,9),(2,11)}R = \{(2, 5), (3, 7), (4, 9), (2, 11)\}R={(2,5),(3,7),(4,9),(2,11)}:

If codomain is {5,6,7,8,9,10,11}\{5, 6, 7, 8, 9, 10, 11\}{5,6,7,8,9,10,11}:

  • Codomain (target): {5,6,7,8,9,10,11}\{5, 6, 7, 8, 9, 10, 11\}{5,6,7,8,9,10,11} (7 elements, some unused)
  • Range (actually used): {5,7,9,11}\{5, 7, 9, 11\}{5,7,9,11} (4 elements, only the actual outputs)

Key difference: Codomain is "available to use," Range is "actually used."

Types of Relations

One-to-One (Injective)

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)

One-to-one: each input → unique output

Many-to-One

Multiple inputs can connect to the same output.

Example: City → Country (many cities in one country)

Many-to-one: 1→a, 2→a, 3→b

One-to-Many

One input connects to multiple outputs.

Example: Person → Hobbies (one person has many hobbies)

One-to-many: 1→a, 1→b, 2→c

Many-to-Many

Inputs and outputs can have multiple connections.

Example: Students → Subjects (many students in many subjects)

Many-to-many: 1→a, 1→b, 2→a, 2→b
Remember

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.

Functions

What Makes a Function Special?

A function is a special type of relation with ONE strict rule:

Each input must have EXACTLY ONE output.

This means:

  • ✓ Input 3 connects to output 9 (good)
  • ✓ Input 5 connects to output 25 (good)
  • ✗ Input 3 connects to outputs 9 AND 10 (bad! not a function)
  • ✗ Input 5 connects to outputs 25 AND 5 (bad! not a function)

However: It's okay if two different inputs map to the same output (many-to-one is fine for functions).

Function Notation

When we have a function, we use special notation to show the rule.

Standard Notation

f:A→Bf: A \to Bf:A→B

Read as: "Function fff from set AAA to set BBB"

  • AAA = domain (the inputs)
  • BBB = codomain (the target outputs)
  • The rule defines which output goes with each input

Function Rule Notation

f(x)=formulaf(x) = \text{formula}f(x)=formula

This means:

  • fff is the name of the function
  • xxx is the input variable
  • f(x)f(x)f(x) is the output (what you get after applying the rule)

Examples:

  • f(x)=2x+1f(x) = 2x + 1f(x)=2x+1 means: "Take the input xxx, double it, and add 1"
  • g(x)=x2g(x) = x^2g(x)=x2 means: "Take the input xxx and square it"
  • h(t)=5th(t) = 5th(t)=5t means: "Take the input ttt and multiply by 5"

Evaluating Functions

To evaluate a function at a specific value, substitute that value in for xxx.

Example

Given f(x)=2x+1f(x) = 2x + 1f(x)=2x+1, find f(3)f(3)f(3):

Step 1: Substitute 3 for every xxx f(3)=2(3)+1f(3) = 2(3) + 1f(3)=2(3)+1

Step 2: Calculate f(3)=6+1=7f(3) = 6 + 1 = 7f(3)=6+1=7

Meaning: When input is 3, output is 7. The point (3,7)(3, 7)(3,7) is on the graph.

Example

Given g(x)=x2−2xg(x) = x^2 - 2xg(x)=x2−2x, find g(−2)g(-2)g(−2):

Step 1: Substitute -2 for every xxx (use brackets!) g(−2)=(−2)2−2(−2)g(-2) = (-2)^2 - 2(-2)g(−2)=(−2)2−2(−2)

Step 2: Calculate carefully g(−2)=4+4=8g(-2) = 4 + 4 = 8g(−2)=4+4=8

Answer: g(−2)=8g(-2) = 8g(−2)=8

Functions vs. Relations

The vertical line test distinguishes functions from non-functions:

Vertical line test rule: If you draw a vertical line at any xxx-value on the graph, it crosses the graph at most ONCE, the relation is a function.

  • Crosses once: function ✓
  • Crosses twice or more: not a function ✗
  • Doesn't cross: that xxx-value isn't in the domain
Vertical line test: y=x² passes (function); x=y² fails (not a function)
Example

Is y2=xy^2 = xy2=x a function?

Rearrange: y=±xy = \pm\sqrt{x}y=±x​

This means for each x>0x > 0x>0, there are TWO possible yyy values (positive and negative square root).

Example: If x=4x = 4x=4, then y=2y = 2y=2 OR y=−2y = -2y=−2 (two outputs for one input).

Answer: NOT a function. Fails the vertical line test.

Previous
Number Sets & Ordering
Next
Sets & Set Notation