Table of Contents
When working with functions, it is helpful to think of them as machines that take something in (an input), do a specific job, and then produce something out (an output). The input–output idea is the core of what a function is.
In this chapter, we focus on that idea without going into formal function notation, which has its own section.
The function as a “machine”
Imagine a machine on a table.
- You feed in a number.
- The machine performs a fixed rule or process.
- The machine spits out a result.
The key point: a function always follows the same rule. For the same input, you always get the same output.
For example, suppose the machine doubles any number you put in. If you put in $3$, it outputs $6$. If you put in $10$, it outputs $20$. The rule is:
$$
\text{output} = 2 \times \text{input}
$$
Here:
- “input” is the number you feed in,
- “output” is the result after the rule is applied.
If the input is $x$, the output is $2x$.
Input–output tables
An input–output table is a simple way to keep track of how a function works. It shows the rule in action on several example inputs.
For the doubling rule above:
- Rule: multiply the input by $2$.
- In words: “Take the input and double it.”
An input–output table might look like this:
- Input: $1,\ 2,\ 3,\ 4,\ 5$
- Output: $2,\ 4,\ 6,\ 8,\ 10$
The table is not the function itself; it just shows some examples of how the function behaves.
Another example: a function that adds $5$ to the input.
- Rule: add $5$ to the input.
- Formula: $\text{output} = \text{input} + 5$.
Sample table:
- Input: $0,\ 1,\ 4,\ 10$
- Output: $5,\ 6,\ 9,\ 15$
To fill such a table, you apply the same rule to each input.
Describing rules in different ways
The same input–output rule can be described in several ways:
- In words: “Triple the number and then subtract $1$.”
- As a formula: $\text{output} = 3 \times \text{input} - 1$.
- In a table: list several input values and their outputs.
For example, for the rule “triple the number and subtract $1$”:
- Formula: $\text{output} = 3 \cdot \text{input} - 1$.
- Table:
- Input: $0,\ 1,\ 2,\ 3$
- Output: $-1,\ 2,\ 5,\ 8$
You should be able to:
- read a verbal description and produce a few input–output pairs,
- look at a table and say in words what the rule is (or at least describe it roughly),
- match a table with a simple formula if one fits.
Working from input to output
Given a rule and an input, you find the output by substituting the input into the rule and calculating.
Example: rule “multiply by $4$ and add $3$”:
$$
\text{output} = 4 \times \text{input} + 3
$$
- If the input is $2$:
- $4 \times 2 + 3 = 8 + 3 = 11$, so the output is $11$.
- If the input is $-1$:
- $4 \times (-1) + 3 = -4 + 3 = -1$, so the output is $-1$.
Here the inputs are $2$ and $-1$, and the outputs are $11$ and $-1$.
Working backward from output to input (informally)
Sometimes you know the output and the rule, and you want to find what input produced it. This is “working backward.”
Using the same rule:
$$
\text{output} = 4 \times \text{input} + 3
$$
Suppose the output is $19$. Which input gives that?
You look for an input such that $4 \times \text{input} + 3 = 19$.
- First, think: “What number times $4$ plus $3$ is $19$?”
- Subtract $3$ from $19$: you get $16$.
- Now you want $4 \times \text{input} = 16$.
- $4 \times 4 = 16$, so the input must be $4$.
So input $4$ gives output $19$.
You do not need to solve such equations formally here; the main idea is just that the same rule connects input and output in either direction.
One input, one output
A key idea about functions is that each allowed input has exactly one output.
Using the rule $\text{output} = 2 \times \text{input}$:
- Input $3$ always gives output $6$.
- Input $3$ never gives both $6$ and $7$. That would break the rule.
So:
- If you know the rule and an input, the output is determined.
- You can think of the rule as a reliable process: same input, same output, every time.
Different inputs, sometimes the same output
Different inputs can sometimes produce the same output. That does not break the function idea.
Example rule:
$$
\text{output} = \text{input}^2
$$
Here $\text{input}^2$ means “input multiplied by itself.”
- If the input is $2$, the output is $4$.
- If the input is $-2$, the output is also $4$.
So:
- Input $2 \to$ output $4$.
- Input $-2 \to$ output $4$.
The function still gives only one output for each input. It is allowed that different inputs share the same output.
Inputs that are not numbers
Often in algebra we use numbers as inputs, but the input–output idea is more general. The input can be many kinds of things, as long as the rule tells you clearly what to do with them.
For example:
- Input: a word. Rule: output the number of letters in the word.
- Input “cat” $\to$ output $3$.
- Input “school” $\to$ output $6$.
- Input: a time of day. Rule: output the temperature at that time.
- Input “2 p.m.” $\to$ output $25^\circ\text{C}$.
- Input “6 p.m.” $\to$ output $22^\circ\text{C}$.
In later work, we mostly use numbers, but keep in mind that the input–output concept itself is broader.
Real-world input–output examples
Many real-life situations can be seen as input–output relationships.
- Taxi fare:
- Input: number of kilometers traveled.
- Output: total cost of the trip.
- Rule (for example): “Start at \$3.00 and add \$1.50 for each kilometer.”
- Weekly pay:
- Input: hours worked in a week.
- Output: amount of money earned.
- Rule (simple case): “Multiply the hours by the hourly wage.”
- Temperature conversion:
- Input: temperature in degrees Celsius.
- Output: temperature in degrees Fahrenheit.
- Rule (in formula form): $\text{Fahrenheit} = \dfrac{9}{5} \times \text{Celsius} + 32$.
Each of these is a function: a clear rule that takes an input and produces an output.
Recognizing when something is not a function
Not every input–output setup describes a function. It is not a function if some inputs are assigned more than one output.
Consider a “machine” that:
- takes an input number,
- and then:
- sometimes outputs double the number,
- and other times outputs triple the number, without any clear rule.
If input $4$ could give either $8$ or $12$ depending on the day, then the rule is not fixed and this is not a function.
The input–output concept for functions always assumes:
- each input has exactly one output according to the rule.
Summary
- A function can be thought of as a machine that takes an input and produces an output using a specific rule.
- Input–output tables show how the rule works on several example inputs.
- The same rule can be described by words, formulas, or tables.
- For each input, there is exactly one output; different inputs can share the same output.
- Many real-world relationships can be seen as input–output rules, and thus as functions.