In mathematics, a function is a rule that relates every element in one set, called the domain, to exactly one element in another set, called the range. On an *x*-*y* axis, the domain is represented on the *x*-axis (horizontal axis) and the domain on the *y*-axis (vertical axis). A rule that relates one element in the domain to more than one element in the range is not a function. This requirement means that, if you graph a function, you cannot find a vertical line that crosses the graph in more than one place.

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

A relation is a function only if it relates each element in its domain to only one element in the range. When you graph a function, a vertical line will intersect it at only one point.

## Mathematical Representation

Mathematicians usually represent functions by the letters "*f*(*x*)," although any other letters work just as well. You read the letters as "*f* of *x*." If you choose to represent the function as *g*(*y*), you would read it as "*g* of *y*." The equation for the function defines the rule by which the input value *x* is transformed into another number. There are an infinite number of ways to do this. Here are three examples:

## Determining the Domain

The set of numbers for which the function "works" is the domain. This can be all numbers, or it can be a specific set of numbers. The domain can also be all numbers except one or two for which the function doesn't work. For example, the domain for the function

is all numbers except 2, because when you input two, the denominator is 0, and the result is undefined. The domain for

on the other hand, is all numbers except +2 and −2 because the square of both of these numbers is 4.

You can also identify the domain of a function by looking at its graph. Starting at the extreme left and moving to the right, draw vertical lines through the *x*-axis. The domain is all the values of *x* for which the line intersects the graph.

## When Is a Relation Not a Function?

By definition, a function relates each element in the domain to only one element in the range. This means that each vertical line you draw through the *x*-axis can intersect the function at only one point. This works for all linear equations and higher-power equations in which only the x term is raised to an exponent. It doesn't always work for equations in which both the *x* and *y* terms are raised to a power. For example, *x*^{2} + *y*^{2} = *a*^{2} defines a circle. A vertical line can intersect a circle at more than one point, so this equation is not a function.

In general, a relationship *f*(*x*) = *y* is a function only if, for each value of *x* that you plug into it, you get only one value for *y*. Sometimes the only way to tell if a given relationship is a function or not is to try various values for x to see if they yield unique values for *y*.

Examples: **Do the following equations define functions?**

This is the equation of a straight line with slope 2 and *y*-intercept 1, so it **IS** a function.

Let *x* = 3. The value for y can then be ±2, so this **IS NOT** a function.

No matter what value we set for *x*, we'll get only one value for *y*, so this **IS** a function.

Because *y* = ±√*x*^{2}, this **IS NOT** a function.