Function Notation

Learning Outcomes

• Write functions using algebraic notation
• Use the vertical line test to determine whether a graph represents a function

Some people think of functions as “mathematical machines.” Imagine you have a machine that changes a number according to a specific rule such as “multiply by $3$ and add $2$” or “divide by $5$, add $25$, and multiply by $−1$.” If you put a number into the machine, a new number will pop out the other end having been changed according to the rule. The number that goes in is called the input, and the number that is produced is called the output.

You can also call the machine “f” for function. If you put x into the box, f(x), comes out. Mathematically speaking, x is the input, or the “independent variable,” and f(x) is the output, or the “dependent variable,” since it depends on the value of x.

$f(x)=4x+1$ is written in function notation and is read “f of x equals $4x$ plus $1$.” It represents the following situation: A function named f acts upon an input, x, and produces f(x) which is equal to $4x+1$. This is the same as the equation $y=4x+1$.

Function notation gives you more flexibility because you do not have to use y for every equation. Instead, you could use f(x) or g(x) or c(x). This can be a helpful way to distinguish equations of functions when you are dealing with more than one at a time.

Using Function Notation

Once we determine that a relationship is a function, we need to display and define the functional relationship so that we can understand it, use it, and possibly even program it into a computer. There are various ways of representing functions. A standard function notation is one representation that facilitates working with functions.

Now you try it.

Example

Represent height as a function of age using function notation.

Now try another.

Example

1. Write the formula for perimeter of a square, $P=4s$, as a function.
2. Write the formula for area of a square, $A=l^{2}$, as a function.

This would make it easy to graph both functions on the same graph without confusion about the variables.

We can also use an algebraic expression as the input to a function. For example $f\left(a+b\right)$ means “first add a and b, and the result is the input for the function f.” The operations must be performed in this order to obtain the correct result.

A General Note: Function Notation

The notation $y=f\left(x\right)$ defines a function named $f$. This is read as “$y$ is a function of $x$.” The letter $x$ represents the input value, or independent variable. The letter $y$ or $f\left(x\right)$, represents the output value, or dependent variable.

Example

Use function notation to represent a function whose input is the name of a month and output is the number of days in that month.

Note that the inputs to a function do not have to be numbers; function inputs can be names of people, labels of geometric objects, or any other element that determines some kind of output. However, most of the functions we will work with in this book will have numbers as inputs and outputs.

Example

A function $N=f\left(y\right)$ gives the number of police officers, $N$, in a town in year $y$. What does $f\left(2005\right)=300$ represent?

In the following videos we show two more examples of how to express a relationship using function notation.

Graphs of Functions

When both the independent quantity (input) and the dependent quantity (output) are real numbers, a function can be represented by a graph in the coordinate plane. The independent value is plotted on the x-axis and the dependent value is plotted on the y-axis. The fact that each input value has exactly one output value means graphs of functions have certain characteristics. For each input on the graph, there will be exactly one output. For a function defined as $y = f(x)$, or y is a function of $x$, we would write ordered pairs $(x, f(x))$ using function notation instead of $(x,y)$ as you may have seen previously.

We can identify whether the graph of a relation represents a function because for each x-coordinate there will be exactly one y-coordinate.

When a vertical line is placed across the plot of this relation, it does not intersect the graph more than once for any values of x.

If, on the other hand, a graph shows two or more intersections with a vertical line, then an input (x-coordinate) can have more than one output (y-coordinate), and y is not a function of x. Examining the graph of a relation to determine if a vertical line would intersect with more than one point is a quick way to determine if the relation shown by the graph is a function. This method is often called the “vertical line test.”

You try it.

Example

Use the vertical line test to determine whether the relation plotted on this graph is a function.

The vertical line method can also be applied to a set of ordered pairs plotted on a coordinate plane to determine if the relation is a function.

Example

Consider the ordered pairs $\{(−1,3),(−2,5),(−3,3),(−5,−3)\}$ plotted on the graph below. Use the vertical line test to determine whether the set of ordered pairs represents a function.

Now consider the set of ordered pairs $\{(3,−1),(5,−2),(3,−3),(−3,5)\}$. One of the inputs, $3$, can produce two different outputs, $−1$ and $−3$. You know what that means—this set of ordered pairs is not a function. A plot confirms this.

Notice that a vertical line passes through two plotted points. One x-coordinate has multiple y-coordinates. This relation is not a function.

In the following video, we show another example of determining whether a graph represents a function using the vertical line test.