1.2 Functions

To Learning Outcomes

  • Determine if a graph is the graph of a function by using the Vertical Line Test.
  • Find the value of a function from a graph.
  • State the domain and range from the graph of a function in set-builder, inequality, and/or interval notation.
  • Evaluate functions at a given input value using an equation. Also, determine inputs resulting in the given output value
  • Using the equation of a function, state the domain in set-builder, inequality, and/or interval notation.

Functions

You should be familiar with functions from previous math courses. Here, we’ll do a quick review. 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 33 and add 22” or “divide by 55, add 2525, and multiply by 11.” If you put a number into the machine, a new number will come 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 “fffor function. If you put xx into the machine, f(x)f(x) (read “ff of xx“), comes out. Mathematically speaking, xx is the input, or the independent variable, and f(x)f(x) is the output, or the dependent variable, since it depends on the value of xx.

Relations and Functions

In mathematics, a relation is a set of ordered pairs. The set of first components of the ordered pairs is called the domain and the set of second components of the ordered pairs is called the range. In a set of ordered pairs, you find the domain by listing all of the input values (the xx-coordinates). To find the range, list all of the output values (the yy-coordinates).

A function is a special type of relation in which each domain value corresponds to exactly one range value.

If you find that you need more help understanding functions, please click on the link to learn more about functions.

Consider the following relation: {(2,0),(0,6),(2,12),(4,18)}{(2,0),(0,6),(2,12),(4,18)}.

For this relation, the domain is {2,0,4}{2,0,4} and the range is {0,6,12,18}{0,6,12,18}.

Is the above relation a function or not?

This relation is NOT a function because the input values are not unique, in other words, there is a repeated xx-value that corresponds to different yy-values.

Example

List the domain and range for the following relation where xx is the input and f(x)f(x) is the output and determine whether the relation given is a function. Remember each pair of xx and f(x)f(x) exists as a point (x,f(x))(x,f(x)) on the graph of the function .

 

 xx f(x)f(x)
33 44
22 22
11 11
22 44
33 44

 

In the following video we provide another example of identifying domain and range. Determine whether the table of values represents a function.

In the above video, each domain value corresponds to exactly one range value. No xx-coordinates were repeated so that relation is a function.

Function Notation

The notation y=f(x)y=f(x) defines a function named ff. The letter xx represents the input value, or independent variable. The letter yy or f(x)f(x), represents the output value, or dependent variable. When a function is defined by an equation, we usually use function notation.

For example, the equation y=3x+1y=3x+1 may also be written as f(x)=3x+1f(x)=3x+1. ff is the name of the function, xx is an input from the domain of the function, and f(x)f(x) is the function value at xx also called the output.

Inputs of Functions

A function can be evaluated at different values of xx. Given the function f(x)=3x+1f(x)=3x+1, find f(2)f(2). In other words, if xx is 22 find f(x)f(x). We must substitute 22 in place of xx and evaluate.
f(2)=3(2)+1=6+1=5f(2)=3(2)+1=6+1=5

So, when x=2x=2, f(x)=5f(x)=5 (or y=5y=5). This can be written as the ordered pair (2,5)(2,5) and it is a point on the graph of the line f(x)=3x+1f(x)=3x+1.

It is important to note that the parentheses that are part of function notation do not mean multiply. The notation f(x)f(x) does not mean ff multiplied by xx. Instead, the notation means “f of xf of x” or “the function of xx.” To evaluate the function, take the value given for xx, and substitute that value in for xx in the expression.

Let us look at a couple of examples.

ExAMple

Given f(x)=3x4f(x)=3x4, evaluate f(5)f(5).

 

Example

Given p(x)=2x2+5p(x)=2x2+5, evaluate p(3)p(3).

Example

Given f(x)=|4x3|f(x)=|4x3|, evaluate f(0)f(0), f(2)f(2), and f(1)f(1).

Outputs of Functions

Reconsider the equation y=4x+1y=4x+1, which represents a function. If instead of having a given input value, you have a known output value, you can find the input value that would give that output. For example, for an output value of 77, you can find the input value. First substitute y=7y=7 into the equation and then solve for xx.

y=4x+17=4x+171=4x8=4x84=x2=xx=2y=4x+17=4x+171=4x8=4x84=x2=xx=2

The output of 77 corresponds to an input of 22. These values make an ordered pair, (2,7)(2,7), that represents a point on the graph of this function. We will discuss this idea more fully later in this section.

