Before studying vectors, we need some language for describing collections of objects. This foundation will be helpful both in Math 124 and in your future engineering coursework (and life beyond Michigan!).
We can also form sets of non-numerical objects, such as
B={red,green,blue}.
Here, we’ve seen a set of numbers and another set of colors; in this course, we may work with sets of numbers, points, vectors, and matrices.
In the definition of a set above, we said a set must be “well-defined” and contain “distinct” objects. What do these terms mean?
By well-defined, it means that there should be a clear way to check whether any object is in the set. If an object x belongs to a set S, we write x∈S. If it does not, we write x∈/S. For instance, blue∈B and maize∈B.
By distinct, we mean that sets do not contain duplicates. {2,2,4,6,6} is not a valid set. They also do not keep track of order:
Defining a set by listing every one of its elements called enumerative notation. Sometimes, we use ellipses (...) as a shortcut to writing out many elements, but it is only good practice to do this when it is clear what replaces the .... For example,
{2,4,6,8,...,20}
is clearly the set containing all multiples of 2, starting with 2 and ending with 20. This is still considered enumerative notation. {2,3,5,...,10} is more ambiguous. Try your best to avoid writing ambiguous statements – math is meant to be precise!
Often, enumerative notation is impractical, especially for sets with infinitely many elements. Set-builder notation describes a set by stating a rule that all of its elements follow. Recall, we earlier defined the set A={2,4,6,8}. Now consider the set
C={6,12,18,24}.
The elements of C are just the elements of A, each multiplied by 3. Using set-builder notation,
C={3x:x∈A}.
The expression to the left of the colon describes what goes into the set; the condition to the right describes which values are allowed. (If you’re familiar with programming in Python – which you’re not expected to be! – this resembles the syntax for list comprehension. Don’t worry if this doesn’t mean anything to you.)
The general pattern for set-builder notation is
{what goes in the set:condition}.
Here are several other examples.
Using the same example set C from above,
{x:x∈C,x>10}
is the set of elements of C that are greater than 10. This is the new set {12,18,24}. The comma (,) after the colon in the notation means “and”.
The set {10,20,30,...,100} can be expressed in set-builder notation as
{10x:x∈Z,1≤x≤10}.
Z is the set of all integers; we will discuss the set of integers (and other number sets) more in Chapter 1.3.
The set
{x:x∈Z,x≥0}
is the set of all non-negative integers.
The set
{(x,y):x2+y2=16,x∈R,y∈R}
is the set of all points on the circle with radius 4 centered at (0,0). R refers to the set of real numbers, which again will be discussed in Chapter 1.3. For now, think of the real numbers as the set of all numbers that exist on a number line.
You’ll notice that in many of these examples, the item before the colon : was simply x, and following the colon were multiple conditions on x, one of which was the set we were selecting elements from to create our new set (e.g. C, Z, or R). There is a shorter notation that is often used for sets like these. Here are a few examples.
Long-form
Shortform
{x:x∈C,x>10}
{x∈C:x>10}
{x:x∈Z,x≥0}
{x∈Z:x≥0}
{(x,y):x2+y2=16,x∈R,y∈R}
{(x,y)∈R2:x2+y2=16}
In the final example, R2 is the set of all points in two-dimensional space.
The shortform notation is very common. To summarize, the two key forms you may see are:
{f(x):conditions on x} (this is the first form we introduced above).
To give you a sense of how this relates to the ideas in Chapter 1.1, soon we’ll describe lines and planes as sets of points. The intersection of two lines, then, can be viewed as the intersection of two sets!
Repetition does not affect cardinality, because sets do not store duplicates!
∣{1,1,2,2,2,12,−3,−3,9}∣=5.
For now, we’ll only consider the cardinality of finite sets. Sets with infinitely many elements, like the set of integers Z, do have some well-defined notion of cardinality, but we will save that discussion for a future theoretical mathematics or computer science course.
Given that we just discussed the union and intersection of two sets, a natural question is how ∣A∪B∣ and ∣A∩B∣ relate to ∣A∣ and ∣B∣.
As a thought experiment, suppose A and B are two non-empty sets, and you are given that ∣A∪B∣=∣A∣+∣B∣. What does this tell you about A and B? (Pause and think for a moment before scrolling further.)
If ∣A∪B∣=∣A∣+∣B∣, it means that there are no overlapping elements between A and B! If there were overlapping elements, they each would have been counted for twice: once in ∣A∣ and once in ∣B∣. But, since sets do not have duplicates, this would have overcounted those overlapping elements in ∣A∪B∣. Thus, if ∣A∪B∣=∣A∣+∣B∣, A and B are disjoint.
In the general case, when A and B are not necessarily disjoint, the principle of inclusion-exclusion tells us how to find ∣A∪B∣, the number of elements in the union of A and B:
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣.
Returning to our earlier example, if A={1,5,7} and B={2,3,7,8}, then
∣A∪B∣=3+4−1=6.
This formula is more useful in cases where the sets are much larger and we can’t eyeball their intersections and unions.
How does this extend to three sets?
Like before, we subtract all pairwise overlaps, but then elements in all three sets have been removed too many times, so we add the triple overlap back once.