# Domain

The domain of a function is the set of all possible input values that produce a real output. In other words, the domain indicates the interval over which the function is defined.

Consider f(x) = x. The graph of f(x) is a straight line that extends in either direction towards infinity. For every x value along the line, there is a corresponding y value. Thus, the domain of f(x) = x is all real values, or {x∈ℝ}.

As another example, the graph below shows a function that has a stricter domain:

The function only exists on the interval [0, 4], so this is its domain. Note that the domain of a function can be specified in various ways, such as interval notation, set notation, or using inequalities. For example the domain of the above function can also be specified as 0 ≤ x ≤ 4, or {x∈ℝ, 0 ≤ x ≤ 4}. The various notation used are described further below.

Being able to specify the domain of a function is important because we need to know where the function is defined in order to be able to work with the function; if we input a value that is not within the domain of the function, we will not get a meaningful result.

While it is relatively simple to specify the domain of a function graphically, we often need to determine the domain of a function without having access to its graph. In these cases we need to examine the function algebraically to determine where it is undefined. Generally, if a function is undefined at input values that result in division by zero, or when the argument of an even root is a negative number (e.g. ). Also, it is helpful to be familiar with the domains of functions comprised of common expressions such as polynomials, rational functions, square roots, exponents, and logarithms:

- Rational functions: Given a rational function , the domain of f(x) is {x∈ℝ, Q(x) ≠ 0}. In other words, the function is defined for all values except for those that make the denominator 0.
- Even roots: Given a function that has an even root, such as , the domain of f(x) is {x∈ℝ, x ≥ 0}
- Logarithms: Given a logarithm of any base (base e, base 10, base 2, etc.), the argument must be greater than 0 for the function to be defined, so its domain is {x∈ℝ, x > 0}
- Exponents: {x∈ℝ}
- Polynomials: {x∈ℝ}

Examples

State the domains of the following functions:

1.

2.

3.

1. For a rational function to exist, its denominator cannot be 0, so we factor the denominator, set it equal to 0, and solve for x. The resulting x value(s) are the point(s) at which f(x) is undefined:

Setting x + 2 = 0 and x - 4 = 0, we find that x = -2 or 4. Thus, the domain of f(x) is {x∈ℝ| x ≠ -2 or x ≠ 4}

2. The argument of a function that has an even root must be 0 or greater for the output to be a real number, so we solve for this case:

Thus, the domain of g(x) is x ≥ 2.

3. When trying to determine the domain of a logarithmic function, the base, a is not relevant because all logarithms, regardless of base, are restricted to positive arguments. Thus, to determine the domain, we solve for the case that the argument is greater than 0:

The domain of h(x) in interval notation is therefore (-7/5, ∞).

## Different domain notations

The above examples made use of three different ways to specify the domain of a function: set notation, inequalities, and interval notation.

### Set notation

Set notation takes the following form:

As indicated by the figure, the above symbols read as "x is an element of the real numbers such that x is greater than two." In other words, x can be any real number as long as it is greater than 2. This is typically how set notation is used in the context of functions and real numbers; we start by stating that x is an element of the real numbers because we are not usually concerned with imaginary numbers when dealing with functions. In cases where we need to restrict the function, we add the restriction or condition such that our initial statement that {x∈ℝ} is true. The restriction can be an inequality, it can be a single x value, or it can be multiple x values; whatever is necessary to accurately define the function.

Examples

State the domains of the following functions using set notation.

1. f(x) = x^{2}

2. g(x) = √x

1. x^{2} is a polynomial that has no discontinuities and no points at which it is undefined. Thus, its domain is {x∈ℝ}.

2. √x is an even root, so its argument must be 0 or greater. Thus, its domain is {x∈ℝ | x ≥ 0}.

### Inequalities

Another way to specify the domain of a function is through use of inequalities (>, <, ≥, ≤). Depending on the complexity of the function, this may be done using a single inequality, or as a combination of multiple inequalities that describe which x values the function can take on.

Examples

State the domains of the following functions using inequalities.

1. f(x) = x^{2}

2. g(x) = √x

1. x^{2} is a polynomial that is defined for all x values, so its domain is -∞ < x < ∞.

2. √x is an even root, so its argument must be 0 or greater. Its domain is therefore x ≥ 0. Alternatively, it can also be expressed as 0 ≤ x < ∞.

### Interval notation

Interval notation is used to describe intervals using parentheses and brackets, where parentheses represent an open interval while brackets represent a closed interval.

An open interval is one that does not include the end values, while a closed interval is one that does. For example, the interval (11, 27), referred to as an open interval, indicates that the domain of the function is all values between 11 and 27, but not including 11 and 27; for the interval (11, 27], referred to as a half-closed or half-open interval, 11 is not within the domain, but 27 is; for the interval [11, 27], referred to as a closed interval, both 11 and 27 are within the domain, so the domain is all values between 11 and 27, including 11 and 27.

Examples

State the domains of the following functions using inequalities.

1. f(x) = x^{2}

2. g(x) = √x

1. x^{2} is defined for all x values, so its domain is (-∞, ∞). We use an open interval because x cannot equal ±∞.

2. √x is an even root, so its argument must be greater than or equal to 0. Its domain is therefore [0, ∞).