# Composite functions

1. Aug 26, 2010

### thereddevils

Is it true that the domain of a composite function say gf(x) is the intersection of domain of f(x) and the domain of gf(x) ? If so, why?

Also, is the composite function gf(x) the intersection of function f(x) and function g(x)?

2. Aug 26, 2010

### nonequilibrium

So I think you mean g°f(x) which is by definition g(f(x)); the way you wrote it implies g.f(x) = g(x)f(x).

For the rest I find your question a bit confusing... For example the first:

Well obviously any x in the domain of f and g°f will be in the domain of g°f, because the domain of f is always at least the domain of g°f (if this is not clear, I will elaborate later in this post).
Are you maybe confused by the following example?
$$f: R_0 \to R_0: x \to \frac{1}{x}$$
$$g: R_0 \to R_0: y \to \frac{1}{y}$$
such that (g°f)(x) = x and it might seem as if the domain of g°f is larger than the domain of f, because now it seems to be defined for 0. I however do not think this is allowed, because $$g(f(x)) = \frac{1}{1/x}$$ and you can only say that equals x ON CONDITION THAT x is not zero, taking zero out of the domain.
So to find the domain of g°f, you first take the domain of f, and then you only need to weed out and never add. How do we weed out? We look at the set of f(A) with A being the domain of f and then we take thereof the subset B defined as the intersection of f(A) with the domain of g. Let A' be the largest subset of A such that f(A') = B. Then A' is the domain of g°f. (if this explanation is a lot in once: make venn diagrams representing the domain, image, A, B, ...)

Don't know what you mean with this question.

3. Aug 26, 2010

### thereddevils

thank you Mr Vodka, that's helpful!

4. Aug 26, 2010

### HallsofIvy

Staff Emeritus
As mr. vodka said, this doesn't quite make sense. The domain of g°f(x) is the domain of g°f(x)! I thought perhaps you meant "the intersection of the domain of f(x) and the domain of g(x)". That makes more sense but isn't true. For example, if f(x)= x+ 2 for 0< x< 5 and g(x)= x^2 for 2< x< 7, then g°f(x)= (x+ 2)^2 and is defined for all x such that f(x) is between 2 and 7- but that is exactly all x between 0 and 5.

That is, in order that g°f be defined, f(x) must be defined (x in the domain of f(x)) and f(x) itself must be in the domain of g. The domain of g°f is all x in the domain of f such that f(x) is in the domain of g.

Now, this makes sense because we can think of g(x) and f(x) as "sets of ordered pairs (x, f(x))" so we could take the intersection. But the intersection is NOT gf(x).
Again, consider the function f(x)= x+ 2 for x an integer 0< x< 5 and g(x)= x^2 for x an integer 2< x< 7.

Writing f and g as sets of ordered pairs, f= {(1, 3), (2, 4), (3, 5), (4, 6)} and g(x)= {(2, 4), (3, 9), (4, 16), (5, 25), (6, 36), (7, 49)}.

g(f(1))= g(3)= 9, g(f(2))= g(4)= 16, g(f(3))= g(5)= 25, g(f(4))= g(6)= 36 so that
g(f(x))= {(1, 9), (2, 4), (3, 25), (4, 36)}, not at all like an intersection of f and g.

Last edited: Aug 27, 2010
5. Aug 27, 2010

### thereddevils

Thanks you for the detailed explanation. As for the domain of gf(x) for example, my usual way of doing it is by looking at the domain of gf(x) itself and note the restrictions if any, then examine the domain of f(x) and note restrictions. Lastly, combine all restrictions and domains. Is this valid?

For the second part of my question, yes it's NOT an intersection. Thank you for correcting my wrong perception towards composite function all these while.