                   # Domain and Range

The domain of a function is the set of all possible input values. If the domain is not specified, we usually take it to be the set of all real numbers for which the function is defined. The range of a function is the set of all outputs or in other words, the set of all possible answers when the domain values are substituted for the input variable. When a function is given by a formula the range is often difficult to determine. If we can graph the function, we can look at its graph to determine the range.

### Example  A Function Given by a Table of Values

The following table gives U.S. population in millions in the indicated year:
 Year 1960 1970 1980 1990 U.S.  Population (in millions) 181 205 228 250
Source:  Statistical Abstracts of the United States,1993. We can think of population as depending on time in years so the independent variable or input is the year and the dependent variable or output is the U. S. population.  Since the table gives a unique population for each year, it represents a function. The domain is the set of years {1960, 1970, 1980, 1990} and the range is the set of populations in those years {181 million, 205 million, 228 million, 250 million}.

### Example  A Rational Function

Determine the domain of the function .

### Solution

The function g(x) is not defined when x = 3 since division by 0 is not allowed.  The only problem in evaluating g(x) occurs when the denominator equals 0, that is, when x = 3, so the domain of g is the set of all real numbers except 3. In set notation we write or in interval notation .
In general, the domain of a rational function is the set of all numbers for which the denominator is not zero. Since , the range is the set of all real numbers except 0.

### Example The Square Root Function

A different kind of situation is presented by the square root function No negative numbers can be substituted for x because you can't take the square root of a negative number and get a real number.  But anything else is O.K. to substitute for x, so the domain of h is the set of all non-negative real numbers, or .
Since for all x, the range is also the set of non-negative real numbers.

### Example  Linear Functions

Determine the domain and range of the linear function ### Solution

Since any real number can be substituted for x, the domain consists of all real numbers. A graph of the function in Figure 1 below shows that the range is also the set of all real numbers. Figure 1

### Example

Determine the domain and range of the quadratic function Solution Again, since any real number can be substituted for x, the domain consists of all real numbers. Since the graph of this function is a parabola opening up, it has a minimum value, which is the y-coordinate of the vertex. Using the vertex formula we find that the vertex is and .
So, the range is .
See Figure 2. Figure 2

### Example  Polynomial Functions

The domain of a polynomial function is always the set of all real numbers. However, the range depends on the particular function, so you should always graph the function to determine the range. As an example, consider the cubic function whose graph is shown in Figure 3. Figure 3

### Example The Sine and Cosine Functions

Recall that the sine and cosine are functions of a real number , the radian measure of an angle. Also, given any real number , there is an angle with measure radians. So, the domain of these two trigonometric functions is the set of all real numbers.  Since the maximum output value is 1 and the minimum output value is 1, the range is the interval [-1, 1].

### Example  A Function Representing a Real-World Situation

There are practical considerations to take into account when the function represents a real problem. Consider the function J(p) = the unemployment rate (percentage of people unemployed) when the gross national product is p.

### Solution

The input is the gross national product, the monetary value of all goods produced in the country.  Thus   p ³ 0 and the domain of function J is all non-negative real numbers, . The range of the function is the set of real all numbers between 0 and 100 since the unemployment rate is a percentage.  