Is there a topology so that $f(x)=x$ is continuous but $g(x)=x^2$ is not?

Is there a topology $T$ on $\mathbb R$, so that

$f : (\mathbb R,T) \longrightarrow (\mathbb R, T) , f(x) = x$ is continuous but

$g : (\mathbb R,T) \longrightarrow (\mathbb R, T) , g(x) = x^2$ is not continuous?

• I was looking for $T = \mathbb Z$ so that $f(-2) = \sqrt2$ when $\sqrt2$ is not in $\mathbb Z$
– user391105
May 1 '17 at 19:52
• What is $T$ topology here ? May 1 '17 at 19:56
• What topologies do you know on $\mathbb{R}$? May 1 '17 at 19:57
• $T=\mathbb{Z}$ can't be a topology on $\mathbb{R}$ since we must have $\mathbb{R}\in T$. May 1 '17 at 20:03
• The identity function is always continuous w.r.t. the same topology. May 2 '17 at 1:44

Try the lower limit topology on $\mathbb{R}$. It's also called the Sorgenfrey line. A basis for the open sets is given by half-open intervals $\{[a,b)\mid a<b\in\mathbb{R}\}$.

Here's an easier example. Consider the topology $T$ with three open sets $T=\{\emptyset,\mathbb{R},(10,20)\}$. Then $f$ is continuous, but $g$ is clearly not since $g^{-1}((10,20))=(-\sqrt{20},-\sqrt{10})\cup(\sqrt{10},\sqrt{20})$ which is not open.

• Yes that makes sense thank you
– user391105
May 1 '17 at 20:24

If the domain and codomain has the same topology, the identity function $x\mapsto x$ is always continuous, for any space, and any topology. As for a topology that makes $x\mapsto x^2$ discontinuous on the reals, try taking a bijection $h: \Bbb R\to \Bbb R$ that is discontinuous in the standard topology $S$ (the more discontinuous the better), and let $T$ be the topology that makes $h$ a homeomorphism from $(\Bbb R,S)$ to $(\Bbb R,T)$.

• I believe if the topology of the domain is coarser the identity need not be continuous May 1 '17 at 20:01
• @JakobElias In the context of the question, the domain and codomain have the same topology. I can say it explicitly, though. May 1 '17 at 20:21
• Oh yeah you're right, I had overlooked it :) May 1 '17 at 20:33

First, consider the topology $\mathcal{L}_s=\left\{A\subseteq\mathbb{R} | \forall{x}\in A \ \exists n\in\mathbb{N} \ \text{such that} \ \left[x,x+\frac{1}{n}\right)\subseteq A\right\}$ in the codomain of $f$ and $g$.

Next, consider the topology in the domain of $f$ and $g$ defined by $\tau=\left\{f^{-1}[U]=U \ | \ U\in\mathcal{L}_s \right\}$. Clearly, $f$ is continuous (by construction of the topology).

We claim that $g$ is not continuous with that topology. Consider $[a,\infty)$ with $a>0$. Clearly, $[a,\infty)\in\mathcal{L}_s$. Then, $g^{-1}[[a,\infty)]=(-\infty,-\sqrt{a}]\cup[\sqrt{a},\infty)\notin\tau$

The identity function is always continuous.

Let $T=\{\phi, \mathbb R, \{1\}\}.$ Then $\{1\}\in T$, but for $g(x)=x^2$ we have $g^{-1}\{1\}=\{-1,1\}\not \in T$.

For an example of a Hausdorff topology, let $T$ be the lower-limit topology (a.k.a. the Sorgenfrey line) and $g(x)=x^2.$ Then $[1,\infty)\in T$ but $g^{-1}[1,\infty)=(-\infty,-1]\cup [1,\infty)\not \in T.$

I was looking for $T=\mathbb{Z}$ so that $f(−2)=\sqrt{2}$ when $\sqrt{2}$ is not in $\mathbb{Z}$.

This thinking can lead to a solution, if you are much more precise. Remember that a topology $T$ must be a collection of sets. So stating $T = \mathbb{Z}$ does not work. Instead, let's try $T = \{\emptyset, \mathbb{Z}, \mathbb{R}\}$. We can verify that $f(S)$ is open and $g(S)$ is not open for each $S \in T$.

p.s. Note that $f(-2) = -2$ not $\sqrt{2}$ since $f$ is the identity function.