How to Restrict the Domain of a Function and Find Inverses

Restricting the domain of a function means deliberately limiting which input values (x-values) the function accepts. You do this by specifying a smaller set of x-values than the function would naturally allow. Sometimes the math forces a restriction because certain inputs break the function. Other times, you choose to restrict the domain yourself to make a function invertible or to build a piecewise definition.

Why Functions Need Domain Restrictions

There are two broad reasons to restrict a domain. The first is that certain operations in the function are undefined for some inputs. You can’t divide by zero, and you can’t take the square root of a negative number (at least not within real numbers). These are sometimes called “natural” restrictions because the math itself demands them. The second reason is strategic: you restrict the domain on purpose to give the function a property it wouldn’t otherwise have, like being invertible.

Finding Natural Restrictions

Some functions come with built-in limits on what you can plug in. The domain of any function includes all real input values that would not cause an undefined operation. To find these natural restrictions, look for two things in the function’s formula.

First, check for denominators. Any value of x that makes a denominator equal to zero must be excluded. For f(x) = 1/x, that means x = 0 is out. For f(x) = 1/(x − 3), you exclude x = 3.

Second, check for even roots (square roots, fourth roots, etc.). Any value of x that makes the expression inside the root negative must be excluded. For f(x) = √x, the domain is x ≥ 0 because you can’t take the square root of a negative number in the real number system.

If a function has no denominator and no even root, its domain is typically all real numbers. A simple polynomial like f(x) = x² + 3x − 5 accepts every real number as input with no issues.

How to Write a Restricted Domain

Once you’ve identified the restriction, you need to express it clearly. Two standard notations handle this.

Set-builder notation describes the domain as a set with a condition. For the square root function f(x) = √x, you’d write the domain as {x | x ≥ 0}, which reads “the set of all real numbers x such that x is greater than or equal to 0.” If you need to exclude a single value, like zero from f(x) = 1/x, you write {x | x ≠ 0}.

Interval notation uses parentheses and brackets to describe ranges. A parenthesis means the endpoint is not included; a bracket means it is. The domain {x | x ≥ 0} becomes [0, ∞) in interval notation. The domain {x | x ≠ 0} becomes (−∞, 0) ∪ (0, ∞), where the ∪ symbol means “union” and joins the two separate intervals together. For a restriction like −2 < x ≤ 3, the interval notation is (−2, 3], with a parenthesis on −2 (not included) and a bracket on 3 (included).

When you write a function with a chosen restriction, you state it alongside the rule. For example: f(x) = x², x ≥ 0. This tells anyone reading it that the function only applies to nonnegative inputs, even though x² is perfectly defined for negative numbers too.

Restricting a Domain to Create an Inverse

This is the most common reason students deliberately restrict a domain. A function only has an inverse that is also a function if it never produces the same output for two different inputs. Graphically, that means it passes the horizontal line test: no horizontal line crosses the graph more than once.

Consider f(x) = x². Without any restriction, this function fails the horizontal line test because, for example, both x = 3 and x = −3 give an output of 9. You can’t “undo” the squaring if you don’t know which input produced the result.

The fix is to cut the domain in half. If you restrict to x ≥ 0, you keep only the right side of the parabola, which steadily increases and passes the horizontal line test. Now the function has an inverse: f⁻¹(x) = √x. The restricted domain of the original (x ≥ 0) becomes the range of the inverse (y ≥ 0), and the range of the original (y ≥ 0) becomes the domain of the inverse (x ≥ 0).

You could also restrict to x ≤ 0, keeping the left side of the parabola instead. In that case the inverse would be f⁻¹(x) = −√x, the negative square root. The choice depends on context, but x ≥ 0 is the standard convention for the basic squaring function.

The same principle applies to any function that isn’t one-to-one over its full domain. To make it invertible, you pick a portion of the domain where the function is strictly increasing or strictly decreasing. That portion gives you a one-to-one relationship, which is exactly what an inverse requires.

Restricting Domains in Piecewise Functions

Piecewise functions are built by stitching together different formulas, each applying to a specific slice of the domain. Every piece has its own explicit domain restriction, and these restrictions must not overlap. If one piece covers x < 2 and another covers x ≥ 2, each input lands in exactly one piece. If a boundary value like x = 2 appeared in both pieces, the function would try to assign two outputs to the same input, which breaks the definition of a function.

It’s also possible for a boundary value to appear in neither piece. If one piece uses x < 2 and the next uses x > 2, then x = 2 is simply not in the domain, creating a gap or hole at that point. This is a legitimate choice depending on what the function needs to model.

Because piecewise functions define their domains explicitly with each piece, there’s no single “natural domain” to discover. You build the domain by combining the intervals from all the pieces. If a piecewise function has pieces defined on (−∞, 1), [1, 4), and [4, ∞), its overall domain is all real numbers. If one of those intervals is missing or shortened, the domain has a gap.

Practical Steps to Restrict Any Function

To restrict the domain of a function, follow a clear process. Start by identifying the full natural domain: all x-values where the function produces a real output. Then decide why you’re restricting. If the goal is to create an inverse, graph the function or analyze its formula to find a region where it’s strictly increasing or strictly decreasing. If the goal is to model a real-world situation, limit x to values that make physical sense (you can’t have negative time or a negative length, for instance).

Once you’ve chosen the restricted interval, write the function with the restriction stated explicitly. Use either set-builder notation ({x | 0 ≤ x ≤ 10}) or interval notation ([0, 10]), whichever your course or context expects. Always double-check that the restricted domain doesn’t include any values that would cause division by zero or a negative number under an even root.

A common mistake is restricting too much or too little. If you’re restricting for invertibility, your restricted piece should cover the full range of outputs you need. For f(x) = x² with x ≥ 0, the range is still all nonnegative numbers, so the square root inverse is defined for all nonnegative inputs. If you accidentally restricted to, say, 0 ≤ x ≤ 5, your inverse would only be defined for 0 ≤ x ≤ 25, which might not be what you want.