Mathematical functions are powerful tools for business, engineering and the sciences because they can act as miniature models of real-world phenomena. To understand functions and relations, you need to dig a little into concepts such as sets, ordered pairs and relations. A function is a special kind of relation that has only one y value for a given x value. Other kinds of relations exist that look like functions but don’t meet the strict definition of one.

#### TL;DR (Too Long; Didn't Read)

A relation is a set of numbers organized into pairs. A function is a special kind of relation that has only one y value for a given x value.

## Sets, Ordered Pairs and Relations

To describe relations and functions, it helps to first discuss sets and ordered pairs. Briefly, a set of numbers is a collection of them, typically contained within curly braces, such as {15,1, 2/3} or {0,.22}. Typically, you define a set with a rule, such as all even numbers between 2 and 10, inclusive: {2,4,6,8,10}.

A set can have any number of elements, or none at all, that is, the null set {}. An ordered pair is a group of two numbers enclosed in parentheses, such as (0,1) and (45,-2). For convenience, you can call the first value in an ordered pair the x value, and the second the y value. A relation organizes ordered pairs into a set. For example, the set {(1,0), (1,5), (2,10), (2,15)} is a relation. You can plot the x and y values of a relation on a graph using the x and y axes.

## Relations and Functions

A function is a relation in which any given x value has only one corresponding y value. You might think that with ordered pairs, each x has only one y value anyway. However, in the example of a relation given above, note that the x values 1 and 2 each have two corresponding y values, 0 and 5, and 10 and 15, respectively. This relation is not a function. The rule gives the function relation a definitiveness that otherwise doesn’t exist, in terms of x values. You could ask, when x is 1, what is the y value? For the above relation, the question has no definite answer; it could be 0, 5 or both.

Now examine an example of a relation that’s a true function: {(0,1), (1,5), (2, 4), (3, 6)}. The x values are not repeated anywhere. As another example, look at {(-1,0), (0,5), (1,5), (2,10), (3,10)}. Some y values are repeated, but this doesn’t violate the rule. You can still say that when the value of x is 0, y is definitely 5.

## Graphing Functions: Vertical Line Test

You can tell whether a relation is a function by plotting the numbers on a graph and applying the vertical line test. If no vertical line passing through the graph intersects it at more than one point, the relation is a function.

## Functions as Equations

Writing out a set of ordered pairs as a function makes for an easy example, but quickly becomes tedious when you have more than a few numbers. To address this problem, mathematicians write functions in terms of equations, such as y = x^2 - 2x + 3. Using this compact equation, you can generate as many ordered pairs as you want: Plug in different values for x, do the math, and out come your y values.

## Real-World Uses of Functions

Many functions serve as mathematical models, allowing people to grasp details of phenomena that would otherwise remain mysterious. To take a simple example, the distance equation for a falling object is d = .5 x g x t^2, where t is time in seconds, and g is the acceleration due to gravity. Plug in 9.8 for earth gravity in meters per second squared, and you can find the distance an object dropped at any time value. Note that, for all their usefulness, models have limitations. The example equation works well for dropping a steel ball but not a feather because the air slows the feather down.