A class list pairs every student with a date of birth. Two students may share a birthday, but no student has two. That one-sided rule is exactly what separates a function from any other way of pairing things, and on a graph you can see it with a single vertical line.
Key terms
Ordered pair
Definition An ordered pair consists of a first coordinate and a second coordinate , in that order. Two ordered pairs are equal exactly when their first coordinates are equal and their second coordinates are equal,
The same notation is also used for an open interval. The context tells which one is meant.
In plain words In a pair, order matters. The pair and the pair are different, while the sets and are the same.
Example Suppose . Comparing first coordinates gives , and comparing second coordinates gives . So and .
Coordinate plane
Definition The coordinate plane is a plane with two perpendicular real number lines, the horizontal -axis and the vertical -axis, which cross at their common zero point, the origin. Positive numbers lie to the right on the -axis and upward on the -axis. Each point is matched with exactly one ordered pair of real numbers, and each ordered pair of real numbers with exactly one point. The number is where the vertical line through crosses the -axis, and is where the horizontal line through crosses the -axis. In this way the plane is identified with the set
The axes split the rest of the plane into four quadrants, numbered I to IV counterclockwise starting at the upper right. Points on an axis belong to no quadrant.
| Quadrant | Sign of | Sign of |
|---|---|---|
| I | positive | positive |
| II | negative | positive |
| III | negative | negative |
| IV | positive | negative |
In plain words The first coordinate says how far to go right or left from the origin, and the second says how far to go up or down.
Example To plot , start at the origin, move 3 units right and then 2 units down. The point lies in quadrant IV. The point lies in quadrant II, so swapping the coordinates moved the point somewhere else entirely. The point lies on the -axis and in no quadrant.
Relation
Definition For sets and , write for the set of all ordered pairs with first coordinate in and second coordinate in ,
A relation from to is any subset of . When , we say that is related to . A relation between real numbers is a set of ordered pairs of real numbers, and its graph is the set of all points in the coordinate plane with those coordinates.
In plain words A relation is a collection of pairs that says which first items go with which second items. Any collection of pairs counts, with no further conditions.
Example Let and . The set is a relation from to . In it, is related to two elements and to none. An equation can define a relation too. The pairs of real numbers with form a relation whose graph is the circle of radius centered at the origin. It contains , and .
Function
Definition A function from a set to a set , written , is a relation from to in which every element of is the first coordinate of exactly one ordered pair in . If , then is called the value of at .
“Exactly one” contains two requirements. Every element of has at least one partner, and no element of has two different partners. When no sets and are named, a set of ordered pairs is simply called a function if no first coordinate appears in two pairs with different second coordinates. It is then a function from the set of its first coordinates.
In plain words A function gives each allowed input one and only one output.
Example Again let and . The set
is a function from to , since , and each appear exactly once as a first coordinate. The relation from the previous section is not a function from to , because has two partners and has none.
Domain
Definition The domain of a relation is the set of all first coordinates of its pairs. For a function the domain is the whole set , and every element of the domain has exactly one value. The set of all values is the range of , which has a lesson of its own. When a function of real numbers is given by a formula and no domain is stated, the domain is the set of all real numbers for which the formula gives a real number, called the natural domain.
In plain words The domain is the set of inputs the function accepts, and the function must have an answer for every one of them.
Example The function has domain and range . The pairs with form a function with domain . No pair starts with , because is not a real number.
Inputs, outputs and variables
Definition For a function , an input is an element of the domain, and the output for is the unique with . Suppose a function is described by an equation solved for , such as , which gives exactly one for each allowed . Then is called the independent variable, since it can take any value in the domain, and is called the dependent variable, since its value is determined by . The graph of the function is the set of all points where is the output for , with the independent variable on the horizontal axis.
In plain words You choose the input, and the function decides the output. The independent variable is the one you are free to choose.
Example A square with side length centimeters has area
Here is the independent variable and is the dependent one. The input gives the output , so the pair is on the graph. Only positive side lengths make sense for a real square, so in this situation the domain is .
Mapping diagram
Definition A mapping diagram of a relation from a finite set to a finite set lists the elements of in one column and the elements of in a second column, and draws an arrow from to for each pair in the relation. The relation is a function from to exactly when every element of has exactly one arrow leaving it. Elements of may receive any number of arrows, including none.
In plain words Count the arrows leaving each input. One arrow from every input means a function, whatever happens on the output side.
Example Take , and the relation . Its arrows are
Each input has exactly one arrow, so this is a function. The output receives two arrows and receives none, and both are allowed. Adding the pair would give a second arrow, and the relation would no longer be a function.
Vertical line test
Definition A set of points in the coordinate plane is the graph of a function of exactly when every vertical line meets in at most one point. In that case the domain of the function is the set of all numbers for which the vertical line meets . The reason is that the points of on the line are exactly the pairs in with first coordinate .
In plain words Slide a vertical line across the graph. If it ever hits the graph twice, some input has two outputs, and the graph does not belong to a function.
Example On the circle , the vertical line meets the points and , since . So the circle is not the graph of a function of . On the parabola , the line meets only the point , so the parabola passes. The upper half of the circle, given by
also passes, and its domain is . A sketch only shows part of a graph, so for a graph given by an equation, check the test with algebra as done here.
Many-to-one versus one-to-many
Definition A relation is many-to-one when at least two different first coordinates share the same second coordinate. It is one-to-many when at least one first coordinate is paired with two or more different second coordinates. A function may be many-to-one, but a function is never one-to-many, since that would give an input two outputs. A function in which different inputs always have different outputs is called one-to-one.
In plain words Many inputs sharing one output is fine for a function. One input with many outputs is not.
Example The function is many-to-one, because the inputs and both give the output . The relation is one-to-many, because the input is paired with both and . So does not define as a function of . Read the other way, with as the input, the same equation does define as a function of .
Check yourself
- Is a function? Give its domain and say whether it is many-to-one, one-to-many or neither.
Show the answer
Yes. Each of , and appears exactly once as a first coordinate, so it is a function with domain . It is many-to-one, since the inputs and share the output .
- Does the equation define as a function of ?
Show the answer
No. For the equation becomes , so both and work. The vertical line meets the graph at and .
- For which real numbers is a function?
Show the answer
For every real except and . If , the input has the two outputs and . If , the input has the two outputs and . Any other is a new input with a single output.