Understanding Relations and Functions

A relation pairs inputs with outputs and can be represented by ordered pairs, a table, a mapping diagram, or a graph. Using sales data and connected graphs, this guide explains how to find domain and range and why a function must assign exactly one output to every input—the same rule checked by the vertical line test.

Course cover for Understanding Relations and Functions

A Cupcake Stand Mystery

A weekend cupcake stand records the number of boxes sold and the money earned each day. The question is: if you know the number of boxes sold, can you always predict the earnings?

DateBoxes SoldEarnings
4/1241$265
4/1358$842
4/1441$530

On April 12, 41 boxes brought in $265. On April 13, 58 boxes brought in $842. On April 14, 41 boxes brought in $530. The same number of boxes—41—appears with two different earnings amounts. Does the same input having different outputs break a mathematical rule? To answer that question, we first need the language of relations, inputs, and outputs

Relations and Their Views

An ordered pair (x, y) records an input and its output. The input x comes first; the output y comes second. For the cupcake data, (41, 265) means that 41 boxes sold is paired with earnings of $265

A relation is a set of ordered pairs. With boxes sold as the input and earnings in dollars as the output, the cupcake relation is {(41, 265), (58, 842), (41, 530)}. A relation can also be represented as a table, a mapping diagram, or a graph

One relation, three views

Express the relation {(1, 4), (2, 5), (3, 7), (5, 9)} as a table, a mapping diagram, and a graph. Each representation must preserve all four input-output pairs

For a table, make one row for each ordered pair, putting x in the left column and y in the right column. The table contains exactly the same information as the set

xy
14
25
37
59
Relations and Their Views: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 0 x y A (2, 7) B (3, 4) C (9, 6) D (6, 9)

For a mapping diagram, place the inputs 1, 2, 3, and 5 on the left and the outputs 4, 5, 7, and 9 on the right. Draw an arrow from each input to its paired output: 1 → 4, 2 → 5, 3 → 7, and 5 → 9

For a graph, plot each ordered pair as a point: (1, 4), (2, 5), (3, 7), and (5, 9). Keep x first and y second. Swapping the two numbers changes the point's location. The set, table, mapping diagram, and graph all describe this same relation

Relations and Their Views: x y 1 2 3 5 4 5 7 9
Relations and Their Views: x y 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 (1, 4) (2, 5) (3, 7) (5, 9)

Practice 1: Check ordered pairs

Tap the point that is NOT in the relation {(2, 7), (3, 4), (6, 9)}

A

A (2, 7)

B

B (3, 4)

C

C (9, 6)

D

D (6, 9)

Domain and Range

The domain of a relation is the set of all its inputs, or x-values. The range is the set of all its outputs, or y-values. A set writes each value only once, even when that value appears repeatedly in the data

Domain and range of the cupcake data

Using boxes sold as the input and earnings in dollars as the output, find the domain and range of {(41, 265), (58, 842), (41, 530)}

The first coordinates are 41, 58, and 41. Because 41 is repeated, list it only once: domain = $$\{41, 58\}$$. The second coordinates are 265, 842, and 530. These are all different, so range = $$\{265, 530, 842\}$$. Three rows of data therefore give only two distinct domain values

Practice 2: Collect inputs and outputs

Complete the domain and range of {(2, 5), (2, 9), (8, 5)}. The original choices are $$\{2, 8\}$$, $$\{5, 9\}$$, $$\{2, 2, 8\}$$, and $$\{5, 9, 5\}$$

The domain is $$\{2, 8\}$$, taken from the first coordinates 2, 2, and 8. The range is $$\{5, 9\}$$, taken from the second coordinates 5, 9, and 5. The choices $$\{2, 2, 8\}$$ and $$\{5, 9, 5\}$$ do not follow the rule of writing repeated values only once

Reading Solid Graphs

A connected line segment contains infinitely many points, so its domain and range cannot be written by listing every value. Instead, describe the intervals of x-values and y-values covered by the graph. Read the domain from left to right and the range from bottom to top

Reading Solid Graphs: x y 0 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10

A segment with included endpoints

