# A formal epsilon-delta proof for the Continuity Law for Composition

The continuity law for composition states, informally, that:

$$\text{IF } f \text{ is continuous at } a \ \text{ AND }\ g \text{ is continuous at } f(a) \text{ THEN } g(f(a)) \text{ is continuous at } a$$

Or, using the limit definition of continuity:

$$\lim_{x \to a} f(x) = f(a) \wedge \lim_{x \to f(a)} g(x) = g(f(a)) \Longrightarrow \lim_{x \to a} g(f(x)) = g(f(a))$$

Or, using the formal epsilon-delta definitions:

$$\forall \epsilon > 0, \exists \delta_1 > 0, \forall x \in \mathbb{R}, |x - a| < \delta_1 \Longrightarrow |f(x) - f(a)| < \epsilon \tag{1}\label{1}$$

$$\forall \epsilon > 0, \exists \delta_2 > 0, \forall x \in \mathbb{R}, |x - f(a)| < \delta_2 \Longrightarrow |g(x) - g(f(a))| < \epsilon \tag{2}\label{2}$$

$$\forall \epsilon > 0, \exists \delta > 0, \forall x \in \mathbb{R}, |x - a| < \delta \Longrightarrow |g(f(x)) - g(f(a))| < \epsilon \tag{3}\label{3}$$

$$\eqref{1} \wedge \eqref{2} \Longrightarrow \eqref{3}$$

Proof:

We assume \eqref{1} and \eqref{2}. We want to show \eqref{3}.

Let $$\epsilon > 0$$.

We will use the same $$\epsilon$$ in \eqref{2}, giving us:

$$\exists \delta_2 > 0, \forall x \in \mathbb{R}, |x - f(a)| < \delta_2 \Longrightarrow |g(x) - g(f(a))| < \epsilon \tag{2a}\label{2a}$$

Let $$\delta_2 > 0$$ such that the following is true:

$$\forall x \in \mathbb{R}, |x - f(a)| < \delta_2 \Longrightarrow |g(x) - g(f(a))| < \epsilon \tag{2b}\label{2b}$$

We will substitute $$\delta_2$$ for $$\epsilon$$ in $$\eqref{1}$$ to obtain:

$$\exists \delta_1 > 0, \forall x \in \mathbb{R}, |x - a| < \delta_1 \Longrightarrow |f(x) - f(a)| < \delta_2\tag{1a}\label{1a}$$

Let $$\delta_1 > 0$$ such that the following is true:

$$\forall x \in \mathbb{R}, |x - a| < \delta_1 \Longrightarrow |f(x) - f(a)| < \delta_2\tag{1b}\label{1b}$$

Let $$x \in \mathbb{R}$$.

We will use the same $$x$$ in \eqref{1b} to obtain:

$$|x - a| < \delta_1 \Longrightarrow |f(x) - f(a)| < \delta_2\tag{1c}\label{1c}$$

Let $$\delta = \delta_1$$.

We assume $$|x - a| < \delta = \delta_1$$.

We want to show:

$$|g(f(x)) - g(f(a))| < \epsilon$$

By our assumption and \eqref{1c}, we know:

$$|f(x) - f(a)| < \delta_2 \tag{1d}\label{1d}$$

We substitute $$f(x)$$ for $$x$$ in \eqref{2b} to obtain:

$$|f(x) - f(a)| < \delta_2 \Longrightarrow |g(f(x)) - g(f(a))| < \epsilon \tag{2c}\label{2c}$$

Finally, we substitute \eqref{1d} in \eqref{2c} to obtain our desired conclusion:

$$|g(f(x)) - g(f(a))| < \epsilon$$

$$\blacksquare$$

And here is where I'm stuck. All I need to show is $$0 < |f(x) - f(a)|$$, and I will be able to complete the proof. But I don't know how to show that. Any ideas?

Edit: Proof has been updated and completed! If there's anything that can be improved, please let me know.

• I think you mean $f$ to be continuous at $a$, not at $g$. And you mean $g(f(x))$, not $g(f(a))$. May 27, 2019 at 4:32
• @ArturoMagidin Thanks for the correction! May 27, 2019 at 4:34
• Duplicate question math.stackexchange.com/questions/4366927/… Aug 28, 2022 at 11:03

Your definition of continuity is wrong here - it is just $$|x-a|<\delta$$, and not $$0<|x-a|<\delta$$. For continuity, the case $$x=a$$ is valid too.