# Math Help - Composition of function

1. ## Composition of function

In my textbook it says that in composition of functions we require domain of second function to be EQUAL to the range of the first. My question is that why cannot the range of the first function be a subset of the domain of the second?

2. ## Re: Composition of function

Originally Posted by clerk
In my textbook it says that in composition of functions we require domain of second function to be EQUAL to the range of the first. My question is that why cannot the range of the first function be a subset of the domain of the second?
"The nesting of two or more functions to form a single new function is known as composition. The composition of two functions f and g is denoted $f \circ g$, where f is a function whose domain includes the range of g ." -from MathWorld

3. ## Re: Composition of function

Think about the domain and range of fg and then of the domain and range of the inverse of fg

4. ## Re: Composition of function

Originally Posted by biffboy
Think about the domain and range of fg and then of the domain and range of the inverse of fg
But then am I not assuming the functions to be invertible? In general f composed with g may not be invertible ,right?

5. ## Re: Composition of function

I understand your point. However since the fg means apply g first and then apply f to the answer, the domain of fg cannot include values that were not in the domain of g. The domain of f could have been 'wider' than that of g but the domain of fg would still be restricted to being the same as that of g.
Example g(x)=square root of x Domain: all x > or= to 0
f(x)=x^2 Domain: all real x
fg(x)=x Domain: all x > or= to 0

6. ## Re: Composition of functions

Originally Posted by clerk
In my textbook it says that in composition of functions we require domain of second function to be EQUAL to the range of the first. My question is that why cannot the range of the first function be a subset of the domain of the second?
I think your textbook is wrong. The domain of the second function can indeed be bigger than the range of the first. In ll that is required is that the range of the first function be a subset of the domain of the second function (biffboy's example is a good one).

7. ## Re: Composition of function

Wikipedia says that "range" is sometimes used to mean "codomain." Either the textbook does this, or it unnecessarily restricts the concept of composition.