Sets and Notation
Section titled “Sets and Notation”Definition. A set is a collection of objects. The objects in the set are called its elements or members. Order does not matter, and repeating an element does not change the set.
We use capital letters to denote sets, and lowercase elements to denote their elements. The statement means that is an element of . If is not an element of , write . For a finite set, is the number of distinct elements in , also known as the size or cardinality.
Sets ignore both order and repetition. For example,
All three expressions describe the same set because they have exactly the same members. Each set still has cardinality (including the last set).
The empty set, written or , is defined as a set with no elements. A singleton is a set that has exactly one element. If you have nested sets (a set within a set), you count that set as one element. For example,
Note that the second set is not empty (Its one element is (the empty set)) and thus has a cardinality of .
// add the universal set here
There are two common ways to describe a set:
- Roster notation lists the elements: .
- Set-builder notation describes a property the elements satisfy: .
The symbol in set-builder notation means “such that.” The expression before it gives the form of an element, and the condition after it decides whether that element belongs to the set.
Roster notation is most useful when the list is short or follows an unmistakable pattern. Set-builder notation is better when the membership rule is more important than the list itself. For instance,
is the set of all integer divisors of ( means the set of integers). In roster form, the same set is
// this list goes off the page, please change to a smaller number so the list is smaller
// add subset notation somewhere above because you list it below in laters sections but don’t introduce it here
Example. Rewrite using roster notation.
The integers whose squares are less than are . Therefore,
Important number sets
Section titled “Important number sets”In set theory, we use many standard number systems.
and
They satisfy
Definition. A set is well-defined if every object either belongs to the set or does not belong to it, but not both.
The definition basically means that a well-defined set is very precise so that the values in the set can be determined with no ambiguity, regardless of how difficult it is to actual list out all of the values in the set. The set of prime numbers larger than one million is well-defined; the set of “large numbers” is not unless large is given a precise meaning.
There is also a difference between a difficult membership test and a flawed definition. Consider
For a very long value of , checking membership may be practically impossible. Still, that string either appears or does not appear, so the set is well-defined. By contrast,
is ambiguous unless a particular representation is specified. The same rational number has many denominators:
The description would place both outside and inside depending on how it is written. Requiring lowest terms with a positive denominator would make the condition precise.
Logic and Quantifiers
Section titled “Logic and Quantifiers”Set-builder notation and proofs both rely on statements that can be true or false.
Definition. A proposition is a declarative statement with exactly one truth value: true or false.
For propositions and , the main logical operations are:
| Operation | Notation | Meaning |
|---|---|---|
| Negation | not | |
| Conjunction | and | |
| Disjunction | or , inclusively | |
| Conditional | if , then | |
| Biconditional | if and only if |
A conditional is false only when its hypothesis is true and its conclusion is false. In particular, if is false, then is true regardless of ; this is called vacuous truth.
One way to understand this is to treat a conditional as a promise: “whenever happens, happens.” The promise is broken only if happens without . If never happens, there is no counterexample to the promise. This convention is what makes statements such as
true for every set . There is no element of that could violate the implication, so for every set .
When doing logic problems, we often write out the statements using a truth table:
| T | T | T | T | T | T |
| T | F | F | T | F | F |
| F | T | F | T | T | F |
| F | F | F | F | T | T |
Here, “or” is inclusive: is true when one statement is true or when both are true.
The statement is the converse of . The statement is its inverse. Neither is automatically equivalent to the original conditional. The contrapositive, , is equivalent.
Example. Let be the statement “an integer is divisible by ” and let be the statement “the integer is even.” Write the conditional, converse, inverse, and contrapositive, and decide which are true.
The original conditional is
This is true. Its contrapositive is also true:
The converse says that every even integer is divisible by , which is false because is even but not divisible by . The inverse is false for the same reason: is not divisible by , but it is even.
The symbol means “for every,” while means “there exists.” If is a property of elements in a domain , then
claims that every element of has the property, while
claims that at least one does.
The order of quantifiers changes the meaning. Compare
with
The first statement is true: after is chosen, take . The second is false because it asks for one fixed number that cancels every real number at once. In the first statement, may depend on ; in the second, it may not.
// put this notation in the first section (the notation of “for every”, “there exists”)
Negating a quantified statement switches the quantifier:
Example. Negate the statement “every real number has a real square root.”
Write the statement as
Switch each quantifier and negate the final property:
In words, “there is a real number that is not the square of any real number.” This negation is true; is a counterexample to the original statement.
Set Operations
Section titled “Set Operations”Let and be subsets of a universal set .
Definition. The main set operations are
and the symmetric difference
The union contains elements in at least one set. The intersection contains elements shared by both. The symmetric difference contains elements in exactly one of the two sets.
// put this in the first section
// add a better intro after moving the set operations
These operations are set versions of the logical operations above. Membership in a union uses “or,” membership in an intersection uses “and,” and membership in a complement uses “not”:
This translation is why logical identities turn into set identities. De Morgan’s law for propositions and De Morgan’s law for sets are the same pattern written in two languages.
The set difference contains the elements of that are not in :
Unlike union and intersection, set difference is not symmetric. Usually,
Example. Let , , and . Find , , , and .
Combining all distinct elements gives
The shared elements are
The elements of the universe outside are
Finally, the elements belonging to exactly one set are
Cartesian products
Section titled “Cartesian products”An element of is an ordered pair, so position matters. If
then
The first coordinate must come from and the second from . Consequently, and usually contain different objects. For finite sets,
because each of the choices for the first coordinate can be paired with each of the choices for the second.
Cartesian products become important immediately in linear algebra. For example,
is the set of all ordered pairs , while is the set of all ordered triples. A point, a vector, and a list of coordinates can all be viewed as elements of a Cartesian product.
Relations Between Sets
Section titled “Relations Between Sets”Definition. The set is a subset of , written , if every element of is also an element of :
If and , then is a proper subset of , written .
Membership and containment are different kinds of statements. If
then , but makes no sense unless has separately been defined as a set. On the other hand, , but because the members of are numbers, not singleton sets.
A superset statement reverses the same relationship:
Containment is transitive. If every element of lies in and every element of lies in , then every element of must lie in .
Proof (Transitivity of subsets). Suppose and . Let . Since , we have . Since , this gives . Therefore, every element of belongs to , so
Set equality is proved by mutual containment:
Proof (De Morgan’s Law for sets). We prove
Let . Then , so is not in and is not in . Therefore, , which proves
Conversely, let . Then and , so . Thus, , proving the reverse containment. Therefore,
Proof (Cartesian product distributes over union). We prove
Let . Then and . The first statement means or . Therefore, either or , so
This proves the forward containment. For the reverse, let
Then lies in at least one of the two products. In either case, and . Hence, . The two containments prove the sets are equal.
Proof (Symmetric difference detects equality). We prove that
Suppose . If some element belonged to but not , or to but not , it would belong to the symmetric difference. Since the symmetric difference is empty, neither kind of mismatch exists. Thus, and have exactly the same elements, so .
Conversely, if , no element can belong to exactly one of the sets. Therefore, their symmetric difference has no elements:
Proof (A set described by squares). Let
and
We prove . If , then , so and . Hence, , and therefore .
If , then for some real number . Every real square is nonnegative, so and . Therefore, , and .
Common Sets in Linear Algebra
Section titled “Common Sets in Linear Algebra”The objects studied in linear algebra are often collected into sets of their own. If is a set of allowed coefficients, then
is the set of polynomials with coefficients in . The notation
restricts the degree.
The set of all matrices with entries in is
When , this is often shortened to .
Another useful example is
These examples look different, but each is still just a set: membership is determined by a precise rule.
Example. Decide which of the following objects belong to :
The matrix has two rows, three columns, and only real entries, so
The matrix has the wrong shape: it is . The matrix has the correct shape, but . Therefore,
This example shows how a complicated-looking set-builder definition becomes a checklist for membership: check the dimensions, then check every entry.
Proof Methods
Section titled “Proof Methods”A proof is not just a calculation that ends at the right formula. It is a chain of statements in which each step follows from a definition, an assumption, or an earlier result. The form of the claim usually suggests the proof method.
- For a universal statement, begin with an arbitrary object satisfying the hypothesis.
- For an existence statement, construct one object and verify it works.
- For a set equality, prove both containments.
- For an implication, try a direct proof or its contrapositive.
- If the negation forces an impossibility, use contradiction.
- If the statement is indexed by natural numbers, induction may connect one case to the next.
Direct proof and contrapositive
Section titled “Direct proof and contrapositive”A direct proof of assumes and logically derives . A contrapositive proof instead assumes and derives .
The contrapositive is useful when the conclusion contains a condition that is easier to negate. For example, it is awkward to prove directly that even implies even. Its contrapositive says that if is odd, then is odd, which follows immediately by writing .
Proof (Divisibility of ). Let . Factor
These are three consecutive integers. At least one is even, so their product is divisible by . One of every three consecutive integers is divisible by , so the product is also divisible by . Since and are relatively prime,
Proof by contradiction
Section titled “Proof by contradiction”To prove a statement by contradiction, assume the statement is false and derive an impossibility.
Proof (There are infinitely many primes). Suppose there were only finitely many primes, listed as
Consider
No listed prime divides , because division by any leaves remainder . But every integer greater than is prime or has a prime factor. Therefore, has a prime factor not in the supposedly complete list, a contradiction. Thus, there are infinitely many primes.
Mathematical induction
Section titled “Mathematical induction”Induction proves a statement for every natural number from a starting value onward.
- Prove the base case.
- Assume is true for an arbitrary allowed .
- Use that assumption to prove .
The key is that the inductive hypothesis is not a guess that every case is true. It temporarily grants one case, , so that the proof can establish the link
The base case starts the chain. The inductive step then carries truth from the base case to the next case, and from there to every later case. Without the base case, the implication alone proves nothing: a row of standing dominoes never falls unless the first one is pushed.
Proof (Sum of the first squares). We prove
for every . For , both sides equal .
Assume the formula holds for some . Then
Factor and simplify:
This is exactly the claimed formula with . Therefore, the formula holds for all .
Strong induction
Section titled “Strong induction”In strong induction, the inductive hypothesis assumes all earlier cases through :
The goal is still to prove . Strong induction is useful when the next case depends on more than one earlier case, or when it breaks into a smaller value that may not be exactly .
Proof (Prime factorization exists). We prove that every integer is prime or can be written as a product of primes.
The base case is prime. Now assume every integer from through is prime or a product of primes. Consider .
If is prime, the claim is already true. If it is composite, then
for integers satisfying
By the strong inductive hypothesis, each of and is prime or a product of primes. Multiplying those factorizations gives a prime factorization of . Therefore, every integer is prime or a product of primes.