In mathematics, function composition is an operation that takes two functions f and g and produces a function h such that h(x) = g(f(x)).In this operation, the function g is applied to the result of applying the function f to x.That is, the functions f :. Back to the overall AE model Recall that AE is the sum of all expenditure (less imports). G(g(x)) = g (2x+8) g(2x+8) = 2 (2x+8) +8 = 4x + 16 + 8 = 4x + 24.