On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Advanced Functions · Grade 9-12

Domain

The domain is the complete set of input values a function accepts and returns a defined output for.

Dom(f)={x∈R∣f(x) is defined}

Quick Answer

The domain is the complete set of input values a function accepts and returns a defined output for. For a formula with no stated restriction, start with all real numbers and remove only the inputs that break a rule: a denominator equal to zero, a negative number under a square root, or a log of zero or a negative. In a real situation the context can trim it further, since a number of tickets cannot be −3 or 2.5.

Why This Matters

Knowing the domain stops you from feeding a formula a value it cannot handle, which is what makes a calculator say 'Error' and a spreadsheet show #DIV/0!. It shows where a graph has gaps or walls, and it decides which solutions survive: x2−4x−2=0 seems to give x=±2, but 2 is outside the domain, so only x=−2 counts.

Intuitive Explanation

Think of a calculator as the function. Type 1÷0 or −9 and it answers 'Error'. The domain is every input that never triggers that message. For most formulas almost everything is allowed, so it is quicker to find the few inputs that fail and remove them than to list the ones that work.

Three operations cause nearly every failure in real-number algebra. Division fails when the denominator is 0, so 5x+2 loses x=−2. An even root fails on negatives, so x−1 needs x≥1. A logarithm fails on zero and negatives, so log⁡x needs x>0. Adding, subtracting, multiplying and whole-number powers never fail, which is why every polynomial has domain 'all real numbers'.

The classic confusion is between a zero and a break. In x−4x+1, the input 4 gives 05=0, a perfectly good output, so 4 stays in. The input −1 gives −50, which has no value, so −1 goes out. Context can shrink the domain further: if C(n)=12n is the cost of n concert tickets, the formula happily computes C(−2), but the situation only allows n=0,1,2,…

Think of it like this. A domain is like the list of coins a vending machine accepts. Any coin on the list gets you a snack; a coin not on it is rejected before anything happens. Each denominator, square root or log in a formula adds another kind of coin the machine refuses.

Core idea. The domain is every input value you are allowed to feed in without breaking the rule.


When to Use

Find the domain when a formula has a denominator containing x, a square root or other even root, or a log; when a question asks where a function is defined or where its graph has gaps; and before trusting solutions to an equation built from those pieces. If the question is about which outputs are possible, you need the range. If it asks where the output equals zero, you are finding zeros, and those are inside the domain.

Tip. Ask: Which input values would make the rule undefined, and have I excluded exactly those?

How to Recognize It

Before writing a domain, scan the formula for every operation that can fail, then check whether the situation itself limits the inputs.

  1. Does x appear in a denominator?

    Yes means set the denominator equal to zero and remove those inputs: for 3x−2, drop x=2. Those removed values are not zeros of the function; zeros come from the numerator.

  2. Is x inside a square root, another even root, or a logarithm?

    A root needs its inside ≥0 and a log needs its inside >0, so x+4 needs x≥−4 and ln⁡(x−1) needs x>1. With none of these and no denominator, a plain formula accepts all real numbers.

  3. Does the real situation rule out inputs the formula would accept?

    Yes, as with a count of tickets or a time before launch, means you trim to a restricted domain, such as whole numbers from 0 to 200. No means the natural domain from the formula stands.

  4. Is the question about which outputs can appear rather than which inputs are allowed?

    Yes points to the range: f(x)=x2 accepts every real input but only outputs values ≥0. No means you are describing inputs, and the answer is a set of x-values.

Domain compared with Range, Restricted domain, and Zeros of the function

All four rows are sets of numbers attached to one function, so they are easy to swap. Ask which side the set lives on and why: inputs that are legal (domain or restricted domain), outputs that occur (range), or inputs that give zero (zeros).

Domain

Meaning
Use this when you need the set of legal input values, especially to exclude division by zero or negatives under a root.
Key test
Which input values would make the rule undefined, and have I excluded exactly those?
Formula
Dom(f)={x∈R∣f(x) is defined}
Example
Find the domain of f(x)=x+1x−3.

