Domain of a Function
The domain of a function is the set of all possible input values that the independent variable can take—that is, the values for which the function produces a valid output. It is also referred to as the domain of definition or departure set, and is denoted by the letter \(D\), often accompanied by the name of the function as a subscript (\(D_f\)).
For real-valued functions of a real variable, the domain is a subset of the real numbers. Thus, the domain of a real function \(f\) is symbolically defined as:
$$D_f=\{x \in \mathbb{R} \mid \exists y \in \mathbb{R} \land y=f(x)\}$$
Recall that a function is a rule that assigns to each element in a set \(A\) a unique element in a set \(B\). Set \(A\) corresponds to the domain of the function, set \(B\) is the codomain, and the range is the subset of \(B\) consisting of the actual output values produced by the function.
The domains of real functions are most commonly expressed using interval notation or unions of intervals. Depending on their endpoints, these intervals can be open, closed, half-open, finite, or infinite.
Table of Contents
Explicit Domain and Natural Domain
A function may be given alongside an explicit domain, which restricts the allowed input values in advance. If no domain is specified and the function is defined solely by an algebraic formula, the domain is assumed to be the largest set of real numbers for which the operations in the expression are defined; this set is called the natural domain.
Example 1
Determine the domain of the function \(f(x)=2x+3\) defined for \(0 \le x < 6\).
Since the definition itself places a condition on the independent variable, \(x\) can only take values between \(0\) (inclusive) and \(6\) (exclusive). Therefore, its domain is the half-open interval \(D_f = [0, 6)\).
Example 2
Find the domain of the function \(g(x)=\dfrac{1}{x}\).
Notice that the division \(1/x\) can be performed for any real number except zero, since substituting \(x=0\) yields the expression \(1/0\), which is undefined. Thus, the natural domain of \(g\) in interval notation is \(D_g = (-\infty, 0) \cup (0, \infty)\).
Example 3
Identify the natural domain of the function \(h(x)=\sqrt{x}\).
Since it is not possible to take the square root of a negative number within the set of real numbers, the radicand must be greater than or equal to zero (\(x \ge 0\)). Consequently, the domain consists of all non-negative real numbers, which is written as \(D_h = [0, \infty)\).
How to Find the Domain of a Function
When a real function is defined by an equation without an explicit domain, we start by considering all real numbers (\(\mathbb{R}\)) and exclude any values of \(x\) that result in undefined operations. To find this natural domain systematically, follow these steps:
- Identify any operations with restrictions in the function's formula (such as denominators, even-index roots, or logarithms).
- Set up the equations or inequalities required to ensure that each of these operations yields a real number.
- Solve each condition separately and find the intersection of the resulting sets—that is, the values of \(x\) that satisfy all restrictions simultaneously.
The following table summarizes the main algebraic restrictions to avoid when analyzing the formula of a real function:
| Operation in the Formula | Restriction to Avoid | Condition to Set Up |
|---|---|---|
| Quotient or fraction: \(\dfrac{P(x)}{Q(x)}\) | Division by zero | \(Q(x) \neq 0\) |
| Even-index root: \(\sqrt[2n]{P(x)}\) | Negative radicand | \(P(x) \ge 0\) |
| Logarithm: \(\log_b(P(x))\) | Zero or negative argument | \(P(x) > 0\) |
| Even-index root in denominator: \(\dfrac{1}{\sqrt[2n]{P(x)}}\) | Zero or negative radicand | \(P(x) > 0\) |
Example 1
Find the natural domain of the function \(f(x)=\dfrac{3x}{2x-8}\).
Because the expression contains a fraction, we must prevent the denominator from equaling zero by setting up the condition \(2x-8 \neq 0\). Solving for the variable gives \(2x \neq 8\), so \(x \neq 4\). Consequently, the domain includes all real numbers except \(4\), which in interval notation is \(D_f = (-\infty, 4) \cup (4, \infty)\).
Example 2
Determine the domain of the function \(g(x)=\sqrt{6-2x}\).
Since this is a square root (an even-index root), we require the radicand to be greater than or equal to zero: \(6-2x \ge 0\). Subtracting \(6\) from both sides gives \(-2x \ge -6\), and dividing by \(-2\) flips the inequality sign, yielding \(x \le 3\). Therefore, the domain is the interval \(D_g = (-\infty, 3]\).
Example 3
Find the domain of the function \(h(x)=\dfrac{\ln(x+2)}{x-1}\).
This formula involves two simultaneous restrictions: the argument of the natural logarithm must be strictly positive (\(x+2 > 0\)), and the denominator cannot be zero (\(x-1 \neq 0\)). Solving the first condition gives \(x > -2\), while the second gives \(x \neq 1\). Intersecting both sets, the domain consists of all real numbers greater than \(-2\) excluding \(1\): \(D_h = (-2, 1) \cup (1, \infty)\).
Example 4
Obtain the domain of the function \(p(x)=\dfrac{x+5}{\sqrt{x-3}}\).
Here, the square root is in the denominator, so the radicand must be non-negative for the root to exist (\(x-3 \ge 0\)) and also non-zero to avoid division by zero (\(x-3 \neq 0\)). Both requirements combine into the strict inequality \(x-3 > 0\), which solves to \(x > 3\). Thus, the domain is \(D_p = (3, \infty)\).
Note: The domain must always be determined from the original expression of the function before performing any algebraic simplification. For instance, in \(f(x)=\dfrac{x^2-4}{x-2}\), factoring and simplifying before checking the denominator leaves \(x+2\), which might misleadingly suggest that the domain is \((-\infty, \infty)\). However, in the original formula, \(x=2\) makes the denominator zero, so the actual domain is \(D_f = (-\infty, 2) \cup (2, \infty)\). Once the domain is established, it is completely valid to work with the simplified expression.
In addition to algebraic analysis, the domain of a function can also be found from its graph by projecting the curve onto the horizontal axis (the \(x\)-axis); the set of values covered by this projection corresponds to the domain.

