Interactivate


Functions as Processes or Rules: "Function Machines"


Shodor > Interactivate > Discussions > Functions as Processes or Rules: "Function Machines"

Mentor: We are going to study functions by using a model. This particular model closely resembles the way scientists think about functions. Let me draw a machine, which can be anything with two openings. Arrows show "In" and "Out" directions.

Student: What are the X and Y for?

Mentor: X and Y are traditional names for input and output, that is, for the numbers that we put into the machine and the number that the machines puts out. A number goes in, the machine does something to it, and another number comes out. The function machine does the same thing to every number. Sometimes we just call it "function" for short.

This is how the machine works: the directions are written in a special code people use for functions. Let's use this special code for an example: X + 2 = Y.

Mentor: So, what is your number?

Student: 5.

Mentor: (points to the equation) The function machine does something to 5, and out comes 7.

Student: 12.

Mentor: In comes 12, out comes 14.

Student: It adds 2!

Mentor: You have revealed the secret of this function. See if you can read the mathematical language.

Student: Sure, X plus 2 is equal to Y.

Mentor: Here is another machine. Try to find out what this one does! Give me some numbers.

Student: 3.

Mentor: In comes 3, out goes 6.

Student: It adds 3!

Mentor: Try another number just to check.

Student: 10.

Mentor: In comes 10, out goes 20.

Student: (puzzled) 5.

Mentor: 10.

Student: Aha! I know this one. It is multiplying by 2.

Mentor: Can you make a machine that describes something from your life?

Student: How about one about a price increase. If every price was raised 10%, the machine gives you what you pay extra.

Mentor: Good!

Student: I would like to construct the next machine!

Can you think of some other function machines?


a resource from CSERD, a pathway portal of NSDL NSDL CSERD