You are on page 1of 2

Function Composition is a type of composition that combines two functions to

create one function. For example, if we function f, and function g, we could use function

composition to create function h, which would use both function f and function g.

Functions can be very useful for computer programming and other mathematical related

tasks. For example, computer scientists use functions as well as function composition to

find specific data needed or complete a specific task.

A function composition is where you combine two functions. For example, if you

have the function f and the function g. You could use function composition to make

function h, which is the two functions combined into one function. In order to solve this

function you would solve function f (f of x), then put the output from that function into

function g (g of x). Your output from g would solve the entire function composition (h of

x).

How do you find the domain and range of a function composition? Let’s say we

have the function composition h, which is composed of f and g. In order to find the

domain and range of the entire function, you would need to find the domain and range

of function f, and of function g. Then you would see if the two conflict, in that if f

produces a domain that g cannot handle. If function f doesn't do this, then the domain of

the whole function is the domain of f. The range of the function composition has to be

the range of g. Because, the range is the set of output values, since g is the final

function in the function composition and there is functions to go through, the range of g

is the range of the whole function composition.

Let’s take a look at how function composition is used in computer science.

Function composition can be used to abstract (get what you need). For example, if you
have a function that translates French to English, you put a specific sentence in the

function (in french) and it will return it in english. As previously mentioned, function

composition is the concept of combining a function, for example, german_to_french()

and french_to_english(), to make german_to_english(). To take this example further,

let’s say the sentence is in german now. You need this specific sentence in english for

your code; however, the only functions you have access too convert German to French

and French to English. So to convert your sentence to English the most efficiently you

combine the two functions to create a German to English translation function.

In conclusion, function composition is where you combine two functions to create

one function that serves the purpose of those two functions. You can find the domain as

well as the range of a function. As well as, function composition is used in computer

science as well as other mathematical topics. Function composition is used in computer

science to abstract the data you need. Function composition is very useful and can be a

real time saver in the right situation.

You might also like