# 79 1.1 Review of Functions – Calculus Volume 1 | OpenStax (MathJax chapter import test)

In this section, we provide a formal definition of a function and examine several ways in which functions are represented—namely, through tables, formulas, and graphs. We study formal notation and terms related to functions. We also define composition of functions and symmetry properties. Most of this material will be a review for you, but it serves as a handy reference to remind you of some of the algebraic techniques useful for working with functions.

### Functions

Given two sets

$AA$and

$B,B,$a set with elements that are ordered pairs

$(x,y),(x,y),$where

$xx$is an element of

$AA$and

$yy$is an element of

$B,B,$is a relation from

$AA$to

$B.B.$A relation from

$AA$to

$BB$defines a relationship between those two sets. A function is a special type of relation in which each element of the first set is related to exactly one element of the second set. The element of the first set is called the input; the element of the second set is called the output. Functions are used all the time in mathematics to describe relationships between two sets. For any function, when we know the input, the output is determined, so we say that the output is a function of the input. For example, the area of a square is determined by its side length, so we say that the area (the output) is a function of its side length (the input). The velocity of a ball thrown in the air can be described as a function of the amount of time the ball is in the air. The cost of mailing a package is a function of the weight of the package. Since functions have so many uses, it is important to have precise definitions and terminology to study them.

### Definition

A function

$ff$consists of a set of inputs, a set of outputs, and a rule for assigning each input to exactly one output. The set of inputs is called the domain of the function. The set of outputs is called the range of the function.

For example, consider the function

$f,f,$where the domain is the set of all real numbers and the rule is to square the input. Then, the input

$x=3x=3$is assigned to the output

$32=9.32=9.$Since every nonnegative real number has a real-value square root, every nonnegative number is an element of the range of this function. Since there is no real number with a square that is negative, the negative real numbers are not elements of the range. We conclude that the range is the set of nonnegative real numbers.

For a general function

$ff$with domain

$D,D,$we often use

$xx$to denote the input and

$yy$to denote the output associated with

$x.x.$When doing so, we refer to

$xx$as the independent variable and

$yy$as the dependent variable, because it depends on

$x.x.$Using function notation, we write

$y=f(x),y=f(x),$and we read this equation as

$“y“y$equals

$ff$of

$x.”x.”$For the squaring function described earlier, we write

$f(x)=x2.f(x)=x2.$

The concept of a function can be visualized using Figure 1.2, Figure 1.3, and Figure 1.4.

Figure
1.2
A function can be visualized as an input/output device.
Figure
1.3
A function maps every element in the domain to exactly one element in the range. Although each input can be sent to only one output, two different inputs can be sent to the same output.
Figure
1.4
In this case, a graph of a function $ff$has a domain of

${1,2,3}{1,2,3}$and a range of

${1,2}.{1,2}.$The independent variable is

$xx$and the dependent variable is

$y.y.$

### Media

We can also visualize a function by plotting points

$(x,y)(x,y)$in the coordinate plane where

$y=f(x).y=f(x).$The graph of a function is the set of all these points. For example, consider the function

$f,f,$where the domain is the set

$D={1,2,3}D={1,2,3}$and the rule is

$f(x)=3−x.f(x)=3−x.$In Figure 1.5, we plot a graph of this function.

Figure
1.5
Here we see a graph of the function $ff$with domain

${1,2,3}{1,2,3}$and rule

$f(x)=3−x.f(x)=3−x.$The graph consists of the points

$(x,f(x))(x,f(x))$for all

$xx$in the domain.

Every function has a domain. However, sometimes a function is described by an equation, as in

$f(x)=x2,f(x)=x2,$with no specific domain given. In this case, the domain is taken to be the set of all real numbers

$xx$for which

$f(x)f(x)$is a real number. For example, since any real number can be squared, if no other domain is specified, we consider the domain of

$f(x)=x2f(x)=x2$to be the set of all real numbers. On the other hand, the square root function

$f(x)=xf(x)=x$only gives a real output if

