Correct way for writing domain of a function

notation

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}\}$$

Best Answer

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).

Related Question