Domain Of A Function (6 Common Questions Answered)


When we talk about functions in math, we want to know what set of input values are valid (known as the domain).  Knowing the domain of a function also helps us to figure out the range (the set of output values).

So, what do you need to know about the domain of a function?  The domain of a function f(x) is the set of inputs that are “allowed” (so f(x) is defined for each x in the domain). The domain of a function can vary, depending on whether the function is complex-valued, real-valued, etc. Values of x in a domain are not repeated (a given input has only one output).

Of course, domain can vary quite a bit, from the entire set of real numbers to a single element (such as zero).  We need to examine the function itself and do some thinking to figure out its domain.

In this article, we’ll talk about the domain of a function and what it is.  We’ll also answer some common questions about domain and go through some examples to make the concept clear.

Let’s get started.

What Is The Domain Of A Function?

For a function f(x), its domain is the set of input values that produce a valid output.  That is, for every value of x in the domain, f(x) has a single well-defined value.

The notation we often use is f:A->B, where:

  • A is the domain of f(x) (input values)
  • B is the range of f(x) (output values)

For example, if we have the function f(x) = x2 and a domain of A = {0, 1, 2}, then the range is B = {0, 1, 4}.

If we take f(x) = x2 with a domain of real numbers, then the range is the set of nonnegative real numbers.

f(x) = x2
The graph of the quadratic function f(x) = x2.

The domain of a function can vary, depending on whether the function is complex-valued, real-valued, or otherwise.

For example, if the function f(x) = √x is real-valued, then it has a domain of nonnegative numbers (x >= 0).  The reason is that for any negative x, √x is imaginary.

On the other hand, if the function f(x) = √x is complex-valued, then it has a domain of all real numbers.  This is because imaginary outputs are allowed for a complex-valued function.

Note: if both the domain and range are subsets of the real numbers, then f(x) can be graphed on a 2-dimensional coordinate plane.

Can Domain & Range Be The Same?

Domain and range can be the same in certain situations.

One situation when domain and range are the same is when a function is its own inverse (called an involution).  That is:

  • f(x) = f-1(x), or
  • f(f(x)) = x

Some such involution functions include:

  • f(x) = x  (Also called the identity function.  Both the domain and range are the entire set of real numbers).
  • f(x) = a/x for any real number a  (Also called the reciprocal function for a = 1.  Both the domain and range are the set of nonzero real numbers, or R – {0}).
  • f(x) = -x + b for any real number b  (These are linear functions with a slope of -1.  Both the domain and range are the entire set of real numbers.  Note that this includes f(x) = -x, where b = 0).
graph of f(x) = x linear line
The graph of the linear function f(x) = x (also known as the identity function).

There are many other functions (besides involutions) where the domain and range are the same.