In the next example, you will not be given the xx-value but instead you will be given a yy-value and asked to find the xx-value.

Example

Given f(x)=3x4f(x)=3x4, find the xx-value that yields an output of 55.

Try It

 

Graphs of Functions and the Vertical Line Test

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 xx-axis and the dependent value is plotted on the yy-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)y=f(x), or “yy is a function of xx“, we would write ordered pairs (x,f(x))(x,f(x)) using function notation instead of (x,y)(x,y) as you may have seen previously.

We can identify whether the graph of a relation represents a function because for each xx-coordinate there will be exactly one yy-coordinate. The blue relation graphed below represents a function. Notice that when a vertical line is placed over the graph, the line does not intersect the graph more than once for any value of xx. This indicates that the relation is a function.A graph of a semicircle. Four vertical lines cross the semicircle at one point each.If instead a graph shows two or more intersections with a vertical line, then an input (xx-coordinate) has more than one output (yy-coordinate), and yy is not a function of xx.

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.

Example

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

Graph with circle plotted - center at (0,0) radius = 2, more points include (2,0), (-2,0)

Find the Value of a Function from a Graph

 

Example

A function is graphed below.

graph of y=x

  1. For the given function, evaluate f(2)f(2).
  2. For the given graph of a function, find xx when f(x)=2f(x)=2.

ExAmple

A function is graphed below.

y=absolute value of x

  1. For the given function, evaluate f(1)f(1).
  2. For the given function, evaluate f(0)f(0).
  3. For the given graph of a function, find xx when f(x)=2f(x)=2.

Try It

 

Finding the Domain and Range of a Function from its Graph

Finding domain of different functions is often a matter of asking yourself, “what values of xx can this function not have?” Pictures make it easier to visualize what the domain and range are, so we will first show how to define the domain and range of functions given their graphs. What are the domain and range of the function f(x)=x+3f(x)=x+3?
This is a linear function. Remember that linear functions are lines that continue forever in each direction.

Graph of the function [latex]f(x)=x+3[/latex]

Graph of the function f(x)=x+3f(x)=x+3

For this function, any real number can be substituted for x and you will get a meaningful output. Also, for any real number, you can always find an x value that gives you that number for the output. Unless a linear function is a constant, such as f(x)=2, there is no restriction on the range. For the function f(x)=x+3, the domain and range are all real numbers. We can write this domain and range in a variety of formats.

Domain Range
Set-Builder Notation {x|all real numbers} {y|all real numbers}
Inequality Notation [latex]-\infty [latex]-\infty
Interval Notation (,) (,)

 

For the examples that follow, try to figure out the domain and range of the graphs before you look at the answer.

Example

Use the graph to determine the domain and range of the function f(x)=3x2+6x+1.

Downward-opening parabola with vertex of 1, 4.

Exercises

Use the graph to determine the domain and range of the real-valued function f(x)=2+x+5.

Radical function stemming from negative 5, negative 2.

 

Try the following problem, remembering to look at the graph for the lowest and highest x-values that appear in the graph to find the domain, then for the smallest and highest y-values to find the range. Make sure to notice if the graph has arrows or endpoints. That will change how you write your answer.

Try It

In the following video we show how to define the domain and range of functions from their graphs.

Finding the Domain and Range from the Equation of a Function

For this discussion, we will restrict all functions to real number values for the domain and range. Even with this starting point, it does not mean that for any function we discuss that all real numbers can be used for x. It also does not mean that all real numbers can be function output values, f(x). There may be restrictions on the domain and range. The restrictions partly depend on the type of function.

Domain restrictions

In our course, there are two main reasons why domains are restricted.

  • You cannot divide by 0.
    If you have a function like f(x)=1x2, the domain has to be restricted so that no inputs make the denominator zero. For this example, x cannot be 2 because if you replace x with 2, you will end up with the denominator as zero which is undefined. The domain would be (,2)(2,).
  • You cannot take the square (or other even) root of a negative number, as the result will not be a real number.
    If you have a function like f(x)=x, the domain has to be restricted so that we don’t take the square root of a negative number. Recall that the number or expression written under a root symbol is called the radicand. The radicand of a square (or other even) root must not be negative. Then the domain for this example would be x0 or [0,).

 

Example

State the domain of the function f(x)=x+1x3.

Example

State the domain of the function f(x)=2x+1.

In the following video, only watch the first example given. We will talk about the other two examples later in the course.

Try It

State the domain of the function f(x)=7x.