Enter an equation or problem
Camera input is not recognized!

Function composition

Function composition

Learn more with Tiger

Function composition is the art of building a new function by sending an input through one rule, then feeding that result into another rule. If <math>f(x)=2x+3</math> and <math>g(x)=x^2</math>, then <math>(g \circ f)(x)</math> means “do <math>f</math> first, then do <math>g</math>,” so <math>(g \circ f)(x)=(2x+3)^2</math>.<br><img src="/images/function-composition-img1.png" alt="Function composition pipeline showing x entering f, then g, to produce g of f of x"><br>Think of composition as a pipeline: the output of the first machine becomes the input of the next machine. This makes it perfect for modeling multi-step situations such as applying a discount and then tax, converting units twice, or transforming a graph before measuring it.<br><h2>How to compose functions</h2><ol><li>Identify the inner function. In <math>(f \circ g)(x)</math>, the inner function is <math>g(x)</math> because it runs first.</li><li>Replace every <math>x</math> in the outer function with the entire inner function.</li><li>Simplify carefully, keeping parentheses until the final expression is clear.</li></ol><h2>Worked example</h2>Let <math>f(x)=3x-1</math> and <math>g(x)=x^2+4</math>. To find <math>(f \circ g)(x)</math>, place <math>g(x)</math> wherever <math>f</math> has an input: <math>f(g(x))=3(x^2+4)-1=3x^2+11</math>. For the reverse order, <math>(g \circ f)(x)=g(3x-1)=(3x-1)^2+4=9x^2-6x+5</math>. The two answers are different, which is the big lesson: function composition usually depends on order.<br><h2>Quick comparison chart</h2><table><tr><th>Expression</th><th>First step</th><th>Result for the example</th></tr><tr><td><math>(f \circ g)(x)</math></td><td>Run <math>g</math> first</td><td><math>3x^2+11</math></td></tr><tr><td><math>(g \circ f)(x)</math></td><td>Run <math>f</math> first</td><td><math>9x^2-6x+5</math></td></tr></table><h2>Common mistakes</h2><ul><li>Do not multiply function names: <math>f(g(x))</math> means substitution, not <math>f imes g</math>.</li><li>Do not drop parentheses around the inner function, especially when it has more than one term.</li><li>Check domain restrictions. If the inner function produces a value the outer function cannot accept, that input is not allowed.</li></ul>Use the function composition solver to substitute, simplify, and compare both composition orders step by step.

Latest Related Drills Solved