# Thread: Example of a map from [-1,1] to [0,1]

1. ## Example of a map from [-1,1] to [0,1]

How would I find an example of such a function that maps from $\displaystyle [-1,1]$ -> $\displaystyle [0,1]$

I was thinking.. $\displaystyle q(x)$ $\displaystyle =$
$\displaystyle 0$ if $\displaystyle x$ is in $\displaystyle Q$
$\displaystyle 1$ if $\displaystyle x$ is NOT in $\displaystyle Q$
$\displaystyle x$ in $\displaystyle (0,1)$

2. Originally Posted by Throughpoint
How would I find an example of such a function that maps from $\displaystyle [-1,1]$ -> $\displaystyle [0,1]$

I was thinking.. $\displaystyle q(x)$ $\displaystyle =$
$\displaystyle 0$ if $\displaystyle x$ is in $\displaystyle Q$
$\displaystyle 1$ if $\displaystyle x$ is NOT in $\displaystyle Q$
$\displaystyle x$ in $\displaystyle (0,1)$
How about $\displaystyle \displaystyle q(x) = \frac 1{\pi} \cos^{-1} (x)$ ?

you're function maps to only two elements in [0,1], what a waste and x in (0,1) won't work, you must use up all elements in your domain

3. Does that map closed sets to closet sets? I need to find a function that doesn't. =/

4. Hello, Throughpoint!

$\displaystyle \text{How would I find a function that maps from }[-1,1]\:\to\:[0,1]\,?$

One such function is: .$\displaystyle q(x) \,=\,x^2$
. . This maps two points of the domain onto one point of the range,
. . with the sole exception $\displaystyle x = 0.$

If a one-to-one mapping is desired, try: .$\displaystyle q(x) \:=\:\dfrac{x+1}{2}$

5. Originally Posted by Throughpoint
Does that map closed sets to closet sets? I need to find a function that doesn't. =/