Skip to content
Glacius
FoundationsConcept reference

Function domains

The real domain of a scalar expression is the collection of real inputs for which the expression is defined.

On this page 7 sections
  1. Overview
  2. The domain is the collection of allowed inputs
  3. A closer look
  4. Check your understanding
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections
Domain of 1/(x−2): the real number line with an open hole at 2. Inputs on either side remain allowed.Domain of 1/(x−2): the real number line with an open hole at 2. Inputs on either side remain allowed.
Figure 1Domain of 1/(x−2): the real number line with an open hole at 2. Inputs on either side remain allowed.
Link to this figure ↗Download SVGDownload PNG

01The domain is the collection of allowed inputs#

The domain is the collection of allowed inputs. For f(x)=1/(x2)f(x)=1/(x-2), the input 2 would make the denominator zero. Division by zero is undefined, so 2 is excluded.

For f(x)=1/(x2)f(x)=1/(x-2), negative inputs can still work. At x=1x=-1, the denominator is 12=3-1-2=-3. It is nonzero, so the real output 1/3-1/3 is allowed.

Check your reasoning

Which input is excluded from f(x)=1/(x2)f(x)=1/(x-2)?

  1. A00
  2. B22
  3. C2-2
Show answer and explanation
22

Only x=2 makes the denominator zero.

02A closer look#

For g(x)=x4g(x)=\sqrt{x-4}, use the root rule: the quantity under a real square root must be zero or positive. Inputs 4 and 5 work; input 3 gives 1\sqrt{-1}, which is not real.

Check your reasoning

Is input 4 allowed for g(x)=x4g(x)=\sqrt{x-4}?

  1. AYes: output 0
  2. BNo: input 4 is forbidden
  3. CNo: 0\sqrt{0} is undefined
Show answer and explanation
Yes: output 0

g(4)=0=0g(4)=\sqrt{0}=0, so input 4 is allowed.

03Check your understanding#

Check your reasoning

A device reports R(s)=1/(s6)R(s)=1/(s-6). Which single raw input must it reject?

Show answer and explanation
6

The raw input 6 makes s6=0s-6=0. All other real inputs leave a nonzero denominator.

Key takeaway

Check the operation before accepting an input: no zero denominator or negative square-root input.

  • Determine which real inputs a scalar expression allows

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Function domains.” Math behind ML. /learn/f-domain