What is a relation?
A “relation” is just a relationship between sets of information. For example; think of all the people in one of your classes, and think of their heights. The pairing of names and heights is a relation. The set of all the starting points (input) is called “the domain” and the set of all the ending points (output) is called “the range.”
What is a function?
One way to think of a function is as a machine that you put something into and will get a new result. The thing that you put into the machine is called the input, domain or x. While the result is called the output, range, or y. And the output is related somehow to the input. When it comes to functions we can think about them in many parts but there will always be three different parts; the input, the relationship, and the output.
Even though a function can be thought of like a machine, it really does not have any real life machine parts and nothing that we put into the machine is being destroyed. A function relates an input to an output. But a function has special rules: It must work for every possible input value and it has only one relationship for each input value. A function relates each element (number) of a set with exactly one element (number) of another set. (it can be possibly the same set).
Let’s say there is a tree that grows 20cm every year, so this means that the height of the tree is related to its age using the function h: h(age) = age x 20.
What is the difference between a function and a relation?
Functions are a sub-classification of relations. This means that while all functions can also be called a relation as they pair information, not all relations are functions. Compared to a relation, in a function; given a starting point, we know exactly where to go; given an x, we get only and exactly one y. For a relation to be a function, there must be only and exactly one y that corresponds to a given x.
The “Vertical Line Test”
When you are just looking a set of numbers or a tchart it can be quite easy to spot the numbers from the input that repeat and have a different output. However, when it comes to graphs, it can be more difficult to find out if it is a function or just a relation. A way to find if it is a function or relation is by looking at the given the graph of a relation if you can draw a vertical line that crosses the graph in more than one place, then the relation is not a function.