Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Domain of a Function

How to use
  1. Pick a function in the Function menu at the top: Logarithmic, Square root and Reciprocal have built-in restrictions, the other eight accept every real number. The slider values stay as they are. Learn more about picking a function
  2. The domain of g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k is the blue stretch on the x-axis, with filled or hollow circles at its ends. Learn more about reading the domain
  3. The tab Input: b, h holds the sliders that can move the domain; Output: a, k holds the ones that cannot. Learn more about why only b and h change the domain
  4. The test point slider moves xx from −10-10 to 1010; the dot on the axis says in the domain or outside, and the amber label gives g(p)g(p). Learn more about the test point
  5. The text on the right gives the base domain, the current domain as an inequality and the verdict for the test point. Learn more about the explanation
  6. ▶ runs a slider by itself, Reset puts back the sliders of the current tab, and the switches hide the base curve or the domain marks. Learn more about the switches and the Concepts tab


Domain of a function
f(x)=ln⁡(x)f\left(x\right)=\ln\left(x\right)
g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f\big(b(x - h)\big) + k
b=1b = 1h=0h = 0a=1a = 1k=0k = 0p=1p = 1g(p)=0g(p) = 0
Domain · Logarithmic
g(x)=a⋅f(b(x−h))+k\displaystyle g(x) = a \cdot f\big(b(x - h)\big) + k
For the current setup

Base function · f(x)=ln⁡(x)f(x) = \ln(x)

Base domain · x>0x > 0

Current domain · x>0x > 0

Test point · x=1x = 1 is in the domain: g(1)=0g(1) = 0.

How parameters affect the domain

Only bb and hh can change the domain. They transform the input to the base function:

  • hh — shifts the domain boundary along the x-axis by the same amount
  • bb — scales the domain boundary by 1/b1/b; if b<0b < 0, the inequality direction flips

aa and kk transform the output — they shift and scale what comes out of the function, not where it accepts input. Move them and the domain stays put.

b=1b = 1
h=0h = 0
p=1p = 1
Speed







Getting Started with the Visualizer

DemoGetting started
Step 0 of 3
The tool has three parts. Across the top runs a bar with the Function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.

The graph shows the base function f(x)f(x) as a dashed gray curve and the transformed function g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k in blue. The domain of gg is drawn as a blue stretch on the x-axis itself, so you can see at once which inputs the curve has values at and which it leaves blank. A dashed vertical line marks the test point, with a dot on the axis that says whether that input is in the domain.

The tool opens with the logarithm. Its domain is x>0x > 0 — it is undefined for zero and negative inputs — so the blue stretch starts just to the right of 00, with a hollow circle there, and runs off to the right. The test point at x=1x = 1 is in the domain, and the amber label at the bottom of the graph gives g(1)=0g(1) = 0.

Picking a Function

DemoPicking a function
Step 0 of 3
The Function menu groups eleven base functions by the shape of their domain:

• Restricted — Logarithmic (domain x>0x > 0), Square root (domain x≥0x \geq 0), Reciprocal (domain x≠0x \neq 0). Each has a built-in restriction baked into its definition.
• Unrestricted (R\mathbb{R}) — Identity, Linear (2x), Quadratic, Cubic, Exponential, Sine, Cosine, Absolute. All accept every real number as input.

The grouping is the point. Most functions met before calculus accept any input; the three that don't are the cases worth studying — and the ones where transformations actually move the domain boundary. Picking an unrestricted function is useful for contrast: the blue stretch covers the whole x-axis, and no slider moves it.

A new function keeps the slider values, so the same shift can be compared across functions.

Why Only bb and hh Change the Domain

DemoInput moves the domain, output does not
Step 0 of 3
The four parameters of g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k are split between two tabs above the sliders:

• Input: b, h — bb, the horizontal scale, multiplies the input, and hh, the horizontal shift, subtracts from it.
• Output: a, k — aa, the vertical scale, multiplies the output, and kk, the vertical shift, adds to it.

Both tabs also hold the test point slider. The split is the lesson, and the mirror image of the range case. The input that reaches the inner ff is b(x−h)b(x - h) — only bb and hh appear there. After ff produces a value, aa and kk scale and shift it, but by then the legality of the input has already been decided.

Drag aa or kk as far as you like — the curve changes, the blue stretch on the x-axis does not. Drag bb or hh and the stretch moves and turns at once.

Reading the Domain on the X-Axis

