# How to show that $f(x) = 2x + \frac{|x|}{x}$ is not continuous using open sets?

I'm teaching myself topology with a book, and I'm trying to understand the following definition.

If $X$ and $Y$ are topological spaces, a map $f$: $X \rightarrow Y$ is said to be continuous if for every open subset $U \subseteq Y$, its preimage $f^{-1}(U)$ is open in $X$.

But I don't get it. For example I'll use a function that I know is not continuous:
$f: \mathbb{R} \rightarrow \mathbb{R}$

$f(x) = \left\{ \begin{array}{ll} 2x + \frac{|x|}{x} & \quad x \neq 0 \\ 0 & \quad x = 0 \end{array} \right.$

But where is a set that in open in the range, but its preimage is not open?

The problem with your question is that you want to prove a function is discontinuous on $\mathbb R$ without having defined it on $\mathbb R$. You have failed to define $f$ at $x=0$. The function you have defined, on $\mathbb R\setminus\{0\}$, is continuous on that set. But if $f$ is defined at $0$ as well, you can show $f$ will be discontinuous no matter what $f(0)$ is.

Claim: Let $f:\mathbb R\to\mathbb R$ be such that $f(x)=2x+\frac{|x|}{x}$ when $x\neq 0$. Then $f(x)$ is not continuous on the real line.

The fundamental property you need is:

$f(x)>1$ if $x>0$ amd $f(x)<-1$ if $x<0$.

I'll leave some steps out.

Proof (outline): Let $U=(-1/2,+\infty)$ and $V=(-\infty,1/2)$. Then $U,V$ are open in $\mathbb R$. Show that $f^{-1}(U)=[0,+\infty)$ when $f(0)\geq 0$ and $f^{-1}(V)=(-\infty,0]$ when $f(0)\leq 0$ so at least one of these sets is not open in $\mathbb R$, depending on the value of $f(0)$, and thus $f$ is not continuous.

Another approach:

Alternative proof (outline): Let $U=(f(0)+1,f(0)-1)$. Then $0\in f^{-1}(U)$. If $f^{-1}(U)$ is open, it must therefore contain both positive an negative values. But when $x_-<0$, $f(x_-)<-1$ and when $x_+>0$ $f(x_+)>1$, so it is not possible for $f(x_+),f(x_-)\in U$, since $f(x_+)-f(x_-)>2$.

Both of these proofs work, no matter what $f(0)$ is defined to be.

• @Gaffney Um, what domain are you talking about? I spefically said the domain is $\mathbb R$, and that we just don't know what $f(0)$ is defined to be. (I did edit it to make that clearer, but that was in my original post, too.) – Thomas Andrews Jun 14 '16 at 14:23
• I just made the function defined at x=0 – Michael Maliszesky Jun 14 '16 at 15:14
• My proof still works, and is independent of what value you choose for $f(0)$. @MichaelMaliszesky – Thomas Andrews Jun 14 '16 at 15:21
• That's right, I didn't say. That's because my proof doesn't depend on what $f(0)$ is. I didn't define a function, I said "If $f:\mathbb R\to\mathbb R$ with $f(x)=\dots$ when $x\neq 0$ then..." That is, my statement is true for any $f$, no matter what $f(0)$ is. I didn't "define a function," I put a condition on the function. Big difference. @Gaffney There are two parts of the condition: It is define on $\mathbb R$, and it has the known values when $x\neq 0$. – Thomas Andrews Jun 14 '16 at 23:25

For example in know the function $f(x) = 2x + \frac{|x|}{x}$, is not continuous, if the domain and range are real numbers.

This is an ill-defined statement. $f$ is not even defined at $x=0$. There is no way to say that its domain is the set of all the real numbers. Any specified domain of $f$ must be a subset of $\mathbb{R}\setminus\{0\}$.

To understand the quoted definition in this specific example, one needs to know the information of $X$ and $Y$:

• what is the topological space $X$ (the underlying set and its topology)?
• what is the topological space $Y$ (the underlying set and its topology)?

Also, you would also need the concept of subspace topology.

For simplicity, consider $g:[-1,1]\to\mathbb{R}$ with $$g(x)=\begin{cases} \frac{|x|}{x},&x\in[-1,1]\setminus\{0\};\\ 0,&x=0. \end{cases}$$ and $h:[-1,1]\setminus\{0\}\to\mathbb{R}$ with $$h(x)=\frac{|x|}{x}.$$ Also endow the set $[-1,1]$, $[-1,1]\setminus\{0\}$ and $\mathbb{R}$ with the standard (subspace) topology. Then $h$ is continuous while $g$ is not.

To see why $g:X\to Y$ with $X=[-1,1]$ and $Y=\mathbb{R}$ is not open, consider $(-0.5,0.5)$, which is an open set in $Y$. Its preimage $$g^{-1}((-0.5,0.5))=\{0\}$$ is not open in $X$.

• Thank you, this is exactly, what I am trying to understand. However I'm still confused. When studying the discrete metric, I thought an isolation point is BOTH open and closed, and thus {0} is open, but you are saying {0} is not open. How is that possible? – Michael Maliszesky Jun 14 '16 at 15:13
• What "discrete metric" are you talking about? @MichaelMaliszesky In the standard topology on the reals, no singleton is an open set. – Thomas Andrews Jun 14 '16 at 15:23
• @MichaelMaliszesky: the set $\{0\}$ is not open in $X=[-1,1]$ because I assume that $X$ is endowed with the standard subspace topology which is induced from the Euclidean metric. If one assumes the discrete metric on $[-1,1]$, which gives the discrete topology on $X$, then any subset of $X$ would be open. – Jack Jun 14 '16 at 15:35
• And the discrete metric also makes every function continuous. – Thomas Andrews Jun 14 '16 at 15:42
• Note that your simplification makes things more complicated, since you are now dealing with two different topological spaces. It's just as easy, possibly easier, to deal with $X=\mathbb R$ than $X=[-1,1]$. No subspace topologies, etc. – Thomas Andrews Jun 14 '16 at 15:44

You already know why it is not continuous:
The function is $0$ at $0$, but it is approximately $-1$ directly to the left of $0$ and approximately $1$ directly to the right of zero.

How does that translate into the open set definition? It means that if you look at the pre-image of the open set $(-1/2,1/2)$, it will contain $0$ but no points near zero (the $1/2$ was chosen because it is less then the $1$ that occurred in the text above), i. e. it is not open.