Range

Meaning
The set of output values the function actually produces, not the inputs it accepts.
Key test
Use when the question asks which y-values are possible, not which x-values are legal.
Formula
{f(x)∣x∈Dom(f)}
Example
f(x)=x2 has domain all reals but range y≥0

Restricted domain

Meaning
A domain deliberately narrowed by the problem, not the natural largest legal set.
Key test
Use when a context or an inverse forces a smaller input set than the formula allows.
Example
f(x)=x2 restricted to x≥0 to make it invertible

Zeros of the function

Meaning
The inputs where the output equals zero, not where the function is undefined.
Key test
Use when solving f(x)=0, not when finding legal inputs.
Formula
f(x)=0
Example
x−2=0 gives a zero at 2; for 1x−2 that same 2 is excluded from the domain

Formula & Notation

Dom(f)={x∈R∣f(x) is defined}
Dom(f)={x∈X∣∃ y∈Y:y=f(x)}

How to read it: Dom(f) or Df denotes the domain. Interval notation: (−∞,0)∪(0,∞) means all reals except 0.

Worked Examples

Example 1 — Domain with a denominator

Easy

Find the domain of f(x)=x+1x−3.
Show the steps and the answer
  1. Scan f(x)=x+1x−3 for operations that can fail: one division, no roots or logs.

    Only zero denominators, even roots of negatives and logs of non-positive numbers make a real-valued formula undefined.

  2. Set the denominator to zero: x−3=0 gives x=3.

    At x=3 the rule asks for 40, which has no value.

  3. Leave the numerator alone: x=−1 gives f(−1)=0−4=0, a real output.

    Zero on top makes the output zero; only zero on the bottom breaks the rule.

  4. Write every real except 3 in interval notation: (−∞,3)∪(3,∞).

    The union of two open intervals says 'all reals, with a gap at exactly 3'.

Answer: All reals except x=3, i.e. (−∞,3)∪(3,∞)

Takeaway: For a fraction, the domain is all reals minus the zeros of the denominator; zeros of the numerator stay in.

Example 2 — Range, not domain

Standard

For f(x)=x+1x−3, the question now asks which output value y can never occur. Same function?
Show the steps and the answer
  1. Notice that the question asks about outputs y, not inputs x.

    Excluding x=3 answered the domain question; a missing output is a range question and needs a different method.

  2. Set y=x+1x−3 and solve for x: y(x−3)=x+1, so yx−x=1+3y and x=1+3yy−1.

    An output y occurs exactly when some input x produces it, so solve for that input.

  3. Find the y with no matching x: the formula fails when y−1=0, that is y=1.

    Directly, x+1x−3=1 would need x+1=x−3, i.e. 1=−3, which is impossible.

  4. Connect it to the graph: for large x, x+1x−3 is close to xx=1, so the curve approaches y=1 without reaching it.

    The horizontal asymptote is the picture of the missing output.

Answer: y=1 is never reached (horizontal asymptote)

Takeaway: The domain gap comes from the denominator (x≠3); the range gap comes from solving for x (y≠1). Same function, two different questions.

Example 3 — Find the mistake: a root and a fraction

Application

Find the domain of h(x)=x+4x−1. Leo writes: "The denominator is zero at x=1, so the domain is all real numbers except 1." Find the mistake and correct it.
Show the steps and the answer
  1. Test an input Leo allowed: x=−5 puts −1 in the numerator.

    The square root of a negative number is not real, so Leo's domain contains inputs where the rule breaks.

  2. Add the root condition: x+4≥0, so x≥−4.

    Each operation that can fail needs its own condition, and Leo checked only the division.

  3. Keep the denominator condition: x≠1, since h(1)=50.

    Fixing the root does not remove the division problem; both conditions must hold at once.

  4. Combine them: x≥−4 and x≠1, which is [−4,1)∪(1,∞).

    x=−4 is allowed because h(−4)=0−5=0, so the bracket includes it; the parenthesis at 1 leaves the gap.

Answer: [−4,1)∪(1,∞)

Takeaway: List every operation that can fail (each denominator, each even root, each log), write one condition for each, and keep only the inputs that pass all of them.

Where You'll See It

  • Buying concert tickets

    At $15 a ticket the cost is C(n)=15n. The formula accepts any real n, but the situation allows only n=0,1,2,… up to the seats available. A booking site that let you buy 2.5 tickets, or charged you for −1, would be using the wrong domain.

  • Spreadsheet averages and #DIV/0!

    A teacher's sheet computes points per assignment as total points divided by assignments submitted. For a student who submitted none, the cell shows #DIV/0!: 0 is outside the formula's domain. The fix is a separate rule for that case, such as showing 'no work yet'.

Common Mistakes

  1. The slip: Listing where the function equals zero instead of where it is undefined

    Instead: the domain excludes undefined inputs, not roots.

  2. The slip: Forgetting to check both a denominator and a radical in the same problem

    Instead: scan for every operation that can fail.

  3. The slip: Stating the domain as y-values

    Instead: the domain is always the set of inputs (x), never outputs.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Find the domain of g(x)=x−4.

    Hint: The expression under a square root cannot be negative.

  2. Find the domain of h(x)=5x2−9.

    Hint: Find every input that makes the denominator zero.

  3. Find the domain of f(x)=x+2x−1.

    Hint: There are two operations that can fail here. Check each one.

  4. A rectangle has perimeter 20 cm. With width w cm, its area is A(w)=w(10−w). What is a sensible domain for w?

    Hint: Both the width and the other side, 10−w, must be real lengths.

  5. For f(x)=x2−4x, a question asks for which x values f(x)=0. Is that a domain question, or finding the zeros?

    Hint: Is the question about inputs that break the rule, or inputs that give a particular output?

  6. A student says the domain of f(x)=x−2x+5 is all real numbers except x=2. Find and correct the mistake.

    Hint: What happens to the output at x=2? Which input makes the denominator zero?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why is x=0 allowed in x but not in 1x?

Because 0=0\sqrt{0}=0 is a perfectly good output, so x\sqrt{x} is defined at 0. In 1x\frac{1}{\sqrt{x}} that same 0 lands in the denominator, and division by zero is undefined. So the root alone asks for x≥0x\ge 0, while the root in a denominator asks for x>0x>0. Whenever two rules apply to the same expression, the domain must satisfy both at once.

If I simplify x2−4x−2 to x+2, does the domain change?

The original function's domain does not change: x=2x=2 is still excluded, because the original formula divides by zero there. The simplified formula x+2x+2 agrees with it everywhere else, so the graph is the line y=x+2y=x+2 with a hole at (2,4)(2,4). Always find the domain from the formula as given, before any cancelling.

Can a domain be a list of separate numbers instead of an interval?

Yes. A sequence such as the nnth odd number, 2n−12n-1, has domain {1,2,3,… }\{1,2,3,\dots\}, the positive whole numbers. A function given by a table has exactly the inputs listed in the table. Real situations do this too: if C(n)C(n) is the cost of nn concert tickets, the domain is the whole numbers from 0 up to the tickets available, not every real number.

Why write the domain as (−∞,2)∪(2,∞) instead of just saying x≠2?

Both describe the same set, so both are correct; the interval form is what many exams and textbooks expect. Interval notation earns its keep when the domain has several pieces, such as [−3,1)∪(1,∞)[-3,1)\cup(1,\infty), where a square bracket includes an endpoint and a round one leaves it out. Infinity always gets a round bracket, since it is not a number you can include.

Learning Path

← Before

Function
Domain

You are here

You need Function first: a rule giving each input one output. Domain adds the question of which inputs the rule can accept at all, found by excluding zero denominators, negative radicands and non-positive log arguments. Next, Range asks the matching question about outputs, and Restricted Domain shows how a problem, or the need for an inverse, deliberately narrows the inputs.

See Also