Motivating example

Consider the functions

f:x1x3,for xR,x3g:xx+2,for xR.\begin{align*} &f: x \mapsto \frac{1}{x-3}, &&\textrm{for } x \in \mathbb{R}, x \neq 3 \\ &g: x \mapsto x+2, &&\textrm{for } x \in \mathbb{R}. \end{align*}

In trying to set up the composite function fg{fg}, we run into a problem if we try to substitute x=1{x=1}.

The first step in getting g(1)=3{g(1)=3} works as intended but trying to substitute 3{3} into f{f} does not work as 3{3} is not within the domain of f{f}.

This example gives us an insight into the condition for the existence of the composite function fg{fg}: that the range of g{g} must be a subset of the domain of f{f}.

The composite function fgfg exists if RgDfR_g \subseteq D_f.

Visualization

g{g}
f{f}
fg{fg}
Rg{R_g}
Df{D_f}

Examples

Consider the functions

f:x1x3,for xR,x3g:xx+2,for xR.egin{align*} &f: x mapsto rac{1}{x-3}, && extrm{for } x in mathbb{R}, x eq 3 \ &g: x mapsto x+2, && extrm{for } x in mathbb{R}. end{align*}
Rg=(,){R_g = (-\infty, \infty)}
f:x1x3,for xR,x3g:xx+2,for xR.egin{align*} &f: x mapsto rac{1}{x-3}, && extrm{for } x in mathbb{R}, x eq 3 \ &g: x mapsto x+2, && extrm{for } x in mathbb{R}. end{align*}
Rf=(,0)(0,){R_f = (-\infty, 0) \cup (0, \infty)}
Next: Domain >>