# Real Analysis: Continuity of a Composition Function

Suppose $f$ and $g$ are functions such that $g$ is continuous at $a$, and $f$ is continuous at $g(a)$. Show the composition $f(g(x))$ is continuous at $a$.

My idea: Can I go straight from definition and take $\delta=\min\{\delta_1,\delta_2\}$, where $\delta_1$ is used for the continuity of $g$ at $a$ and $\delta_2$ is used for f being continuous at $g(a)$. In my proof I just treat $g(a)$ as a point when referring to the composition. So it goes like this:

Proof: Given $\epsilon>0$, take $\delta=\min\{\delta_1,\delta_2\}$. Then $0<|x-g(a)|<\delta$ which implies $|f(g(x))-f(g(a))|<\epsilon$.

• What you just wrote isn't quite correct. From your $\delta$ you get that $|f(x) - f(g(a))| < \epsilon$ which isn't what you want. Commented Oct 16, 2013 at 1:03
• It's also unclear what your $\delta_1$ and $\delta_2$ are referring to. Once you clear up that confusion to yourself it may be a bit more obvious to you how to complete your proof. Commented Oct 16, 2013 at 1:07
• Do you know where I can find a 'citable' version of this result? I want to use it in my paper without having to waste space proving it. Commented Jul 5 at 15:57

## 4 Answers

Since $f$ is continuous at $g(a)$, our definition of continuity tells us that for all $\varepsilon > 0$ there is some $\delta_1$ such that $$|g(x) - g(a)| < \delta_1\implies|f(g(x))-f(g(a))|<\varepsilon.$$ Also, since $g$ is continuous at $a$, there is some $\delta$ such that $$|x-a|<\delta \implies |g(x)-g(a)|<\delta_1.$$ I've taken $\varepsilon =\delta_1$ here. Now this tells us that for all $\varepsilon > 0$ there is some $\delta > 0$ (and a $\delta_1 > 0$) such that $$|x-a| < \delta\implies|g(x)-g(a)|<\delta_1\implies|f(g(x)) - f(g(a))|<\varepsilon,$$ which is what we wanted to show.

• Given that $f$ is continuous at $g(a)$, why are you allowed to substitute $g(x)$ for $x$ in the statement $0\lt |x-g(a)|\lt \delta_1 \implies |f(x)-f(g(a))|\lt \epsilon$? Shouldn't you first specify that $x$ is in the domain of $f\circ g$ first? Otherwise, we cannot know if $g(x)$ or $f(g(x))$ are defined. Commented Feb 19 at 2:14
• You are right. To be precise, it should be $|y-g(a)|<\delta_1\Rightarrow|f(y)-f(g(a))|<\varepsilon$. Then, the proof is correct. Commented Mar 27 at 21:19

Proof

It will be shown that the limit of $$f(g(x))$$ at any arbitrary point $$x=a$$ in the domain of $$f(g(x))$$ is equal to $$f(g(a))$$.

1. Let $$a_n$$ be any convergent sequence such that $$a_n\to a$$.
2. Since $$g(x)$$ is continuous, $$g(a_n)\to g(a)$$ as $$a_n\to a$$.
3. Since $$f(x)$$ is continuous, $$f(g(a_n))\to f(g(a))$$ as $$a_n\to a$$ as required.

Continuous Compositions: Thm: The composite denoted by, “•”, of two continuous functions is continuous.

Pf/Let f:A—>B and g:C—>D be continuous functions : g(A) C A. Then for every 𝜖 > 0, we have, 0<|𝑥-a|< 𝛿g =>|g(𝑥)-g(a)|< 𝜖, 0<|x’-a’|< 𝛿f =>|f(x’)-f(a’)|< 𝜖. If we choose 𝛿 = 𝛿g•𝛿f, then |(f•g)(x)-(f•g)(a)|=|𝑓(𝑔(𝑥))−𝑓(𝑔(𝑎))|< |f(x’)-f(a’)|< 𝜖.///

• Welcome to Math.SE! Regarding your answer, please use MathJax so that your answer is easier to read. Commented Mar 31, 2019 at 18:38

If $$f \circ g$$ is well defined then without any loss of generality let's assume that $$f:A\to R$$, and $$g:B \to R$$ such that $$f(A) \subset B$$. Also $$A$$ and $$B$$ are $$\subset R$$.

Now since $$g$$ is continuous at $$a$$, given $$\epsilon >0$$,there exists a $$δ >0$$, such that whenever $$0<|x−a|<δ$$, we have $$|f(x)−f(a)|<ϵ$$. Now choose $$\delta_1 >0$$ such that whenever $$0<|y−a|<δ_1$$ $$\implies |g(y)−g(a)|< \delta$$.

Then we are done.

• You sure $f(A)\subset B$? isn't it $g(B)\subset A$ Since you have $f(g(x))$.
– PNT
Commented Oct 2, 2022 at 16:57