Math 1 · Unit 2 · Lesson 1 · part 2 of 8

What a function is

A function is a rule that takes a number in and gives exactly one number back.

What a function is

A function is a rule that takes a number in and gives exactly one number back. That is the whole definition, and every word matters: one input gives one output. Feed in 4, get back one answer. Feed in 4 again tomorrow, get back the very same answer. Never two answers for the same input.

You have already used functions if you have ever used a spreadsheet. Type a number in one cell. In another cell, type a formula that points at the first cell. The formula cell shows exactly one number. Change the input cell, and the formula cell changes to exactly one new number.

Change A1 from 4 to 10 and B1 becomes 17. Change it to −2 and B1 becomes 1. Change it to 2.5 and B1 becomes 5.5. B1 never shows two numbers and never shows nothing. That is a function: one in, one out.

Play with a spreadsheet (5 minutes). Open Google Sheets or Excel.
  1. Click cell A1 and type 4.
  2. Click cell B1 and type =A1+3, then press Enter. B1 shows 7.
  3. Now keep changing A1: try 10, 0, -2, 2.5, 100. Watch B1 every time.
  4. Change the formula. Try =2*A1, then =A1*A1, then =A1/2-1. Each one is a different function. Each one still gives exactly one output for whatever you put in A1.
What is not a functionA rule that can give two answers for one input. Take the rule: a number whose square is the input. Feed in 9, and you could get back 3 or −3. Two outputs for one input, so that rule is not a function. A spreadsheet cell cannot show two numbers, and a function cannot either.

Where to go next