Allday Education

What Is a Function?

A function is a rule that gives each input exactly one output. Put a number in, and exactly one number comes out — never two. Relations show up as ordered pairs, tables, mapping diagrams, and graphs, and in every form the question is the same: does any input ever get matched with more than one output?

This one rule is the foundation for everything you do with functions later — evaluating them, graphing them, comparing them. Learn to test it in each form and the rest of the unit follows.

The one rule: each input, exactly one output

Every relation is a set of input-output pairs. The input is the xx-value and the output is the yy-value. A relation is a function when no input appears with two different outputs.

Two things trip students up. First, outputs are allowed to repeat: (2,3)(2, 3), (4,3)(4, 3), (6,3)(6, 3) is a function even though every output is 33, because each input still has exactly one output. Second, an input may appear more than once as long as it is paired with the same output every time — listing the pair (1,5)(1, 5) twice changes nothing.

Checking pairs, tables, and mapping diagrams

For ordered pairs, scan the xx-values. If an xx-value repeats with two different yy-values — like (5,1)(5, 1) and (5,6)(5, 6) — the relation is not a function.

For a table, do the same with the input column: as long as no input repeats with a different output, the table is a function. Ignore the output column while you check — repeated outputs are fine.

In a mapping diagram, inputs sit on the left, outputs on the right, and arrows connect them. Count the arrows leaving each input. If any input has two or more arrows leaving it, the relation is not a function. Two arrows arriving at the same output is fine.

The mapping diagram below is a function: exactly one arrow leaves each input. Notice that two inputs both point to the output 88 — a shared output is allowed, because the rule only limits how many arrows leave each input.

DomainRange13574810

The vertical line test

A graph is just a picture of ordered pairs, so the rule turns into geometry: if any vertical line crosses the graph more than once, two points share the same input, and the relation is not a function.

In the graph below, the points (2,3)(2, 3) and (2,2)(2, -2) line up vertically — a vertical line through x=2x = 2 hits both. The input 22 has two outputs, so this relation is not a function.

-4-3-2-11234-4-3-2-11234xy

Worked examples

Example 1: a set of ordered pairs

Is the relation (1,4),  (2,7),  (1,9)(1, 4),\; (2, 7),\; (1, 9) a function?

List the inputs1,  2,  11,\; 2,\; 1
The input 11 repeats with two different outputs(1,4),  (1,9)(1, 4),\; (1, 9)
One input with two outputs breaks the rule

Answer: Not a function

Example 2: a table with a repeated output

A table pairs the inputs 1,3,5,71, 3, 5, 7 with the outputs 4,8,8,104, 8, 8, 10. Is it a function?

Scan the input column1,  3,  5,  71,\; 3,\; 5,\; 7
No input repeats, so each input has exactly one output
The repeated output 88 is allowed — the rule is about inputs

Answer: A function

Example 3: the vertical line test

A graph contains the points (1,2)(1, 2), (3,5)(3, 5), and (3,1)(3, -1). Is it the graph of a function?

Look for points that share an xx-value(3,5),  (3,1)(3, 5),\; (3, -1)
A vertical line through x=3x = 3 crosses the graph twice
The input 33 has two different outputs

Answer: Not a function

Try one yourself

DomainRange146359

Common questions

Can two inputs share the same output?

Yes. The rule only restricts inputs. In (2,3)(2, 3), (4,3)(4, 3), (6,3)(6, 3) every output is 33, but each input still has exactly one output, so it is a function.

What is the difference between a relation and a function?

A relation is any set of input-output pairs. A function is a relation with one extra guarantee: each input appears with exactly one output. Every function is a relation, but not every relation is a function.

Why does the vertical line test work?

Points on the same vertical line all share one xx-value. If a vertical line crosses a graph twice, one input has two different outputs, which breaks the definition of a function.

Is a straight line always a function?

Every line except a vertical one is a function. The vertical line x=4x = 4 pairs the single input 44 with every output at once, so it fails the test.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1