Algebra › Section C · Graphs and functions › Topic C.5
Relations and functions
A relation pairs inputs with outputs any way it likes; a function is the well-behaved kind that never gives two answers to one question. The distinction decides which formulas can be trusted to predict.
Relations: any pairing at all
A relation is simply a set of ordered pairs \((x, y)\), pairing each input \(x\) with an output \(y\). The pairs do not have to follow any rule: \(\{(1, 3), (2, 5), (3, 7)\}\) is a relation, and so is \(\{(4, 2), (4, -2)\}\). Two visual formats present the same information. A mapping diagram draws the inputs in one column, the outputs in another, and an arrow from each input to its output. A graph plots the pairs as points. For any relation, the domain is the set of inputs — the x-values that appear — and the range is the set of outputs, the y-values that appear.
Reading domain and range from a relation
For the relation \(\{(1, 3), (2, 5), (3, 7)\}\), the domain is \(\{1, 2, 3\}\) and the range is \(\{3, 5, 7\}\). Duplicates collapse: the relation \(\{(1, 4), (2, 4), (3, 4)\}\) has domain \(\{1, 2, 3\}\) but range just \(\{4\}\), since sets do not list a member twice. On a mapping diagram, the domain is the left column and the range is the right column of arrow tips. In a graph, the domain is read by projecting all points onto the x-axis and the range by projecting them onto the y-axis.
Functions: one output per input
A function is a relation that assigns each input exactly one output. A vending machine works this way when it does: press B7, always get the same snack. The relation \(\{(4, 2), (4, -2)\}\) fails the requirement, because the input 4 is paired with two different outputs. Notice what does not cause failure: \(\{(1, 4), (2, 4), (3, 4)\}\) is a genuine function even though every input gives the same output. The rule concerns inputs: an input may never be split between two outputs, but outputs may be shared freely.
Spotting a function
Each format has its own quick test. A list of pairs is a function exactly when no x-value appears twice with different y-values. A mapping diagram is a function when each input has exactly one arrow leaving it. A graph passes the vertical line test when no vertical line crosses the graph more than once — a vertical line marks a single input, and a second crossing would mean a second output. For an equation, solve for \(y\): the circle \(x^2 + y^2 = 25\) gives \(y = \pm\sqrt{25 - x^2}\), two outputs for most inputs, so a circle is not a function.
Function notation
Functions earn their own notation. Writing \(f(x)\), read "\(f\) of \(x\)", names the output that the function \(f\) assigns to the input \(x\). It is not multiplication: \(f\) is the rule, \(x\) is the input, \(f(x)\) is the result. The input variable is called independent — you choose it — and the output dependent, since it is determined by the input and the rule. With \(f(x) = x^2 - 3x\), the statement \(f(5) = 10\) means: feed 5 in, get 10 out. Different letters name different functions, like \(g\) or \(C\), and the letter inside just names the input.
Worked example: evaluating a function
Let \(f(x) = x^2 - 3x\). Evaluate \(f(5)\), \(f(-2)\) and \(f(a + 1)\). For \(f(5)\): \(5^2 - 3 \cdot 5 = 25 - 15 = 10\). For \(f(-2)\): \((-2)^2 - 3(-2) = 4 + 6 = 10\) as well — two different inputs may share an output, which is fine. For \(f(a + 1)\), substitute the whole expression for every \(x\): \((a + 1)^2 - 3(a + 1) = a^2 + 2a + 1 - 3a - 3 = a^2 - a - 2\). Checking with \(a = 4\): \(f(5) = 10\) and \(4^2 - 4 - 2 = 10\), so the expression substitution is right.
Worked example: a temperature function
Temperature conversion is a function you can use the same day you learn it: \(C(F) = \frac{5}{9}(F - 32)\) converts a Fahrenheit reading to Celsius. The input is independent — any Fahrenheit number goes in — and \(C(F)\) is the dependent output. A comfortable 68°F converts as \(C(68) = \frac{5}{9}(36) = 20\) degrees Celsius. Normal body temperature, 98.6°F, gives \(C(98.6) = \frac{5}{9}(66.6) = 37\) degrees. Each Fahrenheit input yields exactly one Celsius output, so the formula passes the function test by construction: it is one unambiguous rule.
Why one output matters
The single-output requirement is not pedantry; it is what makes functions predictable and useful. If a formula could return two answers for one input, a calculator could not display the result, a thermostat could not choose a setting, and "the" temperature conversion would be ambiguous. Science looks for functional relationships precisely because experiments that give one repeatable output per condition can be relied on. When a relation genuinely has two outputs per input, like height as a function of weight, algebra splits it into pieces that each pass, or restricts it, or names it not a function at all.
Common mistakes to avoid
First, reading \(f(x)\) as \(f\) times \(x\): it is the output for input \(x\). Second, rejecting a relation because outputs repeat: \(\{(1, 4), (2, 4)\}\) is a function; only repeated inputs with different outputs disqualify one. Third, confusing domain with range: domain is the set of inputs (x-values), range the set of outputs (y-values). Fourth, applying the vertical line test sloppily: horizontal lines are functions — every vertical line crosses one once — while vertical lines are not. Fifth, when evaluating at an expression like \(a + 1\), substitute it everywhere \(x\) appears, not just the first spot.
Key takeaways
A relation is any set of ordered pairs, viewable as a list, a mapping diagram or a graph; its domain is the set of inputs and its range the set of outputs. A function is a relation giving each input exactly one output — repeated outputs are allowed, split inputs are not. Tests: no repeated x with different y in a pair list, one arrow per input in a mapping, the vertical line test for graphs, and solving for y for equations (circles fail). \(f(x)\) names the output for input \(x\), with \(x\) the independent variable and the output dependent; evaluating at an expression means substituting it into every occurrence of \(x\). One output per input is exactly what makes a rule trustworthy for prediction.
Flashcards
Flashcard
Any set of ordered pairs
Test your understanding
Question 1 of 5
Which of these relations is a function?
Question 2 of 5
Is x² + y² = 25 a function of x?
Question 3 of 5
If f(x) = x² - 3x, what is f(-2)?
Question 4 of 5
If f(x) = 2x + 1, what is f(a + 2)?
Question 5 of 5
What is the domain of the relation {(0, 2), (3, 5), (4, 1)}?
