I understand that $f:X\rightarrow Y$ is continuous if the pre-image of an open in $Y$ is open in $X$.
Take $f(x)=x²$ as a function $\mathbb{R}\rightarrow \mathbb{R}$.
Then $f^{-1}((-1,1))=[0,1)$ so the square function is not continuous(?).
However if I consider $f$ as a function $\mathbb{R}\rightarrow \mathbb{R^+_0}$ then the conclusion seems different.
Does it mean that continuity depends on the range of the function?
So the inverse image of $(-1,1)$ is an open set in $\mathbb{R}$, as you'd expect.
Easy mistake to make!
– HTFB Nov 22 '12 at 17:39