# 3.4 Composition of functions

 Page 1 / 9
In this section, you will:
• Combine functions using algebraic operations.
• Create a new function by composition of functions.
• Evaluate composite functions.
• Find the domain of a composite function.
• Decompose a composite function into its component functions.

Suppose we want to calculate how much it costs to heat a house on a particular day of the year. The cost to heat a house will depend on the average daily temperature, and in turn, the average daily temperature depends on the particular day of the year. Notice how we have just defined two relationships: The cost depends on the temperature, and the temperature depends on the day.

Using descriptive variables, we can notate these two functions. The function $\text{\hspace{0.17em}}C\left(T\right)\text{\hspace{0.17em}}$ gives the cost $\text{\hspace{0.17em}}C\text{\hspace{0.17em}}$ of heating a house for a given average daily temperature in $\text{\hspace{0.17em}}T\text{\hspace{0.17em}}$ degrees Celsius. The function $\text{\hspace{0.17em}}T\left(d\right)\text{\hspace{0.17em}}$ gives the average daily temperature on day $\text{\hspace{0.17em}}d\text{\hspace{0.17em}}$ of the year. For any given day, $\text{\hspace{0.17em}}\text{Cost}=C\left(T\left(d\right)\right)\text{\hspace{0.17em}}$ means that the cost depends on the temperature, which in turns depends on the day of the year. Thus, we can evaluate the cost function at the temperature $\text{\hspace{0.17em}}T\left(d\right).\text{\hspace{0.17em}}$ For example, we could evaluate $\text{\hspace{0.17em}}T\left(5\right)\text{\hspace{0.17em}}$ to determine the average daily temperature on the 5th day of the year. Then, we could evaluate the cost function at that temperature. We would write $\text{\hspace{0.17em}}C\left(T\left(5\right)\right).$

By combining these two relationships into one function, we have performed function composition, which is the focus of this section.

## Combining functions using algebraic operations

Function composition is only one way to combine existing functions. Another way is to carry out the usual algebraic operations on functions, such as addition, subtraction, multiplication and division. We do this by performing the operations with the function outputs, defining the result as the output of our new function.

Suppose we need to add two columns of numbers that represent a husband and wife’s separate annual incomes over a period of years, with the result being their total household income. We want to do this for every year, adding only that year’s incomes and then collecting all the data in a new column. If $\text{\hspace{0.17em}}w\left(y\right)\text{\hspace{0.17em}}$ is the wife’s income and $\text{\hspace{0.17em}}h\left(y\right)\text{\hspace{0.17em}}$ is the husband’s income in year $\text{\hspace{0.17em}}y,\text{\hspace{0.17em}}$ and we want $\text{\hspace{0.17em}}T\text{\hspace{0.17em}}$ to represent the total income, then we can define a new function.

$T\left(y\right)=h\left(y\right)+w\left(y\right)$

If this holds true for every year, then we can focus on the relation between the functions without reference to a year and write

$T=h+w$

Just as for this sum of two functions, we can define difference, product, and ratio functions for any pair of functions that have the same kinds of inputs (not necessarily numbers) and also the same kinds of outputs (which do have to be numbers so that the usual operations of algebra can apply to them, and which also must have the same units or no units when we add and subtract). In this way, we can think of adding, subtracting, multiplying, and dividing functions.

For two functions $\text{\hspace{0.17em}}f\left(x\right)\text{\hspace{0.17em}}$ and $\text{\hspace{0.17em}}g\left(x\right)\text{\hspace{0.17em}}$ with real number outputs, we define new functions $f+g,\text{\hspace{0.17em}}f-g,\text{\hspace{0.17em}}fg,\text{\hspace{0.17em}}$ and $\text{\hspace{0.17em}}\frac{f}{g}\text{\hspace{0.17em}}$ by the relations

prove that [a+b, b+c, c+a]= 2[a b c]
can't prove
Akugry
i can prove [a+b+b+c+c+a]=2[a+b+c]
this is simple
Akugry
hi
Stormzy
x exposant 4 + 4 x exposant 3 + 8 exposant 2 + 4 x + 1 = 0
x exposent4+4x exposent3+8x exposent2+4x+1=0
HERVE
How can I solve for a domain and a codomains in a given function?
ranges
EDWIN
Thank you I mean range sir.
Oliver
proof for set theory
don't you know?
Inkoom
find to nearest one decimal place of centimeter the length of an arc of circle of radius length 12.5cm and subtending of centeral angle 1.6rad
factoring polynomial
find general solution of the Tanx=-1/root3,secx=2/root3
find general solution of the following equation
Nani
the value of 2 sin square 60 Cos 60
0.75
Lynne
0.75
Inkoom
when can I use sin, cos tan in a giving question
depending on the question
Nicholas
I am a carpenter and I have to cut and assemble a conventional roof line for a new home. The dimensions are: width 30'6" length 40'6". I want a 6 and 12 pitch. The roof is a full hip construction. Give me the L,W and height of rafters for the hip, hip jacks also the length of common jacks.
John
I want to learn the calculations
where can I get indices
I need matrices
Nasasira
hi
Raihany
Hi
Solomon
need help
Raihany
maybe provide us videos
Nasasira
Raihany
Hello
Cromwell
a
Amie
What do you mean by a
Cromwell
nothing. I accidentally press it
Amie
you guys know any app with matrices?
Khay
Ok
Cromwell
Solve the x? x=18+(24-3)=72
x-39=72 x=111
Suraj
Solve the formula for the indicated variable P=b+4a+2c, for b
Need help with this question please
b=-4ac-2c+P
Denisse
b=p-4a-2c
Suddhen
b= p - 4a - 2c
Snr
p=2(2a+C)+b
Suraj
b=p-2(2a+c)
Tapiwa
P=4a+b+2C
COLEMAN
b=P-4a-2c
COLEMAN
like Deadra, show me the step by step order of operation to alive for b
John
A laser rangefinder is locked on a comet approaching Earth. The distance g(x), in kilometers, of the comet after x days, for x in the interval 0 to 30 days, is given by g(x)=250,000csc(π30x). Graph g(x) on the interval [0, 35]. Evaluate g(5)  and interpret the information. What is the minimum distance between the comet and Earth? When does this occur? To which constant in the equation does this correspond? Find and discuss the meaning of any vertical asymptotes.