Image: Function machine
A function can be understood by thinking of it as a machine that takes a inputs of a certain type (i.e., inputs in its domain) and transforms them into particular outputs (which are elements of its codomain). In this illustration, the inputs are spheres of various sizes (the domain presumably contains only those spheres that are small enough to fit into the funnel). The outputs are illustrated by the cubes coming out of the chute. Hence, this function transforms each sphere into a cube.
Image file: function_machine.png
This image is found in the pages