Please enable scripting (or JavaScript) in your web browser, and then reload this page.
A set is a collection of numbers or other mathematical objects, without repetitions. Any set of points in a table or on a graph is called a relation. Some relations are functions. In this lesson you will learn the difference between relations and functions. You will also learn about the domain and range of relations and functions.
A set is a collection of numbers or other mathematical objects, each of which occurs only once. We write sets using curly braces. For example, $\{2, 3, 4\}$ is the set which contains the numbers 2, 3, and 4.
You can list a set’s elements in any order. For example, $\{1, 3, 5\}$ and $\{5, 1, 3\}$ are the same set.
Sometimes, instead of listing everything contained in a set, we want to give some condition that the numbers in the set have to satisfy. For example, we might want to talk about the set of all positive numbers (numbers greater than zero). The notation for this is $\{x: x > 0\}$, which you should read as “the set of all $x$ such that $x$ is greater than 0” or “the set of all $x$ which are greater than 0.”
A relation is a set of ordered pairs $(x,y)$. If $x$ and $y$ are numbers, we can think of the ordered pair $(x,y)$ as the coordinates of a point in the plane, and a relation as a set of points in the plane.
We can also think of a relation as a two column “lookup table” of rows $(x,y)$, which takes inputs to outputs. Given an input $x$, you “look up” that value in the first column of the table, and any matching row gives an output $y$ in the second column. The set of inputs ($x$-values) of a relation is called the domain of the relation. The set of the outputs ($y$-values) of a relation is called the range of the relation.
Sometimes instead of a table you have to look at a graph to find the domain and range of a relation. Look at the grid to the left. This time the graph is not just a few points, but the collection of points that make the red curve.
Click or tap inside the grid and drag the vertical bar. You see that the curve goes from $x=-2$ to $x=4$. So the domain of this relation is $\{x:-2≤x≤4\}$. Within that domain, the curve goes from $y=-1$ to $y=2$. What is the range of this relation?
Range:
Click and find the domain and range of this new relation using its graph.
Look at the graph of $y=x^2$. It seems that the curve goes from $x=-3$ to $x=3$. Click or tap inside the grid and drag the vertical bar to $x=4$. To the right of the grid you see that $y=16$, so even though we can’t see it on this grid, there is a point on the graph with $x$-coordinate 4.
What is the range of this relation?
A relation is called a function if there is exactly one output ($y$-value) for each input ($x$-value). If a relation has two or more outputs for a single input, it is not a function. For the two relations shown below, the one on the right isn’t a function because there are two outputs for each input greater than 0. The relation on the left is a function.
A relation is graphed on the grid to the left. The trace (vertical bar) is currently at $x=3$, allowing you to see that the point $(3,0)$ is on the graph.
What is the domain of this relation?
Domain:
The domain of this relation is all real numbers. What is its range?
Click . Use the vertical bar in the grid to decide if the relation is a function and to help find its domain and range.