The Domain and The Image of The Function

The previous articles showed us how to define a function and how to draw a graph of a function.

The Domain of a Function

This article will be about the magical “for all x” part in the function definition:

f(x) = x2, for all x.

Why is it there? Let’s suppose two functions defined by this table:

f1: Input f1: Output f2: Input f2: Output
1 1 1 1
2 4 2 4
3 9 3 9
4 16 4 16
5 25 5 25
6 36

We have two functions, f1 and f2. Are they same (except for the name)? We can see that f1(2) = 4 as well as f2(2) = 4. This equality holds for each number from 1 to 5. But still, there is input 6. f1(6) = 36 but there is no output for f2(6). We say that the function f2 is not defined for input x = 6. This means that the two functions f1 and f2 are not the same. They are different functions.

The magical formula “for all x” tells us for which x is the function defined. When we described what is a function we said that A function is a rule that assigns one real number to another real number. It means that function can be defined for all real numbers. But it also means that a function can be defined for some subset of real numbers.

Our first example of a function was a function that converts inches to centimeters. We can now define this function f this way:

f(x) = x · 2.54.

I intentionally forgot the “for all” part. Clearly, we can compute the output value of input value − 10 if we want: f( − 10) = − 25.4. But does it make sense? Remember, this function convert inches to centimeters. Does it make sense to convert minus ten inches to centimeters? Can your brand new 4K 3D TV has screen size of minus 42 inches? You can have TV which is ten inches smaller than your neighbour’s TV but you cannot have negative size TV screen.

In the end, you can convert just non-negative number of inches to centimeters. It doesn’t make much sense to convert negative number of inches to centimeters. Thus we can define our function f properly this way:

f(x) = x · 2.54, for all x ≥0.

We restricted our function just to non-negative numbers. Now we can compute f(10) but the value f( − 4) is not defined. The set of real numbers for which is function f defined is called domain of the function f and it’s denoted by D(f).

We can say that the domain of the function f is the set of all non-negative real numbers. We can go back to our function f1 and f2 defined by the table. The domain of these functions are values from its first column. Thus

D(f1) = {1, 2, 3, 4, 5, 6}.

The set of numbers for which is function f1 defined is the set {1, 2, 3, 4, 5, 6}. And it’s exactly the first column from the table. For the second function we have

D(f2) = {1, 2, 3, 4, 5}.

We can restrict the domain as we want. It’s entirely up to us. On the other hand we usually do not restrict the domain unless it’s necessary. Thus sometimes we don’t write the magic formula “for all x”. We write just

f(x) = x2

with meaning “for all x for which the function makes sense”. And the converse: if you see an exrsice in which you should find “the domain of a function”, it means find the greatest domain. Thus the domain of a function f is the set of all possible inputs of this function.

The Image of a Function

If a domain is a set of all inputs, then the range of a function is set of all its outputs. Let’s look back to our functions f1 and f2 defined above. We know that the domain of f1 is D(f1) = {1, 2, 3, 4, 5, 6} and it’s the first column of the table that defines the function. The range is the second column, the outputs. Thus the range of the function f1 is equal to {1, 4, 9, 16, 25, 36} and the range of f2 is equal to {1, 4, 9, 16, 25}.

Be aware: sometimes the word range is used instead of the word image. So when you see the term the range of a function it probably means the same as the image if a function.

Determining the Domain and the Image From the Graph

Each function has its own graph. Let’s take an example, the

f(x)=\frac{x^2}{6}

function. The graph follows:

Parabola

We can find the domain as follows: choose a point on horizontal axis, for example x = 4. Now draw a straight vertical line through this point. If this line intersect the graph, the point x is included in the domain. Otherwise it’s not.

Parabola

As you can see the vertical line does intersect the graph thus the point x is part of the domain. We can do it for all points on the horizontal axis. We’ll find out that all points are included in the domain and the domain are all real numbers.

What about the image? It’s the same, just for different axis. We choose a point on vertical axis and we draw a straight horizontal line and if this line intersects the graph, the point is part of the image. We can test for y = 2 and for y = − 1:

Parabolad

We can see that the horizontal line for the point y = 2 intersects the graph, the other line does not. It means that the number 2 is part of the image and the number 1 is not. If we try it for all point on vertical axis we’ll find out that the image of this function is all non-negative real numbers.

Exercise

Find the domain and the image of the following functions.

(1)     f(x) = 4x − 3

This one is easy. Can we substitute x for each real number? Yes, we can! Thus the domain of this function is , the whole set of real numbers.

What about the image? First, we convert the function definition to a equation: y = 4x − 3. It’s just the matter of notation, because usually f(x) = y. Then we solve the equation for x.

\begin{array}{rclr} y&=&4x-3\\-4x+y&=&-3\\-4x&=&-3-y\\4x&=&y+3&\quad \mbox{ dividing by }4\\x&=&\frac{y+3}{4}\end{array}

Can we substitute the y for each real number? Yes, we can. Thus the image of f is the whole set of real numbers again. We can draw the graph to verify our results:

Graph function f(x)=4x-3

We can see that the graph is a straight line the goes to infinity.

(2)\qquad f(x)=\frac{1}{x-2}

Can we substitute x for each real number? No, we cannot since we cannot divide by zero. Thus the denominator cannot be equal to zero:

\begin{array}{rcl} x-2&\ne&0\\x&\ne&2\end{array}

The domain of the function are all real number except of 2. Now the image. Again, we convert it to equation and solve it for x:

\begin{array}{rclr} y&=&\frac{1}{x-2}&\quad \mbox{ multiplying by }(x-2)\\y\cdot(x-2)&=&1\\yx-2y&=&1&\quad +2y\\yx&=&1+2y&\quad \mbox{ dividing by } (y)\\x&=&\frac{1+2y}{y}\end{array}

Can we substitute y for each real number? No, we cannot. The denominator must not be zero, thus the image of this function is all real number except of 0. We can draw the graph to verify our results:

Graph of function f(x)=1/x-2

The only number that is not part of the domain is the number − 2 and it’s the point on horizontal axis for which the vertical line (the grey dashed line) does not intersect the graph. The only number that is not part of the image is the number 0 and it’s exactly the point on vertical axis for which the horizontal axis does not intersect the graph. All correct.