skip to contentstylized crane logoWhite Crane Education

Functions and Relations

Functions and relations both perform the same basic function: They both take the elements of one set and pair them up with the elements of another set. A relation is the more general of the two. Any relationship that pairs up the elements of two sets qualifies. To be a function, a relation has to meet match every element of the first set with exactly one element of the second set.

The most brute force way to define a relation is simply to list the pairs. For example


Establishes a relation between the sets {1, 3, 5, 7} and {-1, 0, 2, 3, 4}. We'll often write the elements of the relation as ordered pairs. For example, this relation could be written {(1, 3), (3, 5), (5, 2), (3, -1), (7, 0)}. In this case, the relation isn't a function because the element 3 in the first set is assigned to two values, -1 and 4, in the second set.


In algebra, our functions are usually given as formulas. For example, f(x) = 3x + 5 establishes a function between the set of real numbers and itself by pairing every number, x, with the number 3x + 5. In this notation, the function is given a name, f, then its variable in parentheses followed by the mathematical formula. The variable list is important. In high school algebra, you rarely see functions with more than one variable but in college level math it can happen. For example, you might have a function defined by f(x, y) = x2 + y2.

The previous method is by far the most commonly used way of defining a function but there is another notation you might run across:

f:x→3x + 5

This is the same function as the one in the previous paragraph. Verbally you can interpret the notation as, "The function f maps x to 3x + 5.