The domain is drawn on the x-axis of the graph, in the same coordinates as the curve, as a blue stretch covering every legal input. The ends tell you what kind of boundary it is:

• A filled circle — the boundary value is included, as for the square root at x=0x = 0.
• A hollow circle — the boundary value is left out, as for the logarithm at x=0x = 0.
• No circle and the stretch running off the edge — the domain goes on without end in that direction.

For the reciprocal the stretch runs on both sides of x=hx = h with a hollow circle at hh itself: one value is missing from the domain, the hole where the function has no value.

The text on the right writes the same domain as an inequality, such as x>0x > 0, x≥2x \geq 2 or x≠1x \neq 1, the form you would write by hand.

Probing with the Test Point Slider

DemoProbing the reciprocal
Step 0 of 4
The test point slider, pp, sits in both tabs. Drag it from −10-10 to 1010. As you move it:

• A dashed vertical line follows it on the graph.
• A dot on the x-axis at x=px = p is navy and labelled in the domain when gg has a value there, and red and labelled outside when it has not.
• For an input in the domain, a second dot sits on the curve at (p,g(p))(p, g(p)), and the amber label at the bottom of the graph gives g(p)g(p).
• The text on the right repeats the verdict: x=px = p is in the domain, with the value of gg, or outside it, where gg has no value.

The function value is the key difference from the range tool. Where that tool answers only whether an output is reached, this one tells you what comes out whenever the input is legal — so it is both a domain checker and a quick way to evaluate the function.

The Explanation and the Labels

The text on the right follows the function and the sliders. It gives the base function and its base domain, then the current domain of gg as an inequality — for example x>0x > 0, x≥2x \geq 2, x≠1x \neq 1 or all real numbers — and the verdict for the test point. A short note under How parameters affect the domain explains why only bb and hh matter.

The special cases are spelled out too. A negative bb flips the direction of the inequality, and b=0b = 0 sends the same input 00 to ff for every xx, so the domain becomes empty for the logarithm and the reciprocal and all real numbers for the square root.

Along the bottom of the graph, small labels show bb, hh, aa, kk and pp; a label turns blue once its value has moved from the start. The amber label gives g(p)g(p).

Switches, Zoom and the Concepts Tab

Two switches under the sliders change what is drawn: Original function f hides or shows the dashed base curve, and Domain and test point hides or shows the blue stretch, the dashed line and the dots.

The buttons at the top right zoom in and out, return to the starting view, save the graph as a picture and open the tool full screen. ▶ beside a slider runs it by itself, Speed sets how fast, and Reset puts back the sliders of the current tab.

Above the explanation, the Concepts tab holds a page that does not change with the controls: what a domain is, how it is written, and why the input parameters move it while the output parameters do not.

What Is the Domain of a Function?

The domain of a function is the set of inputs where the function is defined — equivalently, the set of xx-values for which f(x)f(x) produces a real number output. Inputs outside the domain are forbidden; the function simply has no value there.

Different function families have qualitatively different domain restrictions:

• Polynomials (xx, x2x^2, x3x^3, ∣x∣|x|), exponential exe^x, sine, and cosine accept every real number. Their domain is all of R\mathbb{R}.
• x\sqrt{x} — defined only for x≥0x \geq 0, since the square root of a negative number is not real
• ln⁡(x)\ln(x) — defined only for x>0x > 0, since the logarithm of zero or a negative number is not real
• 1/x1/x — defined everywhere except x=0x = 0, since division by zero is undefined

Domain is independent of range. A function can have a tiny domain and reach every real number (ln⁡x\ln x has domain x>0x > 0 but range R\mathbb{R}), or accept every real number and stay bounded (sin⁡x\sin x has domain R\mathbb{R} but range [−1,1][-1, 1]). Together, domain and range fully characterize what goes in and what can come out.

Open vs Closed Endpoints and Excluded Values

Three subtle distinctions show up in the visualizer's domain bar:

• Closed endpoint (filled circle) — the boundary value is included in the domain. Square root has domain x≥0x \geq 0 with a closed endpoint at 00, because 0=0\sqrt{0} = 0 is defined. The bar shows a filled dot.

• Open endpoint (hollow circle) — the boundary value is excluded from the domain. Logarithm has domain x>0x > 0 with an open endpoint at 00, because ln⁡(0)\ln(0) is undefined (the limit is −∞-\infty). The bar shows a hollow dot.

• Excluded value (red ×) — the function is defined everywhere except one value. Reciprocal has domain x≠0x \neq 0 — every nonzero real number is a legal input, but 00 is the vertical asymptote and forbidden. The bar shows a full fill broken by a small red × at the excluded point.

The distinction between open and closed endpoints matters for continuity, limits, and whether a function attains its extreme values. The visualizer makes the boundary type visible by eye, so the difference reads at a glance rather than as an abstract notation.

Functions Defined on All of the Reals

Eight of the picker's eleven functions accept every real input: the identity, the scaled linear, the quadratic, the cubic, the exponential, sine, cosine, and the absolute value. Their domain bar is one unbroken green band from edge to edge.

For these families the domain story is deliberately boring — and that is worth seeing. Whatever bb and hh you dial in, an all-of-R\mathbb{R} domain maps onto all of R\mathbb{R} again: shifting or rescaling the whole real line gives back the whole real line. The interesting cases live in the restricted group.

The Identity Function

The identity f(x)=xf(x) = x accepts everything and changes nothing — the baseline case for every domain question.
-10-5510-55f(x) = x
f(x) = x, domain frozen

The identity line over one unbroken green band: every real input accepted, none changed.

Its green band spans the axis with no endpoints to mark, and no slider can break it: transformed, the identity just becomes another line, and lines are domain-proof.

Its real use in this tool is as a control: switch here after a restricted family and watch every red mark vanish — the difference you just saw was the function's doing, not the sliders'.

The Scaled Linear Function

The line f(x)=2xf(x) = 2x doubles its input — and doubling is something every real number tolerates.
-10-5510-55f(x) = 2x
f(x) = 2x, domain frozen

The doubled line f(x) = 2x over a full green band — scaling an input is never a reason to refuse it.

Like the identity, its domain is all of R\mathbb{R} under every parameter setting. What the scaling does move is the range and the steepness — a reminder that domain (allowed inputs) and range (produced outputs) are independent questions.

Every polynomial shares this immunity: addition and multiplication never refuse an input. Division and even roots are where refusals start — the theme of the restricted families.

The Quadratic Function

Squaring accepts every real number — negative inputs included — so the parabola's domain bar is solid green.
-10-5510-55f(x) = x²
f(x) = x², domain frozen

The parabola over a solid green band: inputs unrestricted, even though outputs never go negative.

The quadratic is the classic place where students first confuse domain with range: the outputs never dip below zero, but the inputs are unrestricted. The visualizer separates the two visually — the green band on the x-axis is about inputs only, and it never shrinks however the parabola moves.

Note the contrast with its inverse: undoing a square means taking a square root, and that function pays for the parabola's generosity with a halved domain.

The Cubic Function

Cubing accepts every real input and — unlike squaring — returns every real output too.
-10-5510-55f(x) = x³
f(x) = x³, domain frozen

The cubic over a full green band — unrestricted in domain and range alike.

Domain R\mathbb{R}, range R\mathbb{R}: the cubic is unrestricted in both directions, which is why its inverse (the cube root) is also defined everywhere, needing none of the caution the square root demands. Odd powers never refuse an input and never repeat an output.

In the tool this makes the cubic the cleanest demonstration that aa, kk, bb, hh all leave the green band alone — there is simply nothing to break.

The Exponential Function

The exponential exe^x takes any real exponent — its domain is the whole line, even though its outputs never leave positive territory.
-10-5510-55f(x) = eˣ
f(x) = eˣ, domain frozen

eˣ over a full green band: any exponent is welcome, however negative, and the answer is just very small.

That mismatch is the exponential's signature: domain R\mathbb{R}, range (0,∞)(0, \infty). Feed it −1000-1000 and it answers with a very small positive number, not a refusal.

The refusals belong to its inverse: the logarithm inherits the exponential's range as its domain — positive inputs only. Inverting a function swaps domain and range, and this pair is the tool's best illustration of the swap.

The Sine Function

Sine accepts any angle — wind around the circle as many times as you like — so its domain is all of R\mathbb{R}.
-10-5510-55f(x) = sin(x)
f(x) = sin(x), domain frozen

The endless wave over an endless green band — any angle, wound any number of times.

Periodicity and full domain go together: the wave repeats forever in both directions with no boundary to mark. The bounded part of sine's story is its range, locked inside [−1,1][-1, 1].

Contrast this with tangent — periodic but riddled with excluded points at every half-period. Periodicity alone tells you nothing about domain; it is the division inside tangent that punches the holes, the same mechanism as the reciprocal's excluded point.

The Cosine Function

Cosine, like sine, accepts every real input — the same endless wave, shifted a quarter period.
-10-5510-55f(x) = cos(x)
f(x) = cos(x), domain frozen

The same full-domain picture as sine, shifted a quarter period.

Everything said about sine's domain transfers verbatim: unbroken green band, immunity to all four sliders, range trapped in [−1,1][-1, 1].

The pair is useful in this tool for a subtler point: two different functions can have identical domain behavior. Domain is a coarse fingerprint — it distinguishes the logarithm from the sine instantly, but cannot tell sine from cosine at all.

The Absolute Value Function

The absolute value ∣x∣|x| happily accepts negatives — it just strips their sign — so its domain runs the whole axis.
-10-5510-55f(x) = |x|
f(x) = |x|, domain frozen

The V over a solid green band: the corner at zero is a smoothness issue, not a domain one.

The V-shape has a corner, and a corner is a differentiability problem, not a domain problem: the function is defined and continuous everywhere, including at x=0x = 0. The green band takes no notice of the kink.

That distinction — defined everywhere versus smooth everywhere — is worth one deliberate look here, because the domain bar and the curve tell different stories at the corner point.

The Restricted Families

Three functions in the picker refuse some inputs, one for each classic reason: the logarithm needs strictly positive input (an open boundary), the square root needs non-negative input (a closed boundary), and the reciprocal refuses exactly one value (an excluded point).

Open half-line, closed half-line, punctured line — these three shapes, moved and scaled by bb and hh, cover nearly every domain you will meet before calculus. The endpoint distinction between them is exactly what the visualizer's markers encode.

The Logarithm and Its Open Boundary

The logarithm demands strictly positive input: its domain is (0,∞)(0, \infty), and the boundary point itself is not included.
-10-5510-55f(x) = ln(x)
ln(x), domain frozen

Red band to the left, green strictly to the right, and the open circle at x = 0 recording the refusal: the boundary point itself is not allowed.

The open circle at x=0x = 0 is the whole story: ln⁡(0)\ln(0) does not exist — the curve dives toward −∞-\infty as the input approaches zero, but zero itself is refused. Red band left of the marker, green strictly right of it.

Drag hh and the wall slides to x=hx = h, open circle and all; flip bb negative and the inequality reverses — the domain becomes (−∞,h)(-\infty, h), the green and red bands trading sides. This is the parameter rule acting on a boundary you can watch.

Compare the square root's closed dot: one pixel of difference on screen, a real mathematical distinction underneath.

The Square Root and Its Closed Boundary

The square root accepts zero — 0=0\sqrt{0} = 0 is a perfectly good value — so its domain [0,∞)[0, \infty) includes its boundary.
-10-5510-55f(x) = √x
√x, domain frozen

The filled green dot at the origin is the difference: zero is accepted, the curve genuinely starts there. Domain [0, ∞).

That inclusion is the filled green dot at the origin: the curve genuinely starts there, at an actual point, rather than falling away toward a wall it can never touch. Everything left of the dot is red; the dot itself is green.

The contrast with the logarithm is the cleanest open-versus-closed lesson in the tool: both domains are half-lines with boundary zero, and the single question "is the boundary point itself allowed?" separates [0,∞)[0, \infty) from (0,∞)(0, \infty).

Interval notation mirrors the markers exactly: square bracket = filled dot, round parenthesis = open circle.

The Reciprocal and Its Excluded Point

The reciprocal 1/x1/x accepts everything except a single number: its domain is all of R\mathbb{R} with the one point x=0x = 0 punched out.
-10-5510-55f(x) = 1/x
1/x, domain frozen

Green in both directions with one puncture: a lone open circle at x = 0, the single refused input that shapes the whole graph.

The domain bar shows green in both directions with a lone open circle at the origin — a puncture, not a wall. Unlike the half-line restrictions, almost nothing is lost: one input out of infinitely many.

But that one point carries consequences: the vertical asymptote, the split into two branches, the sign flip from −∞-\infty to +∞+\infty. A single excluded input can dominate a function's entire geometry.

Shift hh and the puncture follows to x=hx = h. Every rational function's domain is built this way — the real line minus the zeros of its denominator, one open circle per zero.