# domain of composite function (is there a set rule)

In the function topic of "function combinations" or "function algebra", for the basic arithmetic operations of the following:

1) f + g

2) f - g

3) f * g

4) f / g

To find the domain of these, one needs to find the domains of each f, g and find the intersection to get the domain.

I recently came across a problem asking about domain of a composite function. My book does not address this by giving any rules, and when I try a couple of problems the result of those problems is that it seems to be the INTERSECTION of the domains of the functions f and g.

I looked at the posts here, and could not find the answer to this, closest references to my question that I could find are these 2 links:

Domain and Range in function composition

Domain of composite functions

Hope someone can tell me if the domain of composite function is just the intersection of the 2 individual function domains. IF that is not the case, then can someone provide a counter-example.

Regards,

P

• No, it's not the intersection. Take $f(x)=\sqrt x$ and $g(x)=|x|$. The domain of $f\circ g$ is all reals. In general, the domain of $f\circ g$ is the set of all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$. Commented Jan 14, 2014 at 18:21
• Yes, I see. The domain of square root of the absolute, can take all real numbers for x. Thanks for the counter example.
– Palu
Commented Jan 14, 2014 at 18:29

Bear in mind that $$(f\circ g)(x):=f\bigl(g(x)\bigr).$$ In order for $g(x)$ to mean anything, we must have $x\in\operatorname{dom}(g),$ and if $g(x)$ is meaningful, then in order for $f\bigl(g(x)\bigr)$ to mean anything, we must have $g(x)\in\operatorname{dom}(f).$ Consequently, we can say that $$\operatorname{dom}(f\circ g)=\bigl\{x\in\operatorname{dom}(g):g(x)\in\operatorname{dom}(f)\bigr\}.$$

In particular, then, the domain of $f\circ g$ is a subset of the domain of $g,$ consisting of those $x$ for which $g(x)$ is in the domain of $f$. (In a set-theoretic context, we often require that the domain of $f$ should be a codomain of $g$ before we talk about $f\circ g$ at all, in which case the domain of $f\circ g$ is just the domain of $g.$ This is not a universal convention, though, so be careful in using it reflexively.)

Incidentally, we have $$\operatorname{dom}(f/g)=\bigl\{x\in\operatorname{dom}(f)\cap\operatorname{dom}(g):g(x)\neq0\bigr\},$$ since even if $f(x)$ and $g(x)$ are defined, we can only say that $f(x)/g(x)$ is defined if $g(x)\neq0$.

• Hi Cameron, Yes I know about the restriction on the division case. SO on the composition case, I see based on your notation here that the range of g(x) is the domain of f, but we need to watch out for range of g(x) values that may cause problems like being undefined for f.
– Palu
Commented Jan 14, 2014 at 19:56
• It seems like you have the idea. I have added a rephrasing to my answer to hopefully make it clearer, just in case I'm misunderstanding a misunderstanding on your part. ;-) Commented Jan 14, 2014 at 21:43
• "In a set-theoretic context, we often require that the domain of f should be a codomain of g before we talk about f∘g at all". This explained this? Can you help me to understand this?
– ESCM
Commented Apr 19, 2020 at 4:17