# Prove that if $f$ is continuous then $\Vert f\Vert$ is continuous. Is the converse true?

I need help with this problem:

Given a function $$f:D\subset\mathbb{R}\rightarrow\mathbb{R}^n$$, consider the function $$\Vert f\Vert :D\subset\mathbb{R}\rightarrow\mathbb{R}$$ where $$\Vert f\Vert (t) = \Vert f(t)\Vert, t\in\mathbb{R}$$. Prove that if g is continuous the $$\Vert f\Vert$$ is continuous. Is the converse true?

I don't understand this problem. I think that the function $$\Vert f\Vert :D\subset\mathbb{R}\rightarrow\mathbb{R}$$ takes the norm of every number plugged in, and we get the same result that the function $$\Vert f(t)\Vert$$ would give us, which is taking the norm of the function. How do I prove this problem? I tried to use limits from both sides, but I don't have any function to apply them to.

• $f(x)=\boldsymbol 1_{\mathbb Q}(x)-\boldsymbol 1_{\mathbb R\setminus \mathbb Q}(x)$ is discontinuous everywhere but $|f|$ is continuous. – Surb Feb 22 at 16:28

Hint: By the reverse triangle inequality we know that $$|(||x||-||y||)|\leq ||x-y||$$ for all $$x,y\in\mathbb{R^n}$$. Using this you can prove that a norm is continuous, and then $$||f||$$ will be just a composition of continuous functions.

The converse is obviously false even if $$n=1$$. Just take the function $$D:\mathbb{R}\to\mathbb{R}$$ to be $$D(x)=1$$ if $$x\in\mathbb{Q}$$, otherwise $$D(x)=-1$$. This function is nowhere continuous, but $$|D|$$ is just a constant.

• I don't understand why $|(||x||-||y||)|\leq ||x-y||$ implies that the norm is continuous. – davidllerenav Feb 22 at 16:41
• Let $\epsilon>0$. Then you can take $\delta=\epsilon$ and you get that if $||x-y||<\delta$ then $|(||x||-||y||)|\leq ||x-y||<\delta=\epsilon$. So the norm is even uniformly continuous. – Mark Feb 22 at 16:45
• And how do I use that to prove that the norm is continuous? – davidllerenav Feb 22 at 16:55
• If a function is uniformly continuous then of course it is continuous. There is nothing left to prove. – Mark Feb 22 at 17:06
• Maybe it will help to write $f(x)=\|x\|.$ Then, $f$ is continuous at $x_0$ iff for all $\epsilon>0$ there is a $\delta>0$ such that if $\|x-x_0\|<\delta$, then $|f(x)-f(x_0)|<\epsilon.$ Now unpack this and you'll see the reverse triangle inequality is exactly the condition you need for this to hold. i.e. take $\delta=\epsilon.$ It shows in fact, that the continuity is uniform. – Matematleta Feb 22 at 18:15

For the first part, note that $$\|x-y\|\ge |\|x\|-\|y\||$$ so the norm $$\|\cdot \|:\mathbb R^n\to \mathbb R$$ is continuous. And now, since $$g$$ is also continuous, so is $$\|g\|$$, being a composition of continuous functions.

For the second part, take $$g(x) = \begin{cases} -1 & x< 0 \\ 1 & x\ge 0 \\ \end{cases}$$

Then, $$|g|$$ is continuous but $$g$$ is not.

• Why $\|x-y\|\ge |\|x\|-\|y\||$ implies thaat the norm $\|\cdot \|:\mathbb R^n\to \mathbb R$ is continuous? – davidllerenav Feb 22 at 16:40