# How to Understand the Domain of a Function

Typically, a function $$f: D \mapsto R$$ is described as $$\forall x \in D, \exists ! y \in R, \left(x,y\right) \in f \wedge P\left(x,y\right),$$ where $$P$$ is a predicate that specifies the relation between an input and the output, for instance, $$y = 3x$$ if $$D \subseteq \mathbb{R}$$ and $$R \subseteq \mathbb{R}$$. However, this definition does not specify what happens outside $$D$$. Should we explicitly specify that no element outside $$D$$ corresponds to an output under $$f$$? That is, should we use the following proposition $$\left(\forall x \in D, \exists ! y \in R, \left(x,y\right) \in f \wedge P\left(x,y\right) \right) \wedge \left(\forall x \not\in {D}, \lnot \exists y, \left(x,y\right)\in f\right)$$ to describe $$f$$?

My own understanding is as follows. In mathematical proofs, people are more concerned with the existence of such a function. That is, what happens outside $$D$$ does not matter. What matters is, such a function $$f$$ exists, so that the proof can move on. Specifically, when people talk about a function, they are saying: $$\exists f, \forall x \in D, \exists ! y \in R, \left(x,y\right) \in f \wedge P\left(x,y\right).$$ And they can proceed with a particular example of such a function. In such a circumstance, the information of existing $$f$$s outside $$D$$ is not of interest.

• What is exactly $\overline D$? The complement of a set $D$ with respect to another set $A$ is defined as $A \setminus D = \{x \in A : x \notin D\}$. Dec 22, 2020 at 2:33
• Why do we have $P$ here? The relation is $f$ itself. Dec 22, 2020 at 2:35
• @azif00 Thanks for the remind. The previous statement is not rigorous. I have modifed my statement accordingly. Dec 22, 2020 at 2:37
• "However, this definition does not specify what happens outside D. " It doesn't specify what happens to elephants on the Serangeti either. Only $D$ is relevant. "However, this definition does not specify what happens outside D" I'd say it does specify. The elements of $D$ are mapped, and therefore the elements not in $D$ are not mapped. And we don't care if $D$ swims inside the universe of $\mathbb R$ or if it fits into $\mathbb R \cup \{$ stars in in the milky way$\}\cup\{$ the elephants of the serengeti$\}$. The only thing that matters is the elements of $D$ are mapped. Dec 22, 2020 at 3:06
• "outside" $D$ with respect to what. $\mathbb R$ is not the end all and be all and we have no way of knowing what "everything else" even means. If $0 \not \in D$ do we care what about $0$. What about $\frac {\sqrt 3}2 + \frac 12 \not \in D$ and $\frac {\sqrt 3}2 + \frac 12i\not \in \mathbb R$ do we care about that? What about the equilateral triangle $\triangle ABC$? That is something that isn't in $D$. Do we care about that? What about $Babar,\ the\ elephant\not \in D$? Do we care about that? Dec 22, 2020 at 3:11

Consider this relation $$f$$ from $$D= \{a, b,c\}$$ to $$T=\{0,1\}$$ :

$$f = \{(a,1), (b,1), (c,2)\}$$

Is it true that

for all $$x$$, [ if $$x\in D$$ then, there is a unique $$y$$ in $$T$$ such that $$(x,y)\in f ]$$ ?

• If $$x = a$$ or $$x = b$$ or $$x=c$$ , the antecedent is true and the consequent is true, so the whole condiitonal is true.

• If $$x$$ is neither $$a$$ nor $$b$$ , nor $$c$$ ( that is if $$x\notin D$$) the antecedent is false, and ( by the truth table of the " if ... then" operator) the whole conditional is true.

So, the conditional is true for all $$x$$ ... and relation $$f$$ is a function.