01 / 21

Relations &
Functions

Learn how to identify whether a relation is a function, master the vertical line test, and build confidence with domain and range.

College Algebra

What Is a Relation?

A relation is any set of ordered pairs \((x, y)\). It pairs inputs from one set (the domain) with outputs in another set (the range).

Domain
The set of all first elements (\(x\)-values) in the ordered pairs.
Range
The set of all second elements (\(y\)-values) in the ordered pairs.

Ways to Represent a Relation

Relations can appear in many forms. Recognising each form is essential before testing whether it qualifies as a function.

Ordered Pairs
\(\{(1,4),(2,5),(3,6)\}\)
Table
Rows of \(x\) and \(y\) values in a chart.
Mapping Diagram
Arrows from domain to range elements.
Graph
Points or curves on the coordinate plane.

What Makes It a Function?

A function is a special type of relation. It adds one crucial restriction: every input must map to exactly one output.

Think of it like a vending machine: you press one button, you get one specific item. If pressing the same button could give you different items each time, it wouldn't be a reliable machine: and it wouldn't be a function.

Mapping Diagrams Compared

✓ Function Domain
\(1\)
\(2\)
\(3\)
Range
\(a\)
\(b\)
\(c\)
Each input \(\to\) one output ✕ Not a Function Domain
\(1\)
\(2\)
\(3\)
Range
\(a\)
\(b\)
\(c\)
Input 1 \(\to\) two outputs

The Vertical Line Test

When a relation is given as a graph, you can test it visually. Imagine sweeping a vertical line across the graph from left to right.

This works because a vertical line represents all points with the same \(x\)-value. Two intersections mean one \(x\) maps to two different \(y\)-values.

Vertical Line Test: Visual

✓ Function 1 hit \(y = x^2\) ✕ Not a Function hit 1 hit 2 \(x^2 + y^2 = r^2\)

Relation vs Function

Relation Function
Definition Any set of ordered pairs Each input has exactly one output
Repeated \(x\)-values Allowed with different \(y\) Not allowed with different \(y\)
Vertical Line Test May fail Always passes
Example \(\{(1,2),(1,3)\}\) \(\{(1,2),(2,3)\}\)

Function Notation: \(f(x)\)

When a relation is a function, we often name it with function notation. Instead of writing \(y\), we write \(f(x)\), read as "\(f\) of \(x\)".

\(f(x) = 2x + 3\)
\(f\) is the function name, \(x\) is the input, and \(2x+3\) is the rule.
\(f(4) = 11\)
Substituting \(x=4\): the output is \(2(4)+3=11\).

How to Identify a Function

1
List the inputs. Write down every \(x\)-value that appears in the relation.
2
Check for duplicates. Does any \(x\)-value appear more than once with a different \(y\)-value?
3
Apply the vertical line test if given a graph. Sweep a vertical line across the figure.
4
Conclude. If every input has exactly one output, it is a function. Otherwise, it is not.

Example 1: Ordered Pairs

Determine whether the relation \(\{(2,5),\;(3,7),\;(4,5),\;(5,9)\}\) is a function.

1
List the \(x\)-values: \(2, 3, 4, 5\).
2
Check duplicates: No \(x\)-value repeats. Each input maps to one output.
3
Conclude: ✓ It is a function.

Example 2: Table of Values

Is the relation shown in the table a function?

\(x\) -1 0 3 3 5
\(y\) 4 2 6 8 1

Example 3: Graph Analysis

Is the graph of \(y = \sqrt{x}\) a function?

\(x\)
\(y\)
\(1\)
\(2\)
\(3\)
\(1\)
\(2\)
1 hit

Domain and Range Review

Once you confirm a relation is a function, you can describe its domain and range using interval or set-builder notation.

\(f(x) = x^2\)
Domain: \((-\infty, \infty)\)
Range: \([0, \infty)\)
\(f(x) = \sqrt{x}\)
Domain: \([0, \infty)\)
Range: \([0, \infty)\)
\(f(x) = \frac{1}{x}\)
Domain: \((-\infty,0)\cup(0,\infty)\)
Range: \((-\infty,0)\cup(0,\infty)\)

Common Mistakes

✕ Same \(y\) means not a function
Two inputs can share the same output. Only repeated inputs with different outputs break the rule.
✕ Using a horizontal line test
The horizontal line test checks if a function is one-to-one: it does not determine whether a relation is a function.
✕ Confusing \(f(x)\) with multiplication
\(f(x)\) means "\(f\) evaluated at \(x\)," not "\(f\) times \(x\)." Context matters.

Summary: Quick Reference

Test / Question Function Not a Function
Repeated \(x\) with different \(y\)? No Yes
Vertical Line Test Passes (1 hit max) Fails (2+ hits)
Mapping diagram Each input \(\to\) one arrow Some input \(\to\) 2+ arrows
Same \(y\) for different \(x\)? Allowed Allowed

Question 1 of 5

Which of the following relations is a function?

Question 2 of 5

A student says the relation \(\{(1,5),\;(2,5),\;(3,5)\}\) is not a function because the \(y\)-value repeats. Is the student correct?

Question 3 of 5

Which graphical test determines whether a relation is a function?

Question 4 of 5

The equation \(x^2 + y^2 = 25\) describes a circle. Is this equation a function of \(x\)?

Question 5 of 5

If \(f(x) = 3x - 7\), what is \(f(4)\)?