Composition functions are used to combined the two functions by using the certain formulas. Let A, B and C be any three sets and let f : A B and g : B C be any two functions. Note that the domain of g is the co-domain of f. Define a new function (gof): A C such that (gof) (a) = g(f(a)) for all a A. Here f(a) is an element of B. therefore g(f(a)) is meaningful. The function gof is called the composition of two functions f and g.