# Are the pre-image and the domain the same, or not?

Throughout school I thought that the pre-image was a subset of the domain, not that they were necessarily the same. When I spoke of a function f:R->R, I didn't think that this meant that f was defined on all of R, I thought √x was a function from R to R.

Now I am hearing conflicting things, that the domain is actually the exact same thing as the pre-image.

What convention is the norm?

-
The domain of $\sqrt{x}$ is $[0,\infty).$ $-1$ is not in the domain (of course, if the target is the set of real numbers) because $\sqrt{-1}$ does not exists. –  mfl Jun 27 '14 at 22:19
@mfl So you consider the pre-image and the domain to be identical terms. This seems to be the prevailing view. My confusion is only further increased by things like proofwiki's definition of a mapping, claiming that necessary conditions include "being defined for all elemtns in its domain" - why include that if this follows from the definition of domain? Convention seems to be all over the place here. –  Jonathan Hebert Jun 27 '14 at 22:26
A function is, roughly speaking, a rule that associates to any value of a certain set (the domain, by definition) a unique value in the target. So, since any value of the domain have some value in the target (we have not saying that any value in the target corresponds, via function, to some value in the domain) it must coincide with the preimage of the target. –  mfl Jun 27 '14 at 22:33
Convention seems to be all over the place because you haven't uniquely identified which of the two similar concepts you're asking about. They are the same if $f$ is surjective and the set considered is the entire codomain. But, you can also consider pre-image of a subset of the codomain, which will be a subset of the domain (possibly empty or the entire domain). –  Silynn Jun 27 '14 at 22:33

## 3 Answers

It is correct that the preimage is a subset of the domain. Given $f:X\rightarrow Y$, the preimage of an element $y$ in the codomain $Y$ is defined to be $\{x|f(x)=y\}$. This may include all of, some of, or even none of the domain $X$.

With this definition it makes sense to talk about the preimage of sets $A\subseteq Y$, defined as $\{x|f(x)\in A\}$, and from there you could talk about the preimage of the range $R$ or even the entire codomain $Y$, which would be $\{x|f(x)\in Y\}=\{x|f(x)\in R\}=X$.

-
I think the OP is referring to the preimage of the target. –  mfl Jun 27 '14 at 22:28
@Peter Woolfitt this is how I understood it, but even Wikipedia defines the "domain" to be the "set of "input" or argument values for which the function is defined. That is, the function provides an "output" or value for each member of the domain." This seems to match your definition of the pre-image. –  Jonathan Hebert Jun 27 '14 at 22:34
@Doop You are correct that the domain is just the set of elements $x$ such that $f(x)$ is defined. The codomain is a little different - it can include elements $y$ such that no element in the domain maps to $y$. However, if you are talking about the range, then the range is defined as all elements $y$ for which some $x$ maps to $y$. If you are asking about the preimage of the entire range or codomain, then that is the same as the domain because every element in the domain maps to some element in the codomain or the range. –  Peter Woolfitt Jun 27 '14 at 22:49
@Peter thank you. Essentially, what I thought was that in the same way that the range may be a proper subset of the codomain (and that the codomain may even be chosen to be a larger set for one reason or another) that the pre-image (of the range or any set containing the range) could be a proper subset of the domain. Now I see that I was mistaken. –  Jonathan Hebert Jun 27 '14 at 22:54
@Doop You're welcome! I'm glad you got it sorted out. –  Peter Woolfitt Jun 27 '14 at 22:59

The pre-image is a subset of the domain. I almost always see it defined for a function $f:X\to Y$ and a subset $B\subseteq Y$ as $f^{-1}(B)=\{x\in X\ |\ f(x)\in B\}$

-
This is how I have generally seen it used. Of course, the preimage, in this sense, of the function's range or codomain will be the entire domain. –  Malice Vidrine Jun 27 '14 at 22:32
I used the general definition because it wasn't clear if the OP was asking about pre-image of the codomain, or pre-image of a subset of the codomain. I think the confusion comes from not distinguishing the two cases. –  Silynn Jun 27 '14 at 22:34
I mean the pre-image of the codomain, sorry. I thought this would be inferred. –  Jonathan Hebert Jun 27 '14 at 22:42
@silynn: Of course, my comment was not aiming to "correct" anything; I was more annotating the answer for the benefit (one hopes) of the OP. :) –  Malice Vidrine Jun 27 '14 at 22:46

First, a point to clear up a confusion you seems to have, the way function usually get defined through those operation actually make the domain implicit: you take the biggest set such that the expression can make sense. For $\sqrt{x}$ for example, the domain is actually $[0,\infty)$ and not $\mathbb{R}$, so the function is actually $[0,\infty)\rightarrow\mathbb{R}$; for $\frac{1}{x}$ the domain is $\mathbb{R}\backslash\{0\}$ so it is $\mathbb{R}\backslash\{0\}\rightarrow\mathbb{R}$.

When you say "preimage", you need to specify the function and what the preimage is of. For example, if the function is $x^{2}$, then the preimage of $\{1,4\}$ for this function is $\{-2,-1,1,2\}$ which is a proper subset of the domain $\mathbb{R}$. The preimage of the range of the function (not to be confused with the codomain, which is usually just $\mathbb{R}$) is indeed the domain; and the preimage of some proper subset of the range would be a proper subset of the domain.

-
This is helpful, but given that the range is a subset of the co-domain, would the pre-image of the codomain not also be the domain, even if the codomain is not the range? (I ask because you explicitly specified "not the codomain") –  Jonathan Hebert Jun 27 '14 at 22:39
It would be the whole domain for the codomain, too. The domain of a function is the union of $\{f^{-1}[\{x\}] | x \textrm{ in the codomain}\}$. If $x$ isn't in the range of $f$, then $f^{-1}[\{x\}]=\emptyset$, so they basically don't "add" anything to the above union. –  Malice Vidrine Jun 27 '14 at 22:55
Ah sorry for the confusion, what I meant is that the range should not be confused with the codomain, as might be the case. –  Gina Jun 27 '14 at 22:57
I understand the difference between the range and the codomain. The source of my confusion (as explained above) was thinking that there was an analogous difference between the domain and the pre-image of the range. –  Jonathan Hebert Jun 27 '14 at 23:09