<< Chapter < Page | Chapter >> Page > |
Consider the function $y=\sqrt{x}$ . If this function is given a 9 it hands back a 3. If this function is given a 2 it hands back…well, it hands back $\sqrt{2}$ , which is approximately 1.4. The answer cannot be specified exactly as a fraction or decimal, but it is a perfectly good answer nonetheless.
On the other hand, what if this function is handed –4? There is no $\sqrt{-4}$ , so the function has no number to hand back. If our function is a computer or calculator, it responds with an error message. So we see that this function is able to respond to the numbers 9 and 2, but it is not able to respond in any way to the number -4. Mathematically, we express this by saying that 9 and 2 are in the “domain” of the square root function, and –4 is not in the domain of this function.
A square root cannot successfully act on a negative number. We say that “The domain of $\sqrt{x}$ is all numbers such that ” meaning that if you give this function zero or a positive number, it can act on it; if you give this function a negative number, it cannot.
A subtler example is the function $y=\sqrt{x+7}$ . Does this function have the same domain as the previous function? No, it does not. If you hand this function a –4 it successfully hands back $\sqrt{3}$ (about 1.7). –4 is in the domain of this function. On the other hand, if you hand this function a –8 it attempts to take $\sqrt{-1}$ and fails; –8 is not in the domain of this function. If you play with a few more numbers, you should be able to convince yourself that the domain of this function is all numbers x such that $x\ge -7$ .
You are probably familiar with two mathematical operations that are not allowed . The first is, you are not allowed to take the square root of a negative number. As we have seen, this leads to restrictions on the domain of any function that includes square roots.
The second restriction is, you are not allowed to divide by zero. This can also restrict the domain of functions. For instance, the function $y=\frac{1}{{x}^{2}-4}$ has as its domain all numbers except $x=2$ and $x=-2$ . These two numbers both cause the function to attempt to divide by 0, and hence fail. If you ask a calculator to plug $x=2$ into this function, you will get an error message.
So: if you are given a function, how can you find its domain? Look for any number that puts a negative number under the square root; these numbers are not in the domain. Look for any number that causes the function to divide by zero; these numbers are not in the domain. All other numbers are in the domain.
Function | Domain | Comments |
---|---|---|
$\sqrt{x}$ | $x\ge 0$ | You can take the square root of 0, or of any positive number, but you cannot take the square root of a negative number. |
$\sqrt{x+7}$ | $x\ge -7$ | If you plug in any number greater than or equal to –7, you will be taking a legal square root. If you plug in a number less than –7 , you will be taking the square root of a negative number.This domain can also be understood graphically: the graph $y=\sqrt{x}$ has been moved 7 units to the left. See “horizontal permutations” below. |
$\frac{1}{x}$ | $x\ne 0$ | In other words, the domain is “all numbers except 0.” You are not allowed to divide by 0. You are allowed to divide by anything else. |
$\frac{1}{x-3}$ | $x\ne 3$ | If $x=3$ then you are dividing by 0, which is not allowed. If $x=0$ you are dividing by –3, which is allowed. So be careful! The rule is not “when you are dividing, x cannot be 0.” The rule is “ $x$ can never be any value that would put a 0 in the denominator.” |
$\frac{1}{{x}^{2}-4}$ | $x\ne \pm 2$ | Or, “ $x$ can be any number except 2 or –2.” Either of these $x$ values will put a 0 in the denominator, so neither one is allowed. |
${2}^{x}+{x}^{2}-\mathrm{3x}+4$ | All numbers | You can plug any $x$ value into this function and it will come back with a number. |
$\frac{\sqrt{x-3}}{x-5}$ | $\begin{array}{}x\ge 3\\ x\ne 5\end{array}$ | In words, the domain is all numbers greater than or equal to 3, except the number 5 . Numbers less than 3 put negative numbers under the square root; 5 causes a division by 0. |
You can confirm all these results with your calculator; try plugging numbers into these functions, and see when you get errors!
A related concept is range .
To illustrate this example, let us return to the function $y=\sqrt{x+7}$ . Recall that we said the domain of this function was all numbers $x$ such that $x\ge -7$ ; in other words, you are allowed to put any number greater than or equal to –7 into this function.
What numbers might come out of this function? If you put in a –7 you get out a 0. ( $\sqrt{0}=0$ ) If you put in a –6 you get out $\sqrt{1}=1$ . As you increase the $x$ value, the $y$ values also increase. However, if you put in $x=-8$ nothing comes out at all. Hence, the range of this function is all numbers $y$ such that $y\ge 0$ . That is, this function is capable of handing back 0 or any positive number, but it will never hand back a negative number.
It’s easy to get the words domain and range confused—and it’s important to keep them distinct, because although they are related concepts, they are different from each other. One trick that sometimes helps is to remember that, in everyday useage, “your domain” is your home, your land—it is where you begin. A function begins in its own domain. It ends up somewhere out on the range.
Domains and ranges above are sometimes expressed as intervals, using the following rules:
This is easiest to explain with examples.
This notation... | ...means this... | ...or in other words |
---|---|---|
$(-\mathrm{3,5})$ | All numbers between –3 and 5, not including –3 and 5. | $-3<x<5$ |
$[-\mathrm{3,5}]$ | All numbers between –3 and 5, including –3 and 5. | $-3\le x\le 5$ |
$[-\mathrm{3,5})$ | All numbers between –3 and 5, including –3 but not 5. | $-3\le x<5$ |
$(-\infty ,\text{10}]$ | All numbers less than or equal to 10. | $x\le \text{10}$ |
$(\text{23},\infty )$ | All numbers greater than 23. | $x>\text{23}$ |
$(-\infty ,4)$ $(\mathrm{4,}\infty )$ | All numbers less than 4, and all numbers greater than 4. In other words, all numbers except 4. | $x\ne 4$ |
Notification Switch
Would you like to follow the 'Functions' conversation and receive update notifications?