Domain and Range in Mathematics
What is Domain?
The domain of a function is the set of all possible input values (x-values) for which the function is defined. Here we use real inputs and real outputs, with no extra interval restrictions; trigonometric angles are in radians.
Common Domain Restrictions:
- For division: Cannot divide by zero
- For square roots: Cannot take square root of negative numbers
- For logarithms: Input must be positive (greater than zero)
- For tangent: Input cannot be odd multiples of π/2
What is Range?
The range of a function is the set of all possible output values (y-values) that can be produced by the function.
Common Range Patterns:
- Linear functions (f(x) = mx + b): Range is all real numbers when m ≠ 0; when m = 0, the range is {b}
- Quadratic functions (f(x) = ax² + bx + c, a ≠ 0): Range starts or ends at the vertex, depending on the direction of the parabola
- Parent sine and cosine functions: Range is [-1, 1]
- Exponential functions (f(x) = aˣ): Range is (0, ∞) when a > 0 and a ≠ 1; when a = 1, the range is {1}
Domain and Range Calculator
Enter a function to find its domain and range
Supported: numeric constants and polynomials in x up to degree 12; one parent family: 1/x, sqrt(x), abs(x), sin(x), cos(x), tan(x), log(x), ln(x), e^x, or exp(x). Numeric scaling, vertical shifts, and nonconstant linear arguments work, such as -2*sqrt(x-3)+4 or 3/(2*x+1).
Use decimal or fraction coefficients, + − * / ^, and parentheses. Use parentheses for an exponent such as e^(2*x+1). log and ln both mean natural logarithm. Limits: 240 characters, powers up to 12. General even-degree polynomials above degree 2 may return an exact domain with a clearly marked undetermined range.
Other compositions, sums of different parent functions, variable denominators beyond the reciprocal family, and zero powers of expressions that may be zero are not supported. Unsupported input shows an error rather than a guessed answer.
Results for f(x) =
Domain
Range
Function Properties
Examples
Linear Function:
Quadratic Function:
Rational Function:
Square Root:
Sine Function:
Logarithm:
“If I put $2 in and sometimes get chips, sometimes a sandwich—that machine’s busted.”
Imagine a teacher using that vending-machine analogy to explain domain = allowed inputs, range = attained outputs. Specify the selected snack as part of the input: each allowed input has one output. Let’s make it stick.
Turbo FAQ 🎯
| Question | Insta-Answer |
|---|---|
| Snappy definitions? | Domain = all x’s you’re allowed to plug in. Range = all y’s that actually pop out. |
| Graph test? | Project the entire graph onto the x-axis for domain and the y-axis for range. An open point excludes a coordinate only if no other included point shares it. |
| Most common goof? | For real-valued functions, exclude division by zero and even roots of negative numbers. Respect any stated domain restriction. |
1. Domain—Your Function’s VIP List
Human Version
For real-valued functions, only certain guests (inputs) are allowed through the club door. Show an ID (doesn’t make the denominator zero)? You’re in. A square root needs its entire radicand, not necessarily x itself, to be nonnegative. For √(x + 3), inputs x ≥ −3 are allowed.
Quick Rules of Thumb
Fractions: Denominator ≠ 0
Even Roots: Stuff under √ ≥ 0
Logs: Argument > 0
Piecewise: Follow each rule’s mini-domain, then union them.
Mini Story: Imagine a distance app rejecting latitude = 91°. Valid latitude inputs lie from −90° to 90°, inclusive. This is a contextual restriction, even if an algebraic formula accepts more numbers.
2. Range—Your Output Highlight Reel
After VIPs enter, what vibes (outputs) does the club deliver? A quadratic throws a parabolic party: an upward-opening parabola includes y-values at or above its vertex; a downward-opening one includes values at or below it. These rules assume the full real domain. For sin(x) on all real x, the range is [−1, 1]. Scaled or shifted sine functions can have different ranges.
Vertical Tour
Slide a horizontal line across your graph:
Touches once+? That height y is in the range, provided the intersection is an included point.
Never touches? That y is ghosted.
3. Coffee-Cup Test (Visual Hack)
Imagine the graph as a coffee cup conveyor:
Beans (x) drop in.
Machine grinds (function rule).
Hot brew (y) pours out.
If some beans clog the chute (excluded domain) or the spout dries up at certain heights (missing range), your caffeine dreams crash.
4. Real-World Quickies
| Scenario | Domain | Range |
|---|---|---|
| Total subscription cost C(n) = 10n dollars (hypothetical fixed fee) | n = 0, 1, 2, … complete months; no fees or discounts | $0, $10, $20, …; discrete multiples, not every nonnegative amount |
| Ideal projectile h(t) = 20t − 5t² metres | 0 ≤ t ≤ 4 seconds, launch to ground-level landing | 0 ≤ h ≤ 20 metres; maximum at t = 2 seconds |
| BMI formula B = w/h² (algebraic model only) | w > 0 kg and h > 0 m | B > 0, with no finite mathematical upper bound; zero is not attained |
5. Hidden Traps & How I Avoid Them
Divide-by-Zero Ninja
I scribble denominators, set = 0, strike them out of the domain.Even-Root Gremlins
Under-root expression on sticky note → solve ≥ 0. Safe zone found.Inverse Function Surprise
When a function is one-to-one (or its domain is suitably restricted), its inverse function has domain equal to the original range. For x² on all real x, the inverse relation is not a function; restrict x ≥ 0 to obtain inverse √x.
Pull Quote
“Domain is your guest list, range is the party photos.”
6. “But Why Should I Care?”
Coding: API input validation = domain hygiene.
Physics: A projectile model describes the flight only on its chosen time interval; extending it past landing changes its physical meaning.
Data Viz: Axis scaling screws insights if you mis-judge range.
Feel-Good Non-Conclusion
Whenever domain-range anxiety creeps in, picture that vending machine. Inputs that jam, outputs that vanish—those are your red flags. Keep the machine honest and math (plus snacks) flows smoothly.
Read the model carefully: The BMI row describes the formula over all positive inputs, not a clinical reference range or health recommendation. Actual measurement constraints can narrow a model’s domain and range. Range means outputs actually attained; a chosen target set (codomain) may be larger.
Worked checks and interval notation
- For f(x) = x² − 4 on all real x, x² ≥ 0 and f(0) = −4, so the range is [−4, ∞). On the restricted domain [1, 3], the range is [−3, 5].
- For g(x) = 1/(x − 2), x ≠ 2 and y ≠ 0. Its domain is (−∞, 2) ∪ (2, ∞); its range is (−∞, 0) ∪ (0, ∞).
- Square brackets include finite endpoints; parentheses exclude them. Infinity is never an included endpoint. A single-value range, such as f(x) = 7, is written {7}.




