Function composition is an operation that takes as input two functions and returns another function. If the two functions are , the output is denoted . Function composition is defined so that for all inputs . Not every possible pair of functions can be composed - the range of has to be a subset of the domain of . Function composition, wherever it is defined, is always associative, but rarely commutative.