Let f,g:\mathbb{R}\rightarrow \mathbb{R}. Their composition is the function g\circ f:\mathbb{R}\rightarrow \mathbb{R} is defined by

(g\circ f)(x)=g(f(x))


Let f and g be functions \mathbb{R}\rightarrow \mathbb{R} with f continuous at some point a\in\mathbb{R}, and g continuous at the point f(a). Then g\circ f is continuous at a.


Proof: For each \varepsilon>0, we must find a \delta>0 such that


|x-a|<\delta\Rightarrow |(g\circ f)(x)-(g\circ f)(a)|<\varepsilon


Let \varepsilon>0, since g is continuous at f(a), \exists\,\delta_g>0:


|t-f(a)|<\delta_g\Rightarrow |g(t)-g(f(a))|<\varepsilon


But also f is continuous at a, so (we can get f(x) \delta_g-close to f(a)), \exists\,\delta>0 such that


|x-a|<\delta\Rightarrow |f(x)-f(a)|<\delta_g


So therefore,

|x-a|<\delta\Rightarrow |f(x)-f(a)|<\delta_g\Rightarrow |g(f(x))-g(f(a))|<\varepsilon