$xx$is nonnegative. Therefore, the domain of the function

$f(x)=xf(x)=x$is the set of nonnegative real numbers, sometimes called the natural domain.

For the functions

$f(x)=x2f(x)=x2$and

$f(x)=x,f(x)=x,$the domains are sets with an infinite number of elements. Clearly we cannot list all these elements. When describing a set with an infinite number of elements, it is often helpful to use set-builder or interval notation. When using set-builder notation to describe a subset of all real numbers, denoted

$ℝ,ℝ,$we write

${x|xhas some property}.{x|xhas some property}.$

We read this as the set of real numbers

$xx$such that

$xx$has some property. For example, if we were interested in the set of real numbers that are greater than one but less than five, we could denote this set using set-builder notation by writing

${x|1

A set such as this, which contains all numbers greater than

$aa$and less than

$b,b,$can also be denoted using the interval notation

$(a,b).(a,b).$Therefore,

$(1,5)={x|1

The numbers

$11$and

$55$are called the endpoints of this set. If we want to consider the set that includes the endpoints, we would denote this set by writing

$[1,5]={x|1≤x≤5}.[1,5]={x|1≤x≤5}.$

We can use similar notation if we want to include one of the endpoints, but not the other. To denote the set of nonnegative real numbers, we would use the set-builder notation

${x|0≤x}.{x|0≤x}.$

The smallest number in this set is zero, but this set does not have a largest number. Using interval notation, we would use the symbol

$∞,∞,$which refers to positive infinity, and we would write the set as

$[0,∞)={x|0≤x}.[0,∞)={x|0≤x}.$

It is important to note that

$∞∞$is not a real number. It is used symbolically here to indicate that this set includes all real numbers greater than or equal to zero. Similarly, if we wanted to describe the set of all nonpositive numbers, we could write

$(−∞,0]={x|x≤0}.(−∞,0]={x|x≤0}.$

Here, the notation

$−∞−∞$refers to negative infinity, and it indicates that we are including all numbers less than or equal to zero, no matter how small. The set

$(−∞,∞)={x|xis any real number}(−∞,∞)={x|xis any real number}$

refers to the set of all real numbers.

Some functions are defined using different equations for different parts of their domain. These types of functions are known as piecewise-defined functions. For example, suppose we want to define a function

$ff$with a domain that is the set of all real numbers such that

$f(x)=3x+1f(x)=3x+1$for

$x≥2x≥2$and

$f(x)=x2f(x)=x2$for

$x<2.x<2.$We denote this function by writing

$f(x)={3x+1x≥2x2x<2.f(x)={3x+1x≥2x2x<2.$

When evaluating this function for an input

$x,x,$the equation to use depends on whether

$x≥2x≥2$or

$x<2.x<2.$For example, since

$5>2,5>2,$we use the fact that

$f(x)=3x+1f(x)=3x+1$for

$x≥2x≥2$and see that

$f(5)=3(5)+1=16.f(5)=3(5)+1=16.$On the other hand, for

$x=−1,x=−1,$we use the fact that

$f(x)=x2f(x)=x2$for

$x<2x<2$and see that

$f(−1)=1.f(−1)=1.$

### Example 1.1

#### Evaluating Functions

For the function

$f(x)=3x2+2x−1,f(x)=3x2+2x−1,$evaluate

1. $f(−2)f(−2)$
2. $f(2)f(2)$
3. $f(a+h)f(a+h)$

### Checkpoint1.1

For

$f(x)=x2−3x+5,f(x)=x2−3x+5,$evaluate

$f(1)f(1)$and

$f(a+h).f(a+h).$

### Example 1.2

#### Finding Domain and Range

For each of the following functions, determine the i. domain and ii. range.

1. $f(x)=(x−4)2+5f(x)=(x−4)2+5$
2. $f(x)=3x+2−1f(x)=3x+2−1$
3. $f(x)=3x−2f(x)=3x−2$

### Checkpoint1.2

Find the domain and range for

$f(x)=4−2x+5.f(x)=4−2x+5.$ 