What Is the Domain of a Function?

Before this, knowRelations in Math - Definition & Examples

Interactive · 1 question

What is Domain?

The domain of a function is all the possible xx-values, or inputs, that that function can take. This includes positive numbers and negative numbers.

If a function is a vending machine you can think of the domain as the different forms of payment you can use in order to get a candy bar. Maybe you use dollars, maybe quarters, or maybe you just aggressively shake the machine and hope for the best.

The best way to understand this, though, is to look at a graph.

Finding Domain Graphically

Suppose we wanted to find the domain for the following graphed function.

The line y = 1/2x from -2 to 4 where -2 is not included.

Recall that the open circle means that that point is not included.

Made using Desmos

What are the xx-values that this function takes? We basically want to identify the inputs.

Our graph starts at −2-2 on the xx-axis and goes to 44 on the xx-axis. Since there's an open circle on −2,-2, we don't include it in the domain.

Because the graph is only defined between −2-2 and 44 on the xx-axis, our domain is only between −2-2 and 44. More precisely, the domain is: D:  −2<x≤4D:\,\,-2<x\le4

Notice we didn't say D:  −2  ≤  x≤4D:\,\,-2\,\,{\color{#8925ae}{\le}}\,\,x\le4 because −2-2 is not included in the domain!

Interval Notation

One way to write the domain of a graph is by using interval notation.

We start from the left and write the intervals that xx is defined on. Use brackets, []\left[\quad\right], when the endpoints are included and parentheses, ()\left(\quad\right), when the endpoints are excluded.

Using the graph above, the domain would be: D:  (−2,4]D:\,\,(-2,4] Because −2-2 is not included we use a parentheses. 44 is included so we use a bracket.

There are three more points that our example hasn't covered.

  1. All real numbers. If our domain is any real number value, we can say it spans from negative infinity to infinity, (−∞,∞).(-\infty, \infty ). But more concisely, we use the symbol R\mathbb{R} to say the domain is all real numbers.
  2. Infinities. If our domain spans continuously from a point to the left or right, we say it goes to negative infinity or positive infinity respectively. When using interval notation for infinity we always use parentheses, since infinity isn't a point. For example, we might write (−∞,5)(-\infty, 5) or [24,∞).[24, \infty).
  3. Multiple intervals. If a graph has multiple segments you might need to use multiple intervals. We can use the union symbol, ∪\cup, to join them together. So if a graph's domain is defined from −2-2 to 11 and then from 44 to infinity, we can write: D:  [−2,1]∪[4,∞)D:\,\,[-2,1]\cup[4,\infty).

Finding Domain Algebraically

Sometimes you'll be given an equation and asked to find its domain. You can graph it but that might not always be easy.

When looking at an equation, we just have to find the xx-values that would "break" the equation, or cause it to be undefined.

For example, if you were given a linear number line like y=xy=x, you can say the domain is all real numbers. No xx-value you plug in causes the equation to be undefined.

Now, suppose you have y=1xy=\frac1x. If we plug in x=0x=0, we get a zero in the denominator which we can't have. This "breaks" the equation. So we say the domain is all real numbers except 00.

Luckily, there are only a few cases to keep an eye out for.

  1. Fractions. As explained above, fractions "break" if their denominator equals 00.
  2. Square roots. Square roots break if there is a negative value under the root.

Example 1

We want to find the domain for f(x)=x+13−xf(x)=\frac{\sqrt{x+1}}{3-x} Notice there's both a fraction and a square root to tackle.

Let's start with the fraction. We know the denominator cannot be equal to 00 (you can't divide by 00!). denominator≠03−x≠0\begin{align} \text{denominator}&\ne0\\ 3-x&\ne0 \end{align} Solving for xx will show us a value of xx that is not in the domain. 3−x≠03≠x\begin{align} 3-x&\ne0\\ 3&\ne x \end{align} When x=3x=3 we get a 00 in the denominator and our function "breaks", so we can exclude that from the domain.

Next, we have to look at the square root. The function expression under the root cannot be negative. expression under root≥0x+1≥0\begin{align} \text{expression under root}&\ge0\\ x+1&\ge0 \end{align} Solving for xx will give us that values that give us nonnegative terms. x+1≥0x≥−1\begin{align} x+1&\ge0\\ x&\ge-1 \end{align} As long as xx is greater than or equal to −1-1, our function is defined. In other words, an xx values less than −1-1 gives us a negative square root which "breaks" our function.

