Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First, I wan't to make clear that we use the same terms:

$X, Y$ are sets with $X \neq \emptyset$ and $Y \neq \emptyset$. $f:X \rightarrow Y$ is a funtion.

$f^{-1}(A)$ is the preimage of $A \subseteq Y$ (and NOT the inverse function).


$f$ is a function from domain $X$ to codomain $Y$. The smaller oval inside $Y$ is the image of $f$.



What is the preimage of the codomain of a function if the function is not surjective?


$f: \mathbb{R} \rightarrow \mathbb{R}$

$f(x) := x^2$

a) $f^{-1}(\{-1,1,2\}) = \{1, \sqrt{2}, -1, \sqrt{2}\}$ and especially $f^{-1}(\{-1\}) = \emptyset$ or

b) $f^{-1}(\{-1,1,2\})$ is undefined, as $-1$ has no preimage?

Which one is correct? Does it depend on the author?

share|cite|improve this question
Your example has nothing to do with your question. The codomain in them is $\mathbb{R}$ and its preimage is $\mathbb{R}$ too. Generally, the preimage of the codomain is the domain. – Michael Greinecker Oct 20 '12 at 6:35
up vote 3 down vote accepted

Definitely (a). The definition of preimage is $f^{-1}(A) = \{x \in X : f(x) \in A\}$ so it's defined for all subsets $A \subset Y$, regardless of how $A$ relates to the image of $f$.

share|cite|improve this answer
Tim Gowers had a lot more to say about the subject of the notation "$f^{-1}(A)$" on his blog:… (note that he uses the term "inverse image" for what here is called preimage). – kahen Oct 20 '12 at 6:35
@Ted: Thanks for your clear, short answer. I've now realized, that my problem was that I didn't have the definition of the preimage in mind. – Martin Thoma Oct 20 '12 at 6:52
+1 for the suggestion of taking a look at Tim Gowers's blog post (and his neighbouring ones). Terrific stuff. – Peter Smith Oct 20 '12 at 6:59

I definitely go with (a).

Note that Wikipedia says the following:

The inverse image or preimage of a particular subset $S$ of the codomain of a function is the set of all elements of the domain that map to the members of $S$.

Put into set-theoretic notation $$f^{-1} ( S ) = \{ x \in X : f(x) \in S \}.$$ There is no requirement that everything in $S$ is in the range/image of $f$. (Actually, the attentive reader should note that the same definition could be used even if the set $S$ is not a subset of the codomain. And this makes sense since "codomain" is an indefinite concept (set-theoretically speaking). What is the codomain of $x \mapsto x^2$? Is it $\mathbb{R}$? $\mathbb{R}^{\geq 0}$? $\mathbb{C}$?)

share|cite|improve this answer
My prof. definied in lecture about analysis: Let $f:X \rightarrow Y$ be a function. Then $Y$ is the codomain of $f$. So it is obviously defined defined. The "$f:X \rightarrow Y$" is part of the definition of the function. – Martin Thoma Oct 20 '12 at 6:58
@moose: Note that according to this somehow the functions $f:\mathbb{R}\to\mathbb{R}$ and $g:\mathbb{R}\to\mathbb{C}$ defined by $f(x)=x^2=g(x)$ are different. But yet they agree everywhere! Notationally you can tell them apart, but if I just tell you that I've got this function $h$, and $h(x)=x^2$ for every real number $x$, you cannot tell me what the codomain of $h$ is. (In fact, the codomain of $h$ is $\mathbb{R} \cup$ $\mathrm{GL}_7 ( \mathbb{R} )$.) (cont...) – arjafi Oct 20 '12 at 7:24
(...inued) In this way codomain becomes a concept related to intent, and intent is something that is hard to put into concise mathematical terms. (One possibility is to use $f : X \to Y$ to denote a triple $(f,X,Y)$ where $f$ is a function with domain $X$ and range/image a subset of $Y$. But now we've just added a lot of extra baggage to what is a relatively simple concept: $f$ associates to each element of $X$ a unique element of $Y$; leaving the possibility that some elements of $Y$ are not associated to an element of $X$.) This is likely a distinction that can be left until later. – arjafi Oct 20 '12 at 7:24

This emended picture from should avail.

enter image description here

The pink is the preimage/inverse image of $S \subseteq Y$ (though this picture shows $S \subsetneq Y$) under $T$ $= T^{-1}[S] = \{x \in X : T(x) \in S\}$.

Moreover, it evinces Arthur Fischer's statement: "There is no requirement that everything in $S$ is in the range/image of $f$." In $Y$, the pink is strictly smaller than $S$ thus $T(T^{-1}[S]) \subsetneq S$ here.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.