Graphical, algebraic, and numerical demonstrations of the composition [math]g(f(x))[/math], also written as [math]g\circ f[/math].
Here we have two function graphs, [math]f(x)[/math] and [math]g(x)[/math]. Our input to [math]f[/math] is [math]x[/math]. Drag the blue [math]x[/math] point along [math]f[/math]'s [math]x[/math]-axis to change its value. As you do this, the value of [math]f[/math] changes. This [i]output[/i] value, [math]f(x)[/math], then becomes the [u][i]input[/i][/u] value to [math]g[/math], so that the value of [math]g[/math] is given by the composition [math]g(f(x))[/math].[br][br]You can change the definitions of [math]f[/math] and [math]g[/math] by typing new function expressions into their respective input boxes. Also note that you can drag the coordinate planes as well as the input boxes and the text boxes so that you can see the graphs, should you decide to change them. Click the circle arrows at the top right of the graph of [math]f[/math] to reset the display.[br][br][b]Algebraically[/b], the [i][u]input[/u][/i] function [math]f(x)[/math] is "plugged in" to the function [math]g(x)[/math] to form the [u][i]output[/i][/u], the composite function [math]g(f(x))[/math]. The resulting function is shown in the text box on the [math]g[/math] graph. Note that the expression shown for [math]g(f(x))[/math] is simplified, so it might look different than you expect depending on the functions you choose.[br][br][b]Graphically[/b], you can see how the composition works by moving the [math]x[/math]-value on the [math]f[/math] graph. The [math]y[/math]-value [u][i]output[/i][/u] from [math]f[/math] for this [math]x[/math]-value is then plotted as the [u][i]input[/i][/u] value to [math]g[/math] on the [math]x[/math]-axis of the [math]g[/math] graph. The output of [math]g[/math] using this input gives us the final value of the composition.[br][br][b]Numerically[/b], the tables work similarly to the graphical action. A set of two tables is shown. In the table on the [math]f[/math] graph, [math]x[/math] is limited to a set of selected values, from [math]-3[/math] to [math]3[/math] in steps of [math]1[/math]. The output of [math]f[/math] for each of these inputs is given. These [u][i]output[/i][/u] values become the [u][i]input[/i][/u] values to the [math]g[/math] table shown on the [math]g[/math] graph. The output of [math]g[/math] at these values is the value of the composition of the two functions for the [math]x[/math]-value you selected by dragging the point.