How to Determine Whether the Relation is a Function

••• vtmila/iStock/GettyImages

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:

f(x) = 2x \\ \,\\ g(y) = y^2 + 2y + 1 \\ \,\\ p(m) = \frac{1}{\sqrt{m - 3}}

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

f(x) = \frac{1}{2-x}

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

\frac{1}{4 - x^2}

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, ​x2 + ​y2 = ​a2 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?

y = 2x +1

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

y^2 = x + 1

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

y^3 = x^2

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

y^2 = x^2

Because ​y​ = ±√​x2, this ​IS NOT​ a function.


About the Author

Chris Deziel holds a Bachelor's degree in physics and a Master's degree in Humanities, He has taught science, math and English at the university level, both in his native Canada and in Japan. He began writing online in 2010, offering information in scientific, cultural and practical topics. His writing covers science, math and home improvement and design, as well as religion and the oriental healing arts.