# Functions

### Topics

A **function** is a special kind of relation where each thing in the domain may be paired with only one thing in the range. These guys are all about monogamous relationships.

### Sample Problem

Here's a relation whose domain is {Jane, John, Jill} and whose range is {Home, Store}. Usually we see numbers and variables in equations rather than full-on words, but this will help you visualize how functions work. Plus, you could probably use a change of pace.

We could think of this relation as telling us where each person is:

{(Jane, Home), (John, Home), (Jill, Store)}.

We have a function, since each thing in the domain occurs with only one thing in the range. John could not be at Home and at the Store at the same time, as much as he would like to be. Not enough hours in the day, eh John?

The relation {(Jane, Home), (John, Home), (Jane, Store)}

is *not* a function, because Jane is paired with both Home and Store. Jane can't be in two places at once, and something from the domain of a function can't be paired with two things from the range simultaneously. It's okay for both Jane and John to be at Home, though. Seemingly, they are Home on the range.

### Other Examples

{(1, 2), (3, 2), (4, 2)} is a function. Each number in the domain ({1, 3, 4}) occurs with only one number in the range. It's okay to reuse the 2 from the range, as in the last example where both Jane and John were at Home. There's enough 2 to go around for everybody.

On the other hand, the relation {(1, 2), (1, 3)} is *not* a function, since the number 1 in the domain is being paired with both 2 and 3. Way to follow the rules, 1. Didn't you pay any attention to the previous examples, buddy?

Since functions are relations, we can sometimes describe functions using equations also. This situation is one of the only ones in which something can be sufficiently described using equations. If trying to describe the physical appearance of a suspect to a police officer, stick to English. suspect = beard^{2} – hat will only confuse him.

### More Examples

The equation *y* = *x* + 2 describes a function because, for any value of *x*, there's only one value of *y* that will satisfy this equation. If *y* wasn't around, *x* couldn't get no... satisfaction.

The equation* x *=

*describes a relation that is not a function, because each value of*

*y*^{2}*x*(except 0) can be matched with two values of

*y.*

For example, the ordered pairs (4, 2) and (4, -2) are both in the relation described by the equation *x*= *y*^{2}. This means *x* = 4 is getting matched with both *y* = 2 and *y* = -2, and a function isn't allowed to let such a thing happen. This rule is explicitly stated in the Complete Function Handbook, Rule 14C, so it should know better.