# How to show that $f(x) = x^2$ is continuous using topological definition?

I am trying to show that simple continuous functions satisfy topological definition of continuity

Recall given $(X, \mathcal{T}), (Y, \mathcal{J}), f$ is continuous if $f^{-1}(V) \in \mathcal{T}, \forall V \in \mathcal{J}$

Then given $f:\mathbb{R} \to \mathbb{R}$ equipped with the usual topology $\mathcal{T}$, we wish to show that $f(x) = x^2$ is continuous $\Leftrightarrow$ show that $f^{-1}(V)$ is open $\forall V \in \mathcal{T}$

Attempt:

Given $f: \mathbb{R} \to \mathbb{R}, x \mapsto x^2$

By $\epsilon-\delta$ definition of continuity, we know that $\forall x \in \mathbb{R}, \forall \epsilon > 0, \exists \delta > 0$, such that $\forall x_o \in \mathbb{R}$ whenever $x \in \mathcal{B}_{\delta}(x_o) \implies f(x) \in \mathcal{B}_{\epsilon}(f(x_o))$

Then given $x_o \in \mathbb{R}, \epsilon >0$, let $V = \mathcal{B}_{\epsilon}(f(x_o))$. Then $x \in f^{-1}(V) = f^{-1}(\mathcal{B}_{\epsilon}(f(x_o)))$

However, since $f$ satisfies $\epsilon-\delta$ version of continuity, $\exists \delta >0$ such that $x \in \mathcal{B}_{\delta}(x_o) \subseteq f^{-1}(V) = f^{-1}(\mathcal{B}_{\epsilon}(f(x_o)))$. This shows $f^{-1}(V)$ is open by definition of open set in $\mathbb{R}$.

End of proof.

can anyone check if this is correct? my main concern is that not all $V$ is of the form $\mathcal{B}_{\epsilon}(f(x_o))$...

## 4 Answers

Open intervals $(a,b), a < b$ form a base for the topology of $\mathbb{R}$.

What is $f^{-1}[(a,b)] = \left\{x \in \mathbb{R}: x^2 \in (a,b) \right\}$?

If $b \le 0$, then no square is in $(a,b)$ so then $f^{-1}[(a,b)] = \emptyset$, which is open. So assume $b > 0$. Then $x^2 < b$ iff $x \in (-\sqrt{b},\sqrt{b})$. If $a < 0$, the $a$ does not impose an extra condition, as all $x^2 \ge 0 > a$ in that case, so

$f^{-1}[(a,b)] = (-\sqrt{b},\sqrt{b})$ if $b > 0, a < 0$, which is an open interval in $\mathbb{R}$ so open.

Otherwise we also need $x^2 > a \ge 0$, so $x < -\sqrt{a}$ or $x > \sqrt{a}$ respectively.

So then $f^{-1}[(a,b)] = (-\sqrt{b}, -\sqrt{a}) \cup (\sqrt{a},\sqrt{b})$ if $b > a \ge 0$, which is open as the union of two open intervals.

This covers all cases, so $f^{-1}[(a,b)]$ is open for all intervals.

Now if $O$ is open, we can write $O = \bigcup_{i \in I} (a_i,b_i)$, for some family of open intervals $(a_i,b_i), i \in I$, as the intervals form a base. But then

$$f^{-1}[O] = f^{-1}[\bigcup_{i \in I} (a_i,b_i)] = \bigcup_{i \in I} f^{-1}[(a_i,b_i)]$$

by standard properties of $f^{-1}$ and the last set is open as unions of open sets are open, and we have shown that the inverse images of the base sets are open.

It suffices to consider open balls as any open set in $\mathbb{R}$ can be expressed as union of a countable collection of open balls.

• Do you mean arbitrary collection of open balls rather than countable collection? – Chris Dugan Jun 3 '16 at 21:35
• @ChrisDugan But the reals are Lindelöf (en.wikipedia.org/wiki/Lindel%C3%B6f%27s_lemma) – grand_chat Jun 3 '16 at 21:38
• Awesome. I did not know that. You learn something new every day. – Chris Dugan Jun 3 '16 at 21:42
• The cardinality of the union does not in fact matter. – Henno Brandsma Jun 4 '16 at 6:57
• yup, it doesn't matter. – Siong Thye Goh Jun 4 '16 at 16:09

In the topological proof you need to start with an open set $V\in\cal J$, and show that $f^{-1}(V)\in\cal T$.

Since $f(x):=x^2$ is not surjective, you need to separately consider the case that $V$ does not meet the interval $[0,\infty)$, i.e., consider the case $f^{-1}(V)$ is empty. But the empty set is open in $(X,{\cal T})$, so the requirement that $f^{-1}(V)\in\cal T$ is satisfied.

In the other case, there exists $x_0$ such that $f(x_0)\in V$. Then, since $V$ is open, there exists $\epsilon>0$ such that $B_\epsilon(f(x_0))\subset V$, and you can continue with your proof with this value for $\epsilon$.

You are correct in your assessment that your proof is not quite correct. As you say, not all $V$ are open balls so you have not shown that the definition is satisfied for all $V$. This can be fixed in two ways.

1. Use the same argument but do it pointwise, as was done in the answer to this question: Prove $\epsilon$-$\delta$ definition of continuity implies the open set definition for real function
2. Argue that any open set is the union of open balls and that if the theorem is true for open balls then it must be true of arbitrary unions. This must be true by the definition of a topology.