Google Classroom
GeoGebraGeoGebra Classroom

Composition of Functions in a Cube

This shows how the composition of functions from [0,1] to [0,1] can be visualized in a unit cube. If, for example, f(x)=x^2 is the curve in blue and g(x)=1-x the curve in red, then g(f(x))=1-x^2 appears in green. The dotted line in the middle is the curve whose coordinates are (x,f(x),g(f(x))), and its "shadow" in the three coordinate planes represents the functions f(x), g(x), and g(f(x)). The functions f and g may be changed by typing into the Input window "ff(x)=whatever" and "gg(x)=whatever", where whatever is the function of x desired.