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

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


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.


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