What’s a Relation? What’s a function? A relation is a way that two objects relate.

Here are a few relations you may have seen:

- = means ” this is the same as that”.
- > means “this is greater than that”.
- < means ” this is the less than that”.

If we have an equation. Like Y = X squared.

That is a relation. But it is also a function

If we had another relation, like y squared = x squared.Would it be a relation? Yes, it would be. It would not be a function.

How do you tell what’s the relation and what’s a function? That’s where the vertical line test can help you out.

The vertical line test is when. You imagine scanning the function with a vertical line. And if ever the vertical line passes through the function twice then the function has two Y values for one X value. Since functions are 1-1 mappings of x-values to y-values then it is not a function.

The vertical line test is a simple test that will tell you. By looking at the graph if something is a function.

To recap a function is a relation, but a relation is not always a function.

A relation is like a function with less restrictions. And the restriction is that a function can only have a one to one mapping of X values to Y values.

Analogy to a vending machine

Think of a function, like a vending machine. If you press Pepsi and do you get Pepsi? Then it’s a function. If you press Pepsi and you get Pepsi and Coke. Then it’s not a function. Because there should only be a one-to-one mapping from a button to a drink.

So that is the difference between functions and relations, and how to use the vertical line test.