Correct way for writing domain of a function

1k Views Asked by At

When writing the domain of a function, in set builder notation, how does one correctly write the set of all real numbers? E.g. for $f(x) = 3x+2$, which of the following would correctly state the domain? Are they all OK, just some better than others, or are some incorrect?

$$\{x \in \mathbb{R}\}, \qquad x \in \mathbb{R}, \qquad\text{or}\qquad \{x | x\in \mathbb{R}\}$$

3

There are 3 best solutions below

0
On BEST ANSWER

The domain of a function is a set, thus whatever notation you use, it should specify some set. Beyond that, there are some conventions about how one specifies a set, or how one might want to specify a particular set under a specific set of instructions, but these conventions often come down to a matter of taste rather than anything deeply mathematical. Examining the proposed notations:

  1. The notation $\{x \in \mathbb{R} \}$ is a little ambiguous, but would probably be understood. As Eike Schulte points out, there is something missing—either the "selection criterion" which tells you how you are choosing element of $\mathbb{R}$, or you are specifying the name and domain of some variable which will be acted on by some selection criterion. That is, the notation does not tell us if $x\in\mathbb{R}$ is the selection criterion, or if it is just naming a real variable which is going to be acted on by some selection. More generally, set builder notation typically has the following form: $$ \{ \text{variable specification} \mid \text{selection criterion} \}. $$ For example, $$ \{ x\in\mathbb{R} \mid x \ge 47 \} \qquad\text{or}\qquad \{ x\in \mathbb{C} \mid x \in \mathbb{R} \}. $$ In the first example, a variable is specified (we are going to build a set of of real numbers, which we will call $x$ for the sake of selecting particular element of $\mathbb{R}$), and then acted upon by some selection criterion (we only consider values of $x$ which are greater than or equal to $47$).

    That being said, authors will often shorten their notation if there is little danger of ambiguity. For example, in my own work, I often use the notation $ \{ \Re(s) > D \}, $ which is shorthand for $$ \{s\in\mathbb{C} : \Re(s) > D \}, $$ where $\Re(s)$ denotes the real part of a complex number $s$. In context, this notation is perfectly clear. On the other hand, it is potentially ambiguous in other settings.

  2. The notation $x\in\mathbb{R}$ does not specify a set. Instead, it specifies an element of a set. This notation is read "$x$ is an element of the set $\mathbb{R}$". It is possible that this could be written into a sentence to specify the domain of a function, e.g. "The domain of $f$ is all $x$ such that $x\in\mathbb{R}$." However, this sentence is somewhat clunky.

  3. Of the options presented, $\{ x \mid x\in\mathbb{R} \}$ is the best. It specifies a set (rather than an element of a set) in a completely unambiguous manner. On the other hand, it is kind of redundant, since $$ \{x \mid x \in \mathbb{R} \} = \mathbb{R}. $$ Instead of writing this in set builder notation, one could just write the name of the set (i.e. $\mathbb{R}$).

A Small Typographical Note: The vertical bar used in set builder notation should have a little bit of space around it. Rather than typing |, you might consider using \mid. For use with large braces, \,\middle|\, also works: $$\left\{ \frac{x}{y} \,\middle|\, x\in \mathbb{Z}, y\in\mathbb{N} \right\}. $$ Finally, you could also use a colon: $\{ x\in\mathbb{R} : x \ge 47\}$.

0
On

The domain of your function $f$ is simply $\mathbb{R}$. Your third set, $\{ x | x \in \mathbb{R} \}$, is just a convoluted way of writing it, so it would be technically correct (but simply writing $\mathbb R$ is better).

The first one, $\{ x \in \mathbb{R} \}$, is not really set-builder notation, because you are missing the “selection” part and a set of the form $\{ a_1, \dots, a_n \}$ without a vertical bar is usually understood as listing all the elements of the set. People will probably understand what you mean, but again, writing $\mathbb{R}$ alone is shorter and clearer.

The second option is not a set but an assertion about $x$, so it is not directly an answer to the question “What is the domain of $f$?” That might be okay though, for example writing “The function defined by $f(x) = 3x + 2$ where $x \in \mathbb{R}$” is absolutely acceptable. Other options include:$$f : \mathbb{R} \to \mathbb R, \quad f(x) = 3x + 2$$ or $$f : \mathbb R \to \mathbb R, \quad x \mapsto 3x + 2.$$ In both of these, the first $\mathbb R$ in $\mathbb R \to \mathbb R$ specifies the domain as $\mathbb R$ and second specifies the codomain (also $\mathbb R$ is this case).

0
On

Mostly used notation for writing your function is
"Let $f:\Bbb{R}\rightarrow\Bbb{R}$ such that $f(x)=3x+2$ for all $x\in\Bbb{R}$".