Domains by Type of Function
Identifying the algebraic or transcendental family to which a function belongs allows you to determine its natural domain directly or reduce the problem to a standard condition. Below, we examine the behavior of the main families of real functions.
Polynomial Functions
Polynomial functions are functions of the form \(f(x)=a_0+a_1x+a_2x^2+a_3x^3+\dots+a_nx^n\), where \(a_0, a_1, a_2, \dots, a_n\) are real numbers called coefficients. The domain of every polynomial function is the set of all real numbers (\((-\infty, \infty)\)), because addition, subtraction, and multiplication have no restrictions. That is, linear, quadratic, cubic, or higher-degree polynomial functions all have every real number in their domain.
Here are a few examples of polynomial functions and their domains:
- The domain of the linear function \(y=-3x+5\) is \((-\infty, \infty)\).
- The domain of the quadratic function \(f(x)=x^2+4x+5\) is \((-\infty, \infty)\).
- The domain of the cubic function \(y=-x^3+2x+4\) is \((-\infty, \infty)\).
Rational Functions
Rational functions are quotients of polynomial functions of the form \(f(x)=\dfrac{P(x)}{Q(x)}\). The domain of every rational function is the set of all real numbers except those values that make the denominator equal to zero (\(Q(x)=0\)).
Let us look at three common cases of rational functions:
- The domain of the function \(f(x)=\dfrac{1}{x+1}\) excludes \(x = -1\), since \(x+1 \neq 0\). Expressed in interval notation, the domain is \(D_f=(-\infty,-1)\cup(-1,\infty)\).
- For the function \(g(x)=\dfrac{x}{x^2-9}\), we require \(x^2-9 \neq 0\). Since \(x^2-9=(x-3)(x+3)\), the denominator is zero at \(x=3\) and \(x=-3\). In interval notation, the domain is \(D_g=(-\infty,-3)\cup(-3,3)\cup(3,\infty)\).
- For the function \(h(x)=\dfrac{2x}{x^2+4}\), setting the denominator equal to zero gives \(x^2+4=0\), or \(x^2=-4\). Because no real number squared equals a negative number, the denominator is never zero, and the domain is \(D_h=(-\infty, \infty)\).
Radical Functions
Radical functions are functions in which the independent variable appears inside a radical of index \(n\):
- The domain of radical functions with an even index is the set of all real numbers for which the radicand is defined and greater than or equal to zero.
- The domain of radical functions with an odd index is the set of all real numbers for which the radicand is defined, with no sign restriction.
We apply these rules in the following examples:
- For \(y=\sqrt{x+1}\), since the index is even, the radicand \(x+1\) cannot be negative. Setting \(x+1 \ge 0\) gives \(x \ge -1\), so the domain is \([-1,\infty)\).
- In the function \(y=\sqrt{1-x^2}\), the radicand \(1-x^2\) must be non-negative: \(1-x^2 \ge 0\). Solving gives \(x^2 \le 1\), and taking the square root of both sides yields \(|x| \le 1\), which is equivalent to \(-1 \le x \le 1\). Thus, the domain is the closed interval \([-1,1]\).
- For \(y=\sqrt[3]{x^2+\frac{2}{x}}\), there is no restriction from the radical itself because the index is odd; however, inside the radicand, the variable \(x\) appears in a denominator and cannot be zero. Therefore, the domain is \((-\infty, 0) \cup (0, \infty)\).
Logarithmic Functions
Logarithmic functions of any valid base (positive and not equal to 1) have as their domain the set of all real numbers that make their argument strictly positive.
Observe how the domain is determined for three different logarithmic functions:
- For \(y=\log(x)\), the domain consists of all real numbers such that \(x > 0\), which is the open interval \((0,\infty)\).
- In \(y=\ln(x-7)\), the argument \(x-7\) must be strictly positive: \(x-7 > 0\), which means \(x > 7\). The domain is therefore \((7,\infty)\).
- The function \(y=\log_2(x^2-9)\) requires its argument to be positive, so \(x^2-9 > 0\). Solving \(x^2 > 9\) gives \(|x| > 3\), which holds when \(x < -3\) or \(x > 3\). Consequently, the domain is \((-\infty,-3)\cup(3,\infty)\).
Exponential Functions
The domain of exponential functions of the form \(f(x)=b^{g(x)}\) (where \(b > 0\) and \(b \neq 1\)) is the set of all real numbers, unless the exponent \(g(x)\) contains an operation with restrictions.
Let us review three examples illustrating both the general case and restricted exponents:
- The natural exponential function \(y=e^x\) has no restrictions in its exponent, so its domain is all real numbers, \((-\infty, \infty)\).
- In \(y=e^{1/x}\), the variable \(x\) is in the denominator of the exponent and cannot equal zero. Aside from this exception, every real number produces an output, so the domain is \((-\infty, 0) \cup (0, \infty)\).
- For the function \(y=3^{\sqrt{x}}\), the exponent contains a square root that requires \(x \ge 0\). Therefore, the domain of the function is \([0,\infty)\).
Trigonometric Functions
The following table details the natural domains of the six basic trigonometric functions:
| Function | Expression | Domain |
|---|---|---|
| Sine | f(x) = sin(x) | \((-\infty, \infty)\) |
| Cosine | f(x) = cos(x) | \((-\infty, \infty)\) |
| Tangent | f(x) = tan(x) | \(\mathbb{R}\setminus\left\{\dfrac{\pi}{2}+k\pi \;\middle|\; k \in \mathbb{Z}\right\}\) |
| Cosecant | f(x) = csc(x) | \(\mathbb{R}\setminus\{k\pi \mid k \in \mathbb{Z}\}\) |
| Secant | f(x) = sec(x) | \(\mathbb{R}\setminus\left\{\dfrac{\pi}{2}+k\pi \;\middle|\; k \in \mathbb{Z}\right\}\) |
| Cotangent | f(x) = cot(x) | \(\mathbb{R}\setminus\{k\pi \mid k \in \mathbb{Z}\}\) |
Inverse Trigonometric Functions
When we invert the main trigonometric functions, their domains are determined by the output values that each trigonometric ratio can take:
| Function | Expression | Domain |
|---|---|---|
| Arcsine | f(x) = arcsin(x) | \([-1,1]\) |
| Arccosine | f(x) = arccos(x) | \([-1,1]\) |
| Arctangent | f(x) = arctan(x) | \((-\infty, \infty)\) |
| Arccosecant | f(x) = arccsc(x) | \((-\infty,-1]\cup[1,\infty)\) |
| Arcsecant | f(x) = arcsec(x) | \((-\infty,-1]\cup[1,\infty)\) |
| Arccotangent | f(x) = arccot(x) | \((-\infty, \infty)\) |
Hyperbolic Functions
The natural domains of the hyperbolic functions are summarized in the following table:
| Function | Expression | Domain |
|---|---|---|
| Hyperbolic sine | f(x) = sinh(x) | \((-\infty, \infty)\) |
| Hyperbolic cosine | f(x) = cosh(x) | \((-\infty, \infty)\) |
| Hyperbolic tangent | f(x) = tanh(x) | \((-\infty, \infty)\) |
| Hyperbolic cosecant | f(x) = csch(x) | \((-\infty, 0) \cup (0, \infty)\) |
| Hyperbolic secant | f(x) = sech(x) | \((-\infty, \infty)\) |
| Hyperbolic cotangent | f(x) = coth(x) | \((-\infty, 0) \cup (0, \infty)\) |
Domain of a Piecewise Function
A piecewise-defined function (or piecewise function) is made up of different algebraic expressions, each valid over a specific subinterval of the real number line. The overall domain of such a function is the union of the effective domains of each piece.
To avoid mistakes when analyzing piecewise functions, it is not enough to simply combine the intervals listed to the right of each branch: you must also verify that the expression in each piece is defined across its assigned interval and check whether any boundary points are excluded from all branches.
Example
Determine the domain of the following piecewise function:
$$f(x) = \begin{cases} \dfrac{1}{x} & \text{if } x < 1 \\ x^2 + 1 & \text{if } 1 < x \le 4 \\ \sqrt{x - 4} & \text{if } x > 4 \end{cases}$$
We analyze each branch separately, taking into account both the stated interval and any restrictions inherent to its formula:
- In the first piece (\(x < 1\)), the expression \(\frac{1}{x}\) requires \(x \neq 0\). Excluding zero from the interval \((-\infty, 1)\) gives \((-\infty, 0) \cup (0, 1)\).
- In the second piece (\(1 < x \le 4\)), the polynomial expression \(x^2 + 1\) has no restrictions, so its effective domain is \((1, 4]\). Notice that \(x = 1\) is not included in this piece or in the previous one.
- In the third piece (\(x > 4\)), the radicand \(x - 4\) is strictly positive for all \(x > 4\), so the square root is defined across the entire interval \((4, \infty)\).
Taking the union of the sets obtained from all three branches, the intervals \((1, 4]\) and \((4, \infty)\) connect at \(x = 4\), while \(0\) and \(1\) remain excluded. Therefore, the domain of the function is \(D_f = (-\infty, 0) \cup (0, 1) \cup (1, \infty)\).
Domain of Operations on Functions
If two real functions \(f\) and \(g\) have domains \(D_f\) and \(D_g\), respectively, the domain of their sum, difference, and product equals the intersection of their original domains—that is, the values of \(x\) where both functions are simultaneously defined:
$$D_{f+g} = D_{f-g} = D_{f \cdot g} = D_f \cap D_g$$
In the case of division \(f/g\), in addition to requiring both functions to be defined, we must exclude any values that make the denominator equal to zero:
$$D_{f/g} = (D_f \cap D_g) \setminus \{x \in \mathbb{R} \mid g(x) = 0\}$$
Meanwhile, for the composite function \((f \circ g)(x) = f(g(x))\), a number \(x\) belongs to its domain if it lies in the domain of the inner function \(g\) and, at the same time, its output \(g(x)\) lies in the domain of the outer function \(f\):
$$D_{f \circ g} = \{x \in D_g \mid g(x) \in D_f\}$$
Example
Given the functions \(f(x) = \sqrt{x}\) and \(g(x) = x - 2\), find the domain of \(f+g\), \(f-g\), \(f \cdot g\), \(f/g\), and \(f \circ g\).
First, we identify the individual domains: \(D_f = [0, \infty)\) and \(D_g = (-\infty, \infty)\). The intersection of both sets is \(D_f \cap D_g = [0, \infty)\), so this interval is the domain of \(f+g\), \(f-g\), and \(f \cdot g\).
For the quotient \((f/g)(x) = \dfrac{\sqrt{x}}{x-2}\), we exclude \(x = 2\) (where \(g(x) = 0\)) to obtain \(D_{f/g} = [0, 2) \cup (2, \infty)\).
Finally, for the composition \((f \circ g)(x) = \sqrt{x-2}\), we require \(g(x) \in D_f\), meaning \(x - 2 \ge 0\), which gives \(D_{f \circ g} = [2, \infty)\).
Domain Restriction
Although every algebraic expression has a natural domain, in mathematics it is common to intentionally restrict the domain of a function. This is typically done for two reasons: to adapt the function to the context of a real-world problem or to make the function one-to-one so that its inverse function can be defined.
Example 1
Analyze the domain of the area of a circle as a function of its radius, given by \(A(r) = \pi r^2\).
Looking solely at the polynomial formula, its natural domain would be \((-\infty, \infty)\). However, because \(r\) represents the length of a geometric radius, only positive values make physical sense, restricting the domain to \(r > 0\), or \(D_A = (0, \infty)\).
Example 2
Restrict the domain of the quadratic function \(f(x) = x^2 + 7\) to ensure that it is one-to-one.
The natural domain of \(f(x) = x^2 + 7\) is \((-\infty, \infty)\), on which the function is not one-to-one (for example, \(f(-5) = f(5) = 32\)) and therefore does not have an inverse function. If we restrict its domain by specifying \(f(x) = x^2 + 7\) for \(x > 4\) (or even starting from \(x \ge 0\)), the function becomes strictly increasing over its entire domain and is thus invertible.
Did you find this useful? Rate it!
Leave a Reply


Related Articles