A line segment joins solid endpoints at (2, 7) and (6, 1). Find its domain and range. The segment slopes downward from the higher left endpoint (2, 7) to the lower right endpoint (6, 1)

The leftmost x-value is 2 and the rightmost x-value is 6. Every x-value between them occurs on the segment, and both endpoints are included. The domain is 2 ≤ x ≤ 6

The lowest y-value is 1, at (6, 1), and the highest y-value is 7, at (2, 7). Every y-value between them occurs, including both limits. The range is 1 ≤ y ≤ 7. The range is read from lowest to highest, even though the higher endpoint is on the left

Reading Solid Graphs: x y 0 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10

Practice 3: Read a filled oval

Find the domain and range of a solid, filled oval centered at (-1, 0). Its leftmost point has x = -4, its rightmost point has x = 2, its lowest point has y = -3, and its highest point has y = 3. Its solid boundary is included. The original choices are -4 ≤ x ≤ 2, -3 ≤ y ≤ 3, -4 ≤ y ≤ 2, and -3 ≤ x ≤ 3

Reading Solid Graphs: -6 -4 -2 2 4 6 6 5 3 -3 -5 -6 0 x y

The domain is -4 ≤ x ≤ 2, describing the oval's full horizontal extent. The range is -3 ≤ y ≤ 3, describing its full vertical extent. The domain statement must use x, and the range statement must use y

What Makes a Function

Return to the cupcake question: can boxes sold always predict earnings? A function is a relation in which every input is paired with exactly one output. If even one input is paired with two different outputs, the relation is not a function

Testing the cupcake relation

Is {(41, 265), (58, 842), (41, 530)} a function? In a mapping diagram, the inputs are 41 and 58, each written once. The outputs are 265, 842, and 530. The arrows are 58 → 842, 41 → 265, and 41 → 530

The input 58 has one output, but 41 has two different outputs: 265 and 530. Therefore, the cupcake relation is not a function. In these records, knowing that 41 boxes were sold does not determine one earnings amount

What Makes a Function: x (boxes sold) y (earnings) 41 58 265 842 530 one input, two outputs

A relation that passes

Is the relation given by 2 → 9, 4 → 0, 8 → 9, and 11 → 2 a function? Check each input separately: 2 has one output, 9; 4 has one output, 0; 8 has one output, 9; and 11 has one output, 2. Every input has exactly one output, so this relation is a function

What Makes a Function: x y 2 4 8 11 9 0 2 ✓ ✓ Two arrows IN is fine. ✓ ✓

The output 9 receives arrows from both 2 and 8. This is allowed: the repeat is at an output receiving two arrows, not at an input sending arrows to two different outputs

Two kinds of repeats

Can two inputs share the same output? Yes; the relation can still be a function. Can one input have two different outputs? No; that relation is not a function. How many inputs must be checked? Every input in the domain—one failure is enough to establish that a relation is not a function

Practice 4: Classify the relations

Determine whether each relation is a function: {(3, 1), (6, 1), (9, 4)}; {(5, 2), (5, 8), (7, 3)}; and the mapping 4 → 9, 10 → 9, 12 → 5

{(3, 1), (6, 1), (9, 4)} is a function: inputs 3, 6, and 9 each have exactly one output. The shared output 1 is allowed

{(5, 2), (5, 8), (7, 3)} is not a function: input 5 is paired with both 2 and 8. The fact that input 7 has only one output does not remove that failure

The mapping 4 → 9, 10 → 9, 12 → 5 is a function: each of the inputs 4, 10, and 12 has exactly one output. Inputs 4 and 10 sharing output 9 is allowed

The Vertical Line Test

How can the exactly-one-output rule be checked on a graph containing infinitely many points? A point (x, y) records an input and its output. A vertical line at a fixed x-value collects all graph points with that same input. If it meets the graph at more than one point, that input has more than one output

The Vertical Line Test
The Vertical Line Test
The Vertical Line Test

For the rising slanted line in the lesson, a vertical line through a graph point meets the graph once: that input has one output. For the sideways C-shaped curve opening to the right, a vertical line through its interior span meets the curve twice. The two points have the same x-value but different y-values, so the sideways curve is not a function

