-- A function is a black box, with some gears and creaky machinery inside.
-- It has a crank on the side that operates the machinery.
-- It has a funnel on top, and a little hole in the bottom, covered by a little door.
Here's what happens:
-- You take a number out of your pocket, and drop it into the funnel.
-- Then you turn the crank, and the gears and creaky machinery inside
go to work on your number.
-- After a short time, the little door on the bottom opens up, and a number
falls out of the box.
It may be the same as the number you dropped in. It may be bigger,
or it may be smaller.
The number that drops out is DEFINITELY related to the number that went in.
You can be sure of that, because if you drop the same number in several times,
the same number will come out every time. So there's a connection between
what goes in and what comes out.
If you want to know exactly what the connection is, you could try it once, twice,
a hundred or a thousand times again, with different numbers, and see what
comes out each time. It's possible, just by looking at what goes in and what
comes out, you might be able to pick up the pattern, describe the relationship,
and start to predict what's going to come out.
The relationship depends on exactly what's inside the box ... how many gears,
levers, screws, spinners, hammers and wrenches a number has to go through,
and how your number gets changed as it makes its way through. There are an
infinite number of possible arrangements and conglomerations of jury rigged
parts and assemblies that might be in there, to operate on a number that drops
in, and change it into what comes out.
-- We call the whole set of works inside the box a "function", and we have
a whole of symbols to describe it with. If you know how to read these
symbols when they're written down, then you can see what's in the box,
and you can easily predict what's going to happen to a number that gets
dropped in, and exactly what's going to fall out through the little door.
-- After you've worked with functions for a while, you get to the point where
you can draw a graph that SHOWS the relationship. You can see the whole
behavior of that particular function on the graph, and all the mystery goes
away. If anybody walks over to the box with a number in his hand, ready
to drop it into the funnel, you can take one look at the graph, find the
number he's about to drop in, and just as he lets it go, you can tell him
the number that's going to come out of that particular function.