# Can floor functions have inverses?

R to R

$f(x) = \lfloor \frac{x-2}{2} \rfloor$

If $T = \{2\}$, find $f^{-1}(T)$

Is $f^{-1}(T)$ the inverse or the "image", and how do you know that we're talking about the image and not the inverse?

There shouldn't be any inverse since the function is not one-to-one, nor is it onto since it's $\mathbb{R}\to\mathbb{R}$ and not $\mathbb{R}\to\mathbb{Z}$.

-
What is $T$? Also, $f^{-1}(x)$ is never a notation for the image. Typically, you would denote the image by Im($f$). A more likely notational problem with $f^{-1}$ would be confusion with the reciprocal $1/f(x)$. –  Alex Kruckman Dec 7 '12 at 6:14
T is the domain of the variable –  PopularScience Dec 7 '12 at 6:17
Ah, your new edit clears up your notational confusion. $f^{-1}(x)$ is notation for the inverse function applied to the variable $x$. $f^{-1}(T)$ is notation for the *pre*image of the set $T$ under $f$, i.e. $\{x\in \mathbb{R}\,|\,f(x)\in T\}$. Notice that the difference is whether the argument to $f^{-1}$ is an element of the codomain (or a variable standing for such) or a subset of the codomain. –  Alex Kruckman Dec 7 '12 at 6:24

$f^{-1}(T)$ could mean either the preimage of $T$ under $f$, or the image of $T$ under $f^{-1}$. The preimage always exists, and is defined to be the set of those points that map into $T$, i.e. $$f^{-1}(T)=\{x\mid f(x)\in T\}.$$ If $f$ has an inverse, there is also the image of $T$ under $f^{-1}$ which is $$f^{-1}(T)=\{f^{-1}(y)\mid y\in T\}.$$ However, in this case if we denote the preimage by $A$ and the inverse image by $B$ we get $$x\in A\implies f(x)\in T\implies x=f^{-1}(f(x))\in B$$ and $$f^{-1}(y)\in B\implies y=f(f^{-1}(y))\in T\implies f^{-1}(y)\in A$$ so the sets are actually the same.

-

Note to this calculating;

$[\frac{x-2}{2}]=2\Longrightarrow 2\leq\frac{x-2}{2}<3\Longrightarrow 4\leq x-2<6\Longrightarrow 6\leq x<8$ so the set $f^{-1}(\{2\})$ is equal to $[6,8)$.

Now;

$\forall y\in\mathbb{Z}\; :\; f^{-1}(\{y\})=\{x\in\mathbb{R}|[\frac{x-2}{2}]=y\}$ ... $\Longrightarrow\{x\in\mathbb{R}|x\in[2y+2,2y+4)\}$

In final;

$\Longrightarrow \forall T\subset\mathbb{R}\; :\; f^{-1}(T)=\cup_{y\in T\cap\mathbb{Z}}[2y+2,2y+4)$

and if $T\cap\mathbb{Z}=\emptyset$ then $f^{-1}(T)=\emptyset$ too.

And about existence of inverse functions. If a function be one-to-one it has left-inverse and if it be onto it has right-inverse. for existence both it should be bijective. But always we can define a function which bring back any point of range to set of elements that their value by f is them. like what we had done above.

-
The question is about notation, not finding the preimage. –  Alex Kruckman Dec 9 '12 at 0:28
@AlexKruckman from where you know? perhaps you are him!!!!! I couldn't see what you are saing in his question! –  AmirHosein SadeghiManesh Dec 9 '12 at 3:38
Everything in your answer is correct, I just don't think that that was what PopularScience was asking. See my comment to Pambos. –  Alex Kruckman Dec 10 '12 at 3:08
For any function $f:X\longrightarrow Y$ and any $K\subseteq Y, \ \ f^{-1}(K)$ is by definition the set $\{x\in X:f(x)\in K\}\subseteq X$. In case $f$ is one to one then for $|K|=1$ (one element set) $\Rightarrow|f^{-1}(K)|\leq1.$
In your case $T=\{2\}$ so
$f^{-1}(T)=\{x\in \mathbb R:f(x)\in T\}=\{x\in \mathbb R:f(x)=2\}=\{x\in \mathbb R:\lfloor\frac{x-2}{2}\rfloor=2\}=\\=\{x\in \mathbb R:2\leq\frac{x-2}{2}<3\}=\{x\in \mathbb R:4\leq x-2<6\}=\\=\{x\in \mathbb R:6\leq x<8\}.$
I think nonpop's answer is the correct one. The only question in PopularScience's question is "Is $f^{-1}(T)$ the inverse or the "image", and how do you know that we're talking about the image and not the inverse?" –  Alex Kruckman Dec 10 '12 at 3:07