The Vertical Line Test: x y (x, y) input output ✓ one output
The Vertical Line Test: x y ⚑ not a function

Testing the solid oval

The exploration uses a filled oval centered at (-1, 0), extending from x = -5 to x = 3 and from y = -3 to y = 3, with its boundary included. The question is to find a position of the vertical line x = a that gives two points on the oval with the same input

The Vertical Line Test: −6 −6 −4 −4 −2 −2 2 2 4 4 6 6 x y x = a

At x = -1, the vertical line contains the top boundary point (-1, 3) and the bottom boundary point (-1, -3). These two points alone show that input -1 is paired with both 3 and -3. Because the oval is filled, the line also contains points between them; the two boundary points are already enough to establish failure. The solid oval is not a function

The Vertical Line Test: −6 −6 −4 −4 −2 −2 2 2 4 4 6 6 x y x = −1 (−1, 3) (−1, −3)

In mapping language, -1 → 3 and -1 → -3 violate the exactly-one-output rule. A single input with different outputs proves that the relation fails; it is not necessary for every vertical line to meet the graph more than once

Practice 5: Compare graph shapes

The three graph choices are a rising slanted line segment, a U-shaped curve opening upward, and a sideways C-shaped curve opening to the right. For the rising line and the upward-opening U-shaped curve, every vertical line meets the graph at most once. For the sideways curve, a vertical line through its interior span meets it twice

Tap the graph that is NOT a function

A

Rising line

B

U-shaped curve

C

Sideways curve

Summary

1. A relation is a set of ordered pairs (x, y), with the input first and the output second. A set of pairs, a table, a mapping diagram, and a graph can represent the same relation

2. The domain contains all inputs, or x-values. The range contains all outputs, or y-values. When writing these as sets, list repeated values only once

3. For the connected graphs in this lesson, domain and range are intervals, not just lists of endpoint values. Read x-values from left to right and y-values from bottom to top. For the segment joining (2, 7) and (6, 1), the domain is 2 ≤ x ≤ 6 and the range is 1 ≤ y ≤ 7. Solid endpoints are included, so use ≤

4. A function assigns exactly one output to every input. Repeated outputs are allowed; one input with two different outputs is not. On a graph, the vertical line test checks this same rule: no vertical line may meet the graph more than once

Quiz

Quiz 1: Read a mapping

Complete the domain and range of the mapping 4 → 6, 8 → 6, 11 → 3. The input side contains 4, 8, and 11; the output side contains 6 and 3, with two arrows arriving at 6. The original choices are $$\{4, 8, 11\}$$, $$\{3, 6\}$$, $$\{6, 6, 3\}$$, and $$\{3, 4, 6, 8, 11\}$$

Answer: domain = $$\{4, 8, 11\}$$; range = $$\{3, 6\}$$. The domain comes from the inputs and the range from the outputs. Although two arrows arrive at 6, the range lists 6 only once. Combining inputs and outputs into one set does not give either the domain or the range

Quiz: x (inputs) y (outputs) 4 8 11 6 3

Quiz 2: Read a V-shaped path

Complete the domain and range of a solid V-shaped path made of two straight pieces: one from the solid endpoint (0, 5) down to the vertex (2, 1), and one from the vertex up to the solid endpoint (4, 5). The original choices are 0 ≤ x ≤ 4, 1 ≤ y ≤ 5, 0 ≤ x ≤ 2, and 0 ≤ y ≤ 4

Answer: domain = 0 ≤ x ≤ 4; range = 1 ≤ y ≤ 5. Both arms count: the whole path extends horizontally from x = 0 to x = 4, not just to x = 2. Its lowest point is the vertex at y = 1, and its highest points are the endpoints at y = 5. All limits are included

Quiz 3: Apply the vertical line test

The graph is a full circle centered at (1, 0) with radius 2. It passes through (-1, 0), (3, 0), (1, 2), and (1, -2). Apply the vertical line test using the line x = 1

Is the graphed circle a function?

A

Yes - every point on the circle is different, so it passes

B

No - the line x = 1 shows the input 1 has two outputs, 2 and -2

C

No - two different inputs share the output 0, which is not allowed

Continue with the interactive lesson