--- aliases: [domain] --- #sets-functions ## Definition > [!tldr] Definition > The **domain** of a [[function]] is the [[set]] of all possible inputs of the function. Notes: - The word "possible" in the definition indicates that we exclude any potential inputs that cannot be computed using the function. For example, the domain of the function $f(x) = 1/x$ is the [[set]] of all real numbers *except* zero. - The concept of domain also applies to [[Predicate|predicates]], which can be thought of as functions whose [[Codomain]] is the [[set]] of Booleans `{True, False}`. ## Examples and Non-Examples - When a function $f$ is described using "arrow" notation, the domain is the set on the left side of the arrow. For example $f: \mathbb{Z} \rightarrow \mathbb{N}$ given by $f(a) = |a|$, has domain equal to the integers $\mathbb{Z}$. - For predicates and some functions not given in this notation, the domain should be either stated explicitly or determined from context. For example the predicate $P(x)$ given by the statement "$x$ is even" would have a domain equal to either the integers or the natural numbers, because no other object makes sense when the word "even" is applied to it. ## Resources <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/614432178?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Screencast 3.8: Functions"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> Other resources: - Tutorial: [Domain and range](https://www.intmath.com/functions-and-graphs/2a-domain-and-range.php)