Sub topic 2
Four Ways to Show a Function
Assume you can plot points, simplify algebraic expressions, and solve basic equations. This chapter uses those skills to connect four common representations of a function: a mapping, a table, a graph, and an equation.
The central idea
A function is a rule that assigns exactly one output to each allowed input. The input is often called \(x\), and the output is often called \(y\) or \(f(x)\).
For example, consider the rule
\[ f(x)=2x+3. \]
Each input produces one output:
- \(f(0)=3\)
- \(f(1)=5\)
- \(f(4)=11\)
Different inputs may produce the same output. For example, \(h(x)=x^2\) gives \(h(-2)=4\) and \(h(2)=4\). That is allowed. The restriction is only that one input cannot produce two different outputs.
Mapping diagram
A mapping diagram shows inputs and outputs in separate sets. Arrows connect each input to its output.
A mapping represents a function when every input has exactly one arrow leaving it. Several arrows may point to the same output.
For example, these pairs do not describe a function:
\[ (1,2),\ (1,3),\ (2,4). \]
The input \(1\) has two outputs, \(2\) and \(3\). The relation fails the function rule.
Table of values
A table lists corresponding inputs and outputs.
| Input \(x\) | Output \(f(x)=2x+3\) |
|---|---|
| \(-1\) | \(1\) |
| \(0\) | \(3\) |
| \(2\) | \(7\) |
| \(4\) | \(11\) |
Each row represents an ordered pair, such as \((2,7)\). A table makes it easy to evaluate a function at selected inputs, but it usually shows only some of the function's values.
A table can also reveal patterns. Here, increasing \(x\) by \(1\) increases the output by \(2\), which matches the coefficient of \(x\) in the equation.
Graph
A graph represents each input-output pair as a point \((x,y)\) on the coordinate plane. The horizontal coordinate is the input, and the vertical coordinate is the output.
For \(f(x)=2x+3\), the table gives points such as \((-1,1)\), \((0,3)\), and \((2,7)\). Because this is a linear rule, the points lie on a straight line. The graph displays values for every input on that line, not just the inputs listed in the table.
The graph is especially useful for seeing trends, intercepts, and whether the outputs increase or decrease.
Equation or rule
An equation gives an algebraic procedure for finding the output. In
\[ f(x)=2x+3, \]
the expression \(2x+3\) is the rule. Replace \(x\) with an input, then simplify.
The same rule can be written in several equivalent ways:
\[ y=2x+3 \qquad\text{or}\qquad f(x)=2x+3. \]
The notation \(f(x)\) means “the output of function \(f\) at input \(x\).” It does not mean \(f\) multiplied by \(x\).
def f(x):
return 2 * x + 3
print(f(4)) # 11
print(f(-1)) # 1
print(f(1) + f(2)) # 12Translating between representations
The representations describe the same relationship in different forms.
- Start with the equation \(f(x)=2x+3\).
- Choose inputs, such as \(-1,0,2\).
- Evaluate the equation to create a table.
- Write each table row as an ordered pair.
- Plot the ordered pairs to create a graph.
- Draw mapping arrows from each input to its output.
A common error is to reverse the coordinates. The ordered pair \((2,7)\) means input \(2\), output \(7\), not the other way around.
Exercise
A relation contains the pairs (0, 4), (1, 6), (2, 8), and (1, 7). Is it a function? Explain.
Show answer
No. The input 1 is paired with both 6 and 7, so one input has two different outputs.