Lesson 2: Relations & Introduction to Functions
Estimated time: 30-35 minutes
Learning Objectives
By the end of this lesson, you will be able to:
- Define relations and functions
- Distinguish between relations that are functions vs. not functions
- Apply the vertical line test to graphs
- Use function notation f(x) correctly
- Evaluate functions at given values
- Determine domain and range of functions
What is a Relation?
Before we can understand functions, we need to start with the broader concept of relations.
Relation: A set of ordered pairs (x, y) that shows a relationship between two variables.
A relation is simply a collection of points. We can represent relations in several ways:
Example: Different Ways to Represent a Relation
1. Set of Ordered Pairs:
{(1, 2), (3, 4), (5, 6)}
2. Table:
| x | 1 | 3 | 5 |
|---|---|---|---|
| y | 2 | 4 | 6 |
3. Mapping Diagram:
1 → 2
3 → 4
5 → 6
4. Graph: Plot the points (1,2), (3,4), (5,6) on a coordinate plane
All of these represent the same relation—just in different formats. The key idea is that each x-value is paired with a y-value.
What is a Function?
Now for the star of the show: functions. A function is a special type of relation with one crucial rule:
Function: A relation where each input (x-value) corresponds to exactly ONE output (y-value).
Each x gets paired with only ONE y.
IS a Function
{(1, 2), (2, 3), (3, 4)}
Each x-value appears only once:
- x = 1 → y = 2
- x = 2 → y = 3
- x = 3 → y = 4
NOT a Function
{(1, 2), (1, 3), (2, 4)}
x = 1 appears twice with different outputs:
- x = 1 → y = 2 AND
- x = 1 → y = 3
- This violates the function rule!
Real-World Analogy
Think of a function like a student ID system:
- Function: Student ID → Student Name (each ID belongs to exactly one person)
- Not a Function: Student ID → Classes Taking (one student can take multiple classes)
Note: Multiple students CAN have the same name (multiple x-values can share the same y-value). What matters is that each ID (x) maps to only ONE name (y).
Example: Identifying Functions
Determine if each relation is a function:
a) {(1, 5), (2, 7), (3, 5), (4, 9)}
YES, this is a function. Each x-value (1, 2, 3, 4) appears only once. Note that y = 5 appears twice, but that's fine! Multiple inputs can share the same output.
b) {(1, 2), (3, 4), (1, 6), (5, 8)}
NO, this is NOT a function. The x-value 1 appears twice (paired with both 2 and 6). This violates the function rule.
c) {(2, 3), (4, 5), (6, 7), (8, 9)}
YES, this is a function. Each x-value is unique and paired with exactly one y-value.
The Vertical Line Test
When we have a graph, there's a quick visual way to determine if it represents a function: the vertical line test.
Vertical Line Test: If you can draw a vertical line that intersects the graph at more than one point, then the graph does NOT represent a function.
Why does this work?
A vertical line represents a single x-value. If that line hits the graph at multiple points, it means that one x-value corresponds to multiple y-values—which violates the function definition!
Visual Examples
Example 1: Parabola (opens up or down)
Graph: y = x²
IS a function — Any vertical line crosses the graph at most once
Example 2: Circle
Graph: x² + y² = 25
NOT a function — A vertical line through the center crosses at two points (top and bottom of circle)
Example 3: Sideways Parabola
Graph: x = y²
NOT a function — For x = 4, there are two y-values: y = 2 and y = −2
Example 4: Straight Line (not vertical)
Graph: y = 2x + 1
IS a function — Any vertical line crosses exactly once
Example 5: Vertical Line
Graph: x = 3
NOT a function — The line x = 3 itself is vertical, so it represents x = 3 for infinitely many y-values
Function Notation
Once we know something is a function, we use special notation to work with it. Instead of writing y = ..., we write f(x) = ...
Function Notation: f(x)
Read as: "f of x" or "f at x"
- f is the name of the function (can be any letter: f, g, h, etc.)
- x is the input (independent variable)
- f(x) is the output (dependent variable), replaces y
Understanding Function Notation
Instead of: y = 2x + 3
We write: f(x) = 2x + 3
This tells us: "The function f takes an input x and outputs 2x + 3"
Evaluating Functions
To evaluate a function means to find the output for a specific input. Replace every x with the given value and calculate.
Example: Evaluating Functions
Given f(x) = 2x + 3, evaluate:
a) f(5)
Replace x with 5:
f(5) = 2(5) + 3 = 10 + 3 = 13
b) f(0)
Replace x with 0:
f(0) = 2(0) + 3 = 0 + 3 = 3
c) f(−2)
Replace x with −2:
f(−2) = 2(−2) + 3 = −4 + 3 = −1
Example: More Complex Evaluation
Given g(x) = x² − 4x + 1, evaluate g(3):
Solution:
g(3) = (3)² − 4(3) + 1
g(3) = 9 − 12 + 1
g(3) = −2
Domain and Range
Every function has a domain (possible inputs) and a range (possible outputs).
Domain: The set of all possible input values (x-values) that the function can accept.
Range: The set of all possible output values (y-values) that the function can produce.
Finding Domain
To find the domain, ask: "What values of x can I plug in?"
Common Domain Restrictions:
- Division by zero: Cannot divide by zero, so exclude values that make the denominator 0
- Square roots: Cannot take the square root of a negative number (in real numbers), so exclude values that make the expression under √ negative
- Even roots: Same as square roots (fourth root, sixth root, etc.)
Example: Finding Domain
a) f(x) = x²
Can we square any real number? Yes!
Domain: All real numbers (or ℝ, or (−∞, ∞))
b) g(x) = 1/x
We cannot divide by zero, so x ≠ 0
Domain: All real numbers except 0 (or ℝ \ {0})
c) h(x) = √x
We cannot take the square root of a negative number
So x ≥ 0
Domain: [0, ∞)
d) k(x) = 1/(x − 3)
The denominator cannot be zero: x − 3 ≠ 0
So x ≠ 3
Domain: All real numbers except 3
e) m(x) = √(x − 2)
We need x − 2 ≥ 0
So x ≥ 2
Domain: [2, ∞)
Finding Range
To find the range, ask: "What values of y can the function produce?"
Example: Finding Range
a) f(x) = x²
Squaring any real number gives a non-negative result
The smallest output is 0 (when x = 0), and it goes up to infinity
Range: [0, ∞)
b) g(x) = 1/x
This function can produce any real number except 0
Range: All real numbers except 0
c) h(x) = √x
Square root produces only non-negative outputs
Range: [0, ∞)
Check Your Understanding
Try these questions to see if you've grasped the key concepts:
1. Is the relation {(2, 3), (4, 5), (2, 7)} a function? Why or why not?
2. Would a circle pass the vertical line test?
3. Given f(x) = 3x − 5, evaluate f(4).
f(4) = 3(4) − 5
f(4) = 12 − 5
f(4) = 7
4. What is the domain of h(x) = 1/(x − 5)?
x − 5 ≠ 0
x ≠ 5
Domain: All real numbers except 5 (or (−∞, 5) ∪ (5, ∞))
Key Takeaways
- A relation is any set of ordered pairs (x, y)
- A function is a special relation where each x-value maps to exactly ONE y-value
- The vertical line test: If a vertical line intersects a graph more than once, it's NOT a function
- Function notation f(x) replaces y and is read as "f of x"
- To evaluate a function, substitute the given value for x and calculate
- Domain = all possible inputs (x-values); watch for division by zero and negative square roots
- Range = all possible outputs (y-values)
Ready for More?
← Previous Lesson
Review Real Numbers & The Coordinate Plane if you need to refresh the foundations.
Back to Lesson 1Next Lesson
In Lesson 3, you'll learn function arithmetic—how to add, subtract, multiply, and divide functions!
Start Lesson 3