For example, the real-valued function f(x) = x3 has a domain and range of all real numbers.  (The same is true for any real-valued function g(x) = xM where M is an odd integer.

graph of f(x) = x3
The graph of the cubic function f(x) = x3.

The inverses of these functions (like f-1(x) = x1/3 or g-1(x) = x1/M) also have domain and range of all real numbers.

Another example is the real-valued function f(x) = |√x|.  Because of the radical, we can only have nonnegative numbers in the domain, and because of the absolute value symbol, we can only have nonnegative numbers in the range.

So, the domain and range are the same: the set of nonnegative real numbers.

graph of f(x) = abs(sqrt(x))
The graph of the function f(x) = |√x|.

Can Domain Repeat In A Function?

Domain cannot repeat in a function.  This is true by definition of a function.

Remember, a function is a specific type of relation: one where each input x has exactly one output y.  Without this property, a relation may have ambiguity (for example, we don’t know which output to use for a given input x).

Example: A Relation That Is Not A Function (Repeat In Domain)

Consider the relation defined by the ordered pairs {(1, 2), (1, 3), (2, 4)}.

Since the domain repeats the number 1 (input) for two different ordered pairs (1, 2) and (1, 3), this relation is not a function.

Can Domain Be All Real Numbers?

The domain of a function can be the set of all real numbers.  There are several examples where this is true:

  • f(x) = xN, where N is a positive integer.  (Whatever real value of x we choose, we just multiply it by itself N times to get a valid output f(x)).
  • f(x) = ax + b, where a and b are real numbers and a is not zero (linear functions).
  • f(x) = ax2 + bx + c, where a, b, and c are real numbers and a is not zero (quadratic functions).
graph of quadratic x2 -2x + 2
The graph of the quadratic function f(x) = x2 – 2x + 2.

This list is not exhaustive; there are many more examples besides the ones above.

Can Domain Be Zero?

The domain of a function can be just the number zero.  For example, if we have the real-valued function f(x) = √(-x2), then the domain is the number zero {0}, and every other real number input would lead to an imaginary output.

The domain of a function can include zero in some cases.  There are also cases where zero is excluded from the domain (for example, if it would lead to a zero denominator or the square root of a negative number).

Example 1: A Function With A Domain Of Zero

Consider the real-valued function f(x) = √(-x4).  The domain of this function is the set {0}, or just the number zero.

Every other real number leads to an imaginary output, since:

  • x4 is positive for any real x that is not zero
  • -x4 is negative for any real x that is not zero
  • f(x) = √(-x4) is imaginary for any real x that is not zero

Example 2: A Function Whose Domain Excludes Zero (Zero Denominator)

Consider the real-valued function f(x) = 1/x2.  The domain of this function is the set R – {0}, or the set of nonzero real numbers.

For x = 0, we have x2 = 0, which means a zero denominator for this function when x = 0.  So, f(x) is undefined at x = 0, and thus x = 0 is not included in the domain of the function.

For any nonzero real number x, we get x2 > 0, and 1/x2 is defined (and positive).  You can see the graph of this function below.

graph of 1 over x squared
The graph of the function f(x) = 1/x2.

Example 3: A Function Whose Domain Excludes Zero (Square Root Of A Negative Number)

Consider the real-valued function f(x) = √(x – 2).  The domain of this function is the set x >= 2, which excludes x = 0.

To see this, we note that x – 2 must be positive or zero (nonnegative) to avoid an imaginary output (square root of a negative).  So:

  • x – 2 >= 0
  • x >= 2
graph of square root of x minus 2
The graph of the function f(x) = √(x – 2)

Can Domain Be Negative?

In some cases, the domain of a function can be entirely made up of negative numbers.  For example, the real-valued function f(x) = √(-x-1) has the domain x <= -1, which is entirely made up of negative numbers.

graph of square root of -x minus 1
The graph of the function f(x) = √(-x-1).

Of course, a function’s domain can also include some negative numbers, but also some positive numbers and/or zero.

The key thing to remember is that the square root of a negative number is imaginary (which is undefined for a real-valued function).

In fact, any even root (fourth root, sixth root, eight root, etc.) of a negative number leads to a complex number with a nonzero imaginary part.

To prove this, assume we are taking an Nth root, where N is an even integer.  Then N = 2M, where M is an integer.  Then:

  • x1/N
  • =x1/2M
  • =(x1/2)1/M
  • =(√x)1/M

So, taking an even root of x amounts to taking a square root of x.

Example 1: A Function With A Negative Domain

Consider the real-valued function f(x) = √(-2x – 6).  The domain of this function is the set x <= -3, which includes only negative numbers.

Since f(x) is real-valued, we cannot take the square root of a negative number.  So, we need:

  • -2x – 6 >= 0
  • -2x >= 6
  • x <= -3
graph of square root of -2x minus 6
The graph of the function f(x) = √(-2x – 6).

Example 2: A Function Whose Domain Excludes Negative Numbers

Consider the real-valued function f(x) = √(x).  The domain of this function is the set x >= 0, which excludes negative numbers.

Since f(x) is real-valued, we cannot take the square root of a negative number.  So, we need:

  • x >= 0
graph of square root of x
The graph of the function f(x) = √(x).

How To Find The Domain Of A Function

To find the domain of a real-valued function, take the following steps:

  • Look at the denominator and solve for zero.  Exclude these values of x from the domain.
  • Look at the radicand (expression under the radical) of any even root (square root, fourth root, etc.).  Exclude any values of x that make the radicand negative from the domain.
  • Look at the argument of any logarithm.  Exclude any values of x that make this argument negative or zero (logarithm can only take positive values as arguments).

Here are some examples of how to find the domain of a function.

Example 1: Finding The Domain Of A Function (Zero Denominator)

Consider the real-valued function f(x) = 1 / (x – 1)(x – 2).  The domain of this function is the set of real numbers that are not equal to 1 or 2 (in other words, the set R – {1, 2}).

We can see this by solving for a zero denominator:

  • (x – 1)(x – 2) = 0
  • x – 1 = 0 OR x – 2 = 0
  • x = 1 OR x = 2
graph of 1 over (x-1)(x-2)
The graph of the function f(x) = 1 / (x – 1)(x – 2).

Example 2: Finding The Domain Of A Function (Negative Radicand)

Consider the real-valued function f(x) = 4√(x – 3).  The domain of this function is the set x >= 3.

We can see this by solving for a negative radicand:

  • x – 3 < 0
  • x < 3 (these numbers are excluded from the domain, since they result in an even root of a negative number).
graph of fourth root of x minus 3
The graph of the function f(x) = 4√(x – 3).

Example 3: Finding The Domain Of A Function (Negative Logarithm)

Consider the real-valued function f(x) = log(x – 2).  The domain of this function is the set x > 2.

We can see this by solving for a negative or zero argument for the logarithm:

  • x – 2 <= 0
  • x <= 2 (these numbers are excluded from the domain, since they result in a negative argument for a logarithm).
graph of log(x - 2)
The graph of the function f(x) = log(x – 2).

Conclusion

Now you know about the domain of a function and how to find it, along with the answers to some common questions.

You can learn about the differences between domain & range here.

I hope you found this article helpful.  If so, please share it with someone who can use the information.

Don’t forget to subscribe to my YouTube channel & get updates on new math videos!

~Jonathon

Recent Posts