Finally, we write the domain. We know xx has to be a number greater than or equal to −1-1 and it cannot be equal to 33. We have two intervals: a portion from −1-1 to 33 (not included) and a portion from 33 (not included) to infinity. D:  [−1,3)∪(3,∞)D:\,\,[-1,3)\cup(3,\infty)

Graphing this, we see we were correct.

Graph of the function f(x) = sqrt(x+1) / 3-x

Made using Desmos

Practice Problem

Determine the domain of the following function. f(x)=1x−1f(x)=\frac{1}{\sqrt{x-1}}

Choose one answer

Video · + 1 min read

(Video) Introduction to Functions

by mathman1024

In this video, mathman1024 explains the basics of functions. He goes over what the domain is and how you find it.

Summary\large{\text{Summary}}

Relations can be a set of ordered pairs: {(2,3),(4,1),(0,1),(2,−2),(−1,5)}\{(2,3),(4,1),(0,1),(2,-2),(-1,5)\} Or they can be a continuous graph:

A graph of y = sin x.

This graph is made up of an infinite number of ordered pairs.

Made using Desmos

Domain

When we talk about relations or functions, we want to talk about the domain and range. The domain is the set of xx-values used in the relation.

You can describe the domain of a set by just listing the xx values of all the ordered pairs in the set.

In the example set above, {(2,3),(4,1),(0,1),(2,−2),(−1,5)}\{(2,3),(4,1),(0,1),(2,-2),(-1,5)\}, the domain is D={−1,0,2,4}D=\{-1,0,2,4\} (notice that there are multiple 22's in the relation but only one was written down for the domain).

What about the graph above? The domain is all real numbers, since the xx values span from negative infinity to positive infinity. This can be written in a couple different ways: D=(−∞,∞)D=(-\infty,\infty) or D=RD=\mathbb{R}. The R\mathbb{R} symbol is used to represent the set of all real numbers.

Interactive · 1 question

Domain of a Function

The domain of a function is the set of all valid inputs for the function. A valid input yields a valid output. For example, say your function is f(x)=x+1f(x)=x+1

You can plug any real number into this function and get a valid output. For example: f(1)=1+1=2f(5.5)=5.5+1=6.5f(π)=π+1f(1)=1+1=2\\ f(5.5) = 5.5+1=6.5\\ f(\pi) = \pi+1

Since any real number works, we say that the domain of this function is the set of all real numbers. In other words, the domain of f(x)f(x) is R.\mathbb{R}.

Set A is the Domain. It is represented by a large oval with 6 dots in it, each with an arrow pointing out of it to another dot in Set B. Two dots from Set A are pointing to the same dot in Set B. Set B is the Codomain, and it has 6 dots. 5 of these dots have arrows pointing to them from Set A. The set of these 5 dots is the Range.

Don't worry about range (or codomain) for now.

Image source: By Musical Inquisit CC BY-SA 4.0, via Wikimedia Commons

However, sometimes the domain is more restricted. For example, let's look at the following function: g(x)=1xg(x)=\frac{1}{x}

You can definitely plug in most numbers and get a valid output. For example: g(1)=11=1g(5.5)=15.5=0.18‾g(π)=1π≈0.31830988618g(1)=\frac{1}{1}=1\\ g(5.5)=\frac{1}{5.5} = 0.\overline{18}\\ g(\pi)= \frac{1}{\pi}\approx 0.31830988618

These outputs may not always be integers or rational numbers (like g(π)g(\pi)) but they are still valid real numbers.

But what happens if we have an input of 0?0? g(0)=10g(0)=\frac{1}{0}

But wait...we learned earlier that dividing by zero is undefined — it will not yield a valid output! So, 00 is not a valid input, and we cannot include 00 in the domain for this function. All other values are valid, so they can be included in the domain. Because of this, our domain is the set of all real numbers, besides 0.0. In other words, the domain of g(x)g(x) is R∖{0}.\mathbb{R}\setminus \{0\}.

(Note: We did not write ‘‘R∖0"``\mathbb{R}\setminus 0" for the domain because the domain is a set, and to do a set minus operation (which is represented by the ∖\setminus symbol meaning "exclude") you need two sets. 00 is not a set, while {0}\{0\} is a set.)

Let's do another example!

What is the domain of h(x)=1x−2?h(x)=\frac{1}{x-2}?

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems