Study Guide

Functions - Sets, Functions, and Relations

Advertisement - Guide continues below

Sets, Functions, and Relations

"Sets, relations, and functions" doesn't have quite the same ring as "lions, tigers, and bears" (oh my!), but they can seem equally intimidating at times. Except for the fact that they're math concepts, not large animal predators, and you're not in danger of losing a hand if you try to reach out and pet one.


  • Sets

    A set is a collection of things. This sentence is a set of words. This paragraph is a set of sentences. This explanation is a set of excessive examples.

    To write down a set, we make a list of the things in that set separated by commas. Around the outside we draw "curly brackets.''

    For example, {1, 2, 3} is a set.

    Curly brackets may take a bit of practice to draw. It's no recreating the Mona Lisa, but it is a character you likely aren't used to scripting, so don't feel badly if your first few attempts look more like a backwards 3, or an eagle with a clipped wing. It might help to think of the top half of the bracket as a funny-shaped letter s. This bracket is called the left or opening bracket:


    The other one is the right or closing bracket:


    In order to have a set, we must have both an opening bracket and a closing bracket, just as every sentence has to start with a capital letter and end with some sort of punctuation. Them's the rules.

    Something like 3, 6, 9 is not a set, because there's no opening bracket. In fact, this is mathematical gibberish. Mathematical gibberish is just like gibberish in English, only more number-y.

    Mathematicians call the things in a set elements, which are not the same things as the items on a Periodic Table of Elements. They call them elements because they're the things from which we build everything else. Two sets are equal if they have the same elements. You don't even have to treat them like separate individuals. They're totally cool with it.

    Since two sets have the same elements,

    {1, 2, 3} = {2, 3, 1}.

    Because two sets are the same if they contain the same elements, something horrible like

    {1, 1, 2, 2, 3, 3, 3, 3}

    is actually the same as the set

    {1, 2, 3}.

    To write a set, we include each element only once. That first set we looked at went crazy on the duplication. If someone asks you to name all the state capitals, there's no sense in naming Santa Fe seven times, even if it is a lovely place.

    Also, the order in which we write the things in a set doesn't matter. Since they have the same elements,

    {4, 5, 6} = {6, 4, 5}.

    We can write the elements in any order, so long as we include all of them. They've gotten used to sticking together, so it would be a crime to break them up now.

    The things in a set don't have to be numbers. We could have a set with sets in it, Inception-style:

    {1, 2, 3, {4}, {1, 2, 5}}

    Or we could have a set with letters in it:

    {a, b, c}

    We could also have a set with nothing at all in it:

    { }

    Boy, that's depressing. No one wants to be in this set? Seriously, anyone? It's very spacious and utilities are included.

    The set with no things at all is called the empty set. So creative. It's a bit like naming your cat "Cat, " isn't it? There's a special symbol for this set, which looks like a zero with a slash through it, or an out-of-control, backwards Q:

    ∅ = { }

    Sets can be finite or infinite. One way to show that a set is infinite is to write down some of the things in the set, and then write dots to show that there are more things in the set:

    . . .

    You should be used to writing dots like these. You already use them in text messages when you can't think of a good way to wrap up your thoughts...

    For example, we can write the infinite set of all natural numbers like this:

    {1, 2, 3, . . .}

    The dots mean that the pattern is continuing forever. That makes us feel, that makes us feel, that makes us feel like a natural number.

  • Relations

    An ordered pair is a pair of things, but in this case we actually care which is first and which is second. You know what they say about second place: first loser.

    To write an ordered pair, we write down the two things separated by a comma, then put parentheses around the lot. Not curly brackets, mind you. We're back to parentheses now. This may seem confusing, but at least we haven't thrown straight brackets into the mix as well. Yet.

    Sample Problems

    Here's an ordered pair: (2, 3). The first thing is 2 and the second thing is 3.

    Similarly, (a, b) is also an ordered pair. The first thing is a and the second thing is b. Hey, just like in the alphabet!

    A relation is a set of ordered pairs. A relation can be finite or infinite. However, infinite relations are in complete denial. If you were to ask one of them, "How are you doing?" they would probably answer, "I'm finite."

    Even More Sample Problems

    The set {(1, 10), (9, 11)} is a relation. This is a set containing two ordered pairs.

    The set {(1, 2), (2, 4), (3, 6). . .} is an infinite relation. The relation contains infinitely many pairs, thanks to those repeating dots.

    The set {(1, 1), (1, 2), (1, 3), . . .} is an infinite relation.

    But check this out: {(2, 3), (3, 4), 5, (2, 1)} is not a relation. This set contains the element 5, which isn't an ordered pair. If you wanted to sneak into this group, 5, couldn't you have at least worn some parentheses to try to blend in? Where's the effort?

    The empty set ∅ may also be considered a relation: the empty relation. We're not sure, but we have a feeling this would have been Jean-Paul Sartre's favorite relation.

    The domain of a relation is the set whose elements are the first things from each of the relation's ordered pairs. We admit that's a little wordy, so we'll do what we do best: say it with numbers. Here's an example, coming at ya...

    Sample Problems

    The domain of the relation {(1, 10), (9, 11)} is the set {1, 9}.

    Got it? We pulled the first element from the first set and the first element from the second set. If it helps, think of the "main" part of "domain": we pull the "main," or "first," parts out of our ordered pairs. It would be helpful if the word was "dofirst," but unfortunately we don't live in a perfect world.

    The range of a relation is the set consisting of the second things from the relation's ordered pairs. Makes sense.

    Sample Problems

    The range of the relation {(1, 10), (9, 11)} is {10, 11}.

    If the "main" trick isn't doing it for you, try thinking that "d'' for domain comes before "r'' for range in the alphabet. The domain is the set of first things from the ordered pairs, and the range is the set of second things. Hopefully the alphabet doesn't still give you fits.

    Sometimes we can use an equation to express the connection between the first and second things in the ordered pairs of a relation. This is good news, as you've probably been going through equation withdrawal during the early part of this unit.

    In the relation {(1, 2), (2, 3), (3, 4), . . . }, we can see that, in each ordered pair, the second number is one greater than the first number. Pattern alert, people. We could express this connection by saying:

    (second number) = (first number) + 1

    However, you know how much we hate to use big long words or phrases in equations. It cramps our style. In symbols, we could express the connection by saying that x is the first thing in the ordered pair, y is the second thing in the ordered pair, and then writing an equation involving x and y:

    y = x + 1

    Since x comes before y in the alphabet, x corresponds to the first thing in the ordered pair, and y corresponds to the second thing in the ordered pair.

    first thingsecond thing
    in Domainin Range

    This is easy to remember, because there's an x in "domain" and a y in "range." Shhh. Humor us just this once.

    Sample Problems

    Write an equation that expresses the connection between x and y in the following relation:

    {(1, 1) , (2, 4), (3, 9), (4, 16)}

    As we already established, x refers to the first number in each ordered pair and y refers to the second number in each ordered pair. Since the second number in each pair is the square of the first, the equation we're looking for is:

    y = x2

    You didn't think squares and square roots were going away anytime soon, did you? They're here to stay, we're afraid. Like that guy our mom has been seeing who thinks everything he says is hilarious. We're referring, of course, to our dad.

    Sample Problems

    Write an equation that expresses the connection between x and y in the following relation:

    {(-1, 1), (-2, 4), (-3, 9), (-4, 16)}

    The equation we're looking for is the same as in the last example:

    y = x2

    As we can see from this example, it's possible to have two relations where the connection between x and y is described by the same equation, but where the two relations aren't the same. We can imagine how that might get confusing or misleading, but mathematicians wouldn't have decided to express things this way if there wasn't a good reason for it. They're very calculating. Literally.

    It's also possible to go from an equation to a relation. However, when we do this we have to specify which pairs in the relation we want. If we don't specify, then we get all the pairs that could possibly work. We're all for getting free swag, but only the pairs we need here will be just fine.

  • Functions

    A function is a special kind of relation where each thing in the domain can be paired with only one thing in the range. These guys are all about monogamous relationships.

    Sample Problem

    Say we've got a relation whose domain is {Jane, John, Jill} and whose range is {Home, Store}. Usually we see numbers and variables in equations rather than full-on words, but this will help you visualize how functions work. Plus, you could probably use a change of pace.

    We could think of this relation as telling us where each person is:

    {(Jane, Home), (John, Home), (Jill, Store)}

    We have a function, since each thing in the domain occurs with only one thing in the range. John couldn't be at Home and at the Store at the same time, as much as he would like to be. Not enough hours in the day, eh John?

    The relation {(Jane, Home), (John, Home), (Jane, Store)} is not a function, because Jane is paired with both Home and Store. Jane can't be in two places at once, and something from the domain of a function can't be paired with two things from the range simultaneously. It's okay for both Jane and John to be at Home, though. Looks like they're Home on the range.

    Other Examples

    The relation {(1, 2), (3, 2), (4, 2)} is a function. Each number in the domain ({1, 3, 4}) occurs with only one number in the range. It's okay to reuse the 2 from the range, as in the last example where both Jane and John were at Home. There's enough 2 to go around for everybody.

    On the other hand, the relation {(1, 2), (1, 3)} is not a function, since the number 1 in the domain is being paired with both 2 and 3. Way to follow the rules, 1. Didn't you pay any attention to the previous examples, buddy?

    Since functions are relations, we can sometimes describe functions using equations, too. This situation is one of the only ones in which something can be sufficiently described using equations. If you're trying to describe the physical appearance of a suspect to a police officer, stick to English. Suspect = beard2 – hat will only confuse him.

    More Examples

    The equation y = x + 2 describes a function because, for any value of x, there's only one value of y that will satisfy this equation. If y wasn't around, x couldn't get no...satisfaction.

    The equation x = y2 describes a relation that's not a function, because each value of x (except 0) can be matched with two values of y (negative and positive).

    For example, the ordered pairs (4, 2) and (4, -2) are both in the relation described by the equation = y2. This means x = 4 is getting matched with both y = 2 and y = -2, and a function isn't allowed to let such a thing happen. This rule is explicitly stated in the Complete Function Handbook, Rule 14C, so it should know better.

This is a premium product

Tired of ads?

Join today and never see them again.

Please Wait...