Domain and Range

Once we can write a rule with function notation, a natural question follows: which inputs are allowed, and which outputs can come out? Those two collections have names.

Picture the machine again: the domain is the pile of inputs that fit through the slot, and the range is the pile of outputs that land in the tray.

Why some inputs are not allowed

For many functions, every real number works — the domain is "all real numbers". But some rules break for certain inputs, and those inputs are quietly thrown out of the domain. Two classic troublemakers:

Pick a rule below and slide the input. When the input is outside the domain, the machine flashes a warning instead of an output.

Reading them off a graph

On a graph the domain is the spread of the curve left-to-right (its shadow on the x-axis), and the range is its spread up-and-down (its shadow on the f(x)-axis). The parabola f(x) = x^2 stretches across every x, but it never dips below 0 — so its range is f(x) \ge 0.

Writing it down: interval notation

We describe a stretch of allowed values with interval notation. A square bracket [\;] includes the endpoint; a round bracket (\;) excludes it. The symbol \infty ("infinity") always gets a round bracket, because you never actually reach it.

x \ge 0 \;\Longleftrightarrow\; [\,0,\ \infty) -2 < x \le 5 \;\Longleftrightarrow\; (-2,\ 5\,]

Khan Academy introduces domain and range here: