Skip to main content
All resources

Resources · Education

What Is Domain in Math?

The domain of a function is the set of input values it is allowed to accept. Finding it is a matter of asking what would break the expression: a zero denominator, an even root of a negative, or a logarithm of something not positive. This guide covers all three restrictions, the three notations for writing a domain, and how domain differs from range. The domain calculator works it out for an expression.

7 min read

Blake Boege
Blake BoegeFounder, Calculator AnswersPublished August 23, 2026

What is the domain in math?

The domain of a function is the complete set of input values the function is allowed to accept. If a value would make the rule undefined, it is not in the domain.

For f(x) = 2x + 3 the domain is every real number, because you can double and add three to anything. For f(x) = 1/(x − 3) the domain is every real number except 3, because at x = 3 the denominator is 3 − 3 = 0 and dividing by zero is undefined.

Domain vs range

Domain is what goes in; range is what comes out. The alphabetical order matches the flow, which is the most reliable way to keep them straight: domain before range, input before output, x before y.

Confusing them is the single most common error in this topic, and it usually shows up as answering a domain question with the set of outputs. what range means in math covers the other half of the pair in full.

How to find the domain

Rather than asking what is allowed, ask what would break. Three things break a real-valued expression, and each excludes a specific set of inputs.

The three restrictions that remove values from a domain
What breaksRestrictionExample
Division by zeroDenominator cannot be 01/(x - 3) needs x ≠ 3
Even root of a negativeRadicand must be ≥ 0√(x - 2) needs x ≥ 2
Logarithm of zero or lessArgument must be > 0log(x) needs x > 0

If none of the three appear, the domain is all real numbers. Polynomials always have that domain, which is why they are the easy case.

Set the offending part equal to the boundary and solve. For √(x − 2), solve x − 2 ≥ 0 to get x ≥ 2. Note the boundary itself is included here, because √0 = 0 is perfectly defined — unlike the division case, where the boundary is excluded.

How to write a domain

Three notations are in common use and they say the same thing.

Three ways of writing the same domain
NotationExample for x ≥ 2Example for x ≠ 3
Inequalityx ≥ 2x ≠ 3
Interval[2, ∞)(-∞, 3) ∪ (3, ∞)
Set-builder{x | x ≥ 2}{x | x ≠ 3}

In interval notation a square bracket includes the endpoint and a round one excludes it. Infinity always takes a round bracket, because it is not a value you can reach.

Domain outside pure algebra

A domain can also be narrowed by what the variable means, not just by what the arithmetic allows.

If C(n) = 3n + 20 gives the cost of making n items, the algebra accepts n = −4 or n = 2.5 quite happily. Neither is a sensible number of items, so the practical domain is the non-negative whole numbers. Textbooks call this the natural or implied domain versus the domain in context, and questions often expect the second without saying so.

Common mistakes

  • Giving the range instead. Domain is inputs. Alphabetical order is the mnemonic.
  • Excluding the boundary of a square root. √(x − 2) needs x ≥ 2, not x > 2, because the root of zero is defined.
  • Missing a second restriction. An expression can have a fraction and a root; both apply.
  • Cancelling before finding the domain. Simplifying (x² − 9)/(x − 3) to x + 3 hides that 3 was never allowed.

Quick summary

  • The domain is the set of inputs a function accepts.
  • Ask what would break: a zero denominator, an even root of a negative, a logarithm of zero or less.
  • If none apply, the domain is all real numbers.
  • Domain is input, range is output, in alphabetical order.

The domain calculator works the restrictions out for an expression, and what a function is covers why a function has a domain at all.

Run the numbers

Frequently asked questions

The domain of a function is the complete set of input values it is allowed to accept. Any value that would make the rule undefined, such as one producing a zero denominator, is excluded from the domain.

Ask what would break the expression. A denominator cannot be zero, an even root cannot take a negative, and a logarithm needs a positive argument. Exclude the values that violate those, and whatever is left is the domain. If none apply, the domain is all real numbers.

Domain is the set of inputs, range is the set of outputs. Domain comes before range alphabetically, just as input comes before output, which is a reliable way to remember which is which.

All real numbers except 3. At x = 3 the denominator becomes 3 - 3 = 0, and division by zero is undefined, so that single value is removed from the domain.

The values that keep the expression under the root at zero or above. For the square root of (x - 2) the domain is x >= 2. The boundary is included because the square root of 0 is 0, which is perfectly defined.

Three notations are common and equivalent: inequality (x >= 2), interval ([2, infinity)), and set-builder ({x | x >= 2}). In interval notation a square bracket includes the endpoint and a round bracket excludes it. Infinity always takes a round bracket.

Yes. Every function has a set of inputs it accepts, even if that set is all real numbers. Polynomials such as 2x + 3 have no restrictions at all, which is why they are the easy case.

A domain narrowed by what the variable means rather than by the arithmetic. If C(n) = 3n + 20 is the cost of making n items, the algebra accepts -4 and 2.5, but neither is a sensible count, so the practical domain is the non-negative whole numbers.