0.3  Sets

Every object in linear algebra is a set with some extra structure. A vector space is a set on which we can add and scale, a subspace is a subset of it, and a linear map sends elements of one set to elements of another. Before the structure arrives, we need the plain language of sets: how to describe them, when two of them are equal, and how to combine them. The most important move in this section is proving that two sets are equal by proving two inclusions, a move we will use for subspaces, spans, kernels, and images throughout the book.

0.3.1. Sets, elements, and set-builder notation

A set is a collection of objects, called its elements. We write x∈A for “x is an element of A” (also “x belongs to A”, “x lies in A”), and x∉A for its negation. A set is determined by its elements and nothing else: it has no order and no repetition. So {1,2}, {2,1}, and {1,1,2} all describe the same set, whose elements are 1 and 2. We make this precise below.

Small sets can be listed between braces. Infinite sets we meet constantly have fixed names.

Definition 0.3.1 (Common number sets)

We write

  • N={0,1,2,3,…} for the natural numbers; in this book N includes 0;
  • Z={…,−2,−1,0,1,2,…} for the integers;
  • Q for the rational numbers, the numbers a/b with a,b∈Z and b≠0;
  • R for the real numbers;
  • C for the complex numbers, studied later in this chapter.

Books disagree about whether 0∈N. With our convention, the Well-Ordering Principle (Theorem 0.2.11) applies to collections that contain 0, and “n∈N” means n≥0. When we need positive integers only, we say “n≥1”. For real numbers a≤b we also use intervals: [a,b] is the set of real x with a≤x≤b, (a,b) the set with a<x<b, and [a,b), (a,b] are defined in the same way.

Listing elements fails for most sets we care about, such as “the real numbers whose square is less than 4”. Instead we describe a set by a property, and select from a set we already have.

Definition 0.3.2 (Set-builder notation)

Let S be a set and let P(x) be a predicate for x∈S. The set {x∈S:P(x)} is the set whose elements are exactly those x∈S for which P(x) is true.

In words: an object y belongs to {x∈S:P(x)} if and only if y∈S and P(y) is true. Both parts matter. The ambient set S says where we are looking, and the predicate says what we keep. The colon is read “such that”; some books use a vertical bar instead. When it is plain which sets the elements come from, as in the unions and intersections below, we sometimes leave the ambient set out and write {x:P(x)}.

A second form describes the elements by a formula: {2k:k∈Z} is the set of all numbers of the form 2k with k an integer. An object y belongs to it exactly when y=2k for some k∈Z. This form will describe sets such as “all combinations of given vectors” in Chapter 1.

Example (Reading set-builder notation)

Describe each set more simply.

  • (a) {x∈R:x2<4}.
  • (b) {x∈Z:x2<4}.
  • (c) {n∈Z:n is even} and {2k:k∈Z}.
  • (d) {(x,y):x,y∈R, x+y=1}, a set of ordered pairs (made precise under Cartesian products below).

Solution.

  • (a) A real number satisfies x2<4 exactly when −2<x<2, so the set is the interval (−2,2).

  • (b) The same predicate, selected from Z instead, keeps only integers: the set is {−1,0,1}. Changing the ambient set changes the set.

  • (c) Both are the set {…,−4,−2,0,2,4,…} of even integers. The first selects the integers with a property; the second produces each element by the formula 2k. By the definition of “even” (Definition 0.2.1), an integer is even exactly when it equals 2k for some k∈Z.

  • (d) The pairs of reals whose coordinates add to 1: the line in the plane through (1,0) and (0,1).

What if no element of S satisfies the predicate? We still want a set, and it has no elements.

Definition 0.3.3 (Empty set)

The empty set ∅ is the set with no elements: x∉∅ for every object x.

For example, {x∈R:x2=−1}=∅, since x2≥0 for every real x (Example (Quantified statements)). Also {n∈Z:0<n<1}=∅. We will see shortly that there is only one empty set, so these two descriptions give the same set.

Statements about all elements of ∅ are vacuously true: “every element of ∅ is a prime number” has no element that could fail, just as in the degenerate case discussed after Example (Quantified statements).

Warning. ∅, {∅}, and {0} are three different sets. The set ∅ has no elements. The set {∅} has exactly one element, namely the empty set. The set {0} has exactly one element, namely the number 0. A box containing an empty box is not an empty box. In Chapter 1 this matters: {0} will be a subspace, and ∅ never is.

0.3.2. Subsets

Most sets in this book live inside a bigger set: the even integers inside Z, a line inside the plane, and later a subspace inside a vector space. The first thing to check about a candidate subspace will be that it sits inside the space at all. We need a word for “sits inside”.

A is a subset of B when everything in A is also in B.

Definition 0.3.4 (Subset)

Let A and B be sets. We say A is a subset of B, and write A⊆B, if ∀x:(x∈A⇒x∈B). If A⊆B and A≠B, then A is a proper subset of B, written A⊊B.

In words: A⊆B says that every element of A is an element of B. It says nothing about elements of B; B may contain many more. The definition is an implication inside a “for every”, so the proof template of the previous section applies: to show A⊆B, let x∈A and show x∈B.

By Definition 0.1.4 and Theorem 0.1.2, the negation reads A⊈B⟺∃x:x∈A and x∉B. So to show A is not a subset of B, exhibit one element of A outside B.

Example (Subsets)

Decide whether each inclusion holds.

  • (a) N⊆Z⊆Q⊆R.
  • (b) {1,2}⊆{1,2,3} and {1,4}⊆{1,2,3}.
  • (c) A⊆A and ∅⊆A, for any set A.
  • (d) {x∈R:x2=1}⊆Z.

Solution.

  • (a) All hold. Every natural number is an integer; every integer n equals n/1, so it is rational; every rational number is real.

  • (b) The first holds: each of 1,2 is an element of {1,2,3}. The second fails, although it differs from the first in only one element: 1 passes, but 4∈{1,4} and 4∉{1,2,3}, so 4 is a witness for {1,4}⊈{1,2,3}.

  • (c) Both hold. For A⊆A: let x∈A; then x∈A. For ∅⊆A: the implication x∈∅⇒x∈A has a false hypothesis for every x by Definition 0.3.3, so it is vacuously true (Definition 0.1.2). The empty set is a subset of every set, including itself.

  • (d) Holds. Let x∈R with x2=1. Then (x−1)(x+1)=0, so x=1 or x=−1, and both are integers.

Warning. ∈ and ⊆ are different relations. x∈A says the object x is one of the elements of A. A⊆B compares two sets, element by element. So 1∈{1,2} is true while 1⊆{1,2} makes no sense (1 is not a set here); and {1}⊆{1,2} is true while {1}∈{1,2} is false.

Quick check. Let X={{1,2},3}. Is {1,2}⊆X? Is {1,2}∈X?

Solution. The set X has exactly two elements: the set {1,2} and the number 3. So {1,2}∈X is true. But {1,2}⊆X is false: 1∈{1,2}, and 1 is neither the set {1,2} nor the number 3, so 1∉X.

0.3.3. Equality of sets and double inclusion

We said a set is determined by its elements. Here is the precise version.

Definition 0.3.5 (Set equality)

Two sets A and B are equal, written A=B, if they have exactly the same elements: ∀x:(x∈A⇔x∈B).

So {1,2}={2,1}={1,1,2}: each object belongs to one of these sets exactly when it is 1 or 2. Order and repetition in a list are features of how we write a set, not of the set.

Proving a biconditional for every x at once is awkward. It is much easier to prove two implications separately, and that is exactly what the next result allows.

Theorem 0.3.1 (Double inclusion)

Let A and B be sets. Then A=B if and only if A⊆B and B⊆A.

Proof. By Definition 0.3.5, A=B means that for every x, both x∈A⇒x∈B and x∈B⇒x∈A hold, since a biconditional is the conjunction of an implication and its converse. A statement of the form “for every x, P(x) and Q(x)” holds exactly when “for every x, P(x)” and “for every x, Q(x)” both hold, by Definition 0.1.3. Hence A=B holds exactly when ∀x(x∈A⇒x∈B) and ∀x(x∈B⇒x∈A) both hold. By Definition 0.3.4, these are A⊆B and B⊆A. This proves the theorem.

This is the move “prove set equality by double inclusion”. The proof is written in two labeled halves, (⊆) and (⊇), each starting “Let x∈…”. Here is a first consequence.

Remark. There is only one empty set. If E and E′ are sets with no elements, then E⊆E′ and E′⊆E hold vacuously, as in Example (Subsets) (c), so E=E′ by Theorem 0.3.1. This is why we may say the empty set.

Example (A solution set by double inclusion)

Prove that {x∈R:x2−3x+2=0}={1,2}.

Solution. Write S={x∈R:x2−3x+2=0}. By Theorem 0.3.1 it suffices to prove S⊆{1,2} and {1,2}⊆S.

(⊆) Let x∈S. Then x is real and x2−3x+2=0. Factoring, (x−1)(x−2)=0. A product of two real numbers is zero only if one factor is zero, so x=1 or x=2. Hence x∈{1,2}.

(⊇) Let x∈{1,2}, so x=1 or x=2. Both are real. If x=1, then 1−3+2=0; if x=2, then 4−6+2=0. In either case x∈S.

This shows S={1,2}.

Solving an equation “at school” usually produces only the (⊆) half: “if x is a solution, then x is 1 or 2”. The (⊇) half, checking that the candidates really are solutions, is the part that gets forgotten. It matters whenever a step in the solving is not reversible, such as squaring both sides.

0.3.4. Union, intersection, and difference

Given two sets, there are three basic ways to form a new one: keep what is in either, keep what is in both, or keep what is in the first but not the second. Each is a set-builder description whose predicate uses a connective from the section on logic.

Definition 0.3.6 (Union)

The union of sets A and B is A∪B={x:x∈A or x∈B}.

Definition 0.3.7 (Intersection)

The intersection of sets A and B is A∩B={x:x∈A and x∈B}. We call A and B disjoint if A∩B=∅.

Definition 0.3.8 (Set difference and complement)

The difference of sets A and B is A∖B={x∈A:x∉B}. When all sets under discussion are subsets of one fixed set U, the complement of B⊆U is Bc=U∖B.

In words: the union keeps an element that lies in at least one of the sets (the “or” is inclusive, as always); the intersection keeps an element that lies in both; the difference A∖B keeps the elements of A that are not in B. The complement depends on the choice of U: the complement of N is the set of negative integers inside Z, but a much bigger set inside R.

Example (Operations on finite sets)

Let A={1,2,3,4} and B={3,4,5,6}. Compute A∪B, A∩B, A∖B, and B∖A.

Solution. Checking each element against the definitions: A∪B={1,2,3,4,5,6}; A∩B={3,4}; A∖B={1,2}; and B∖A={5,6}. Since A∖B≠B∖A, the difference is not symmetric in its two arguments, unlike union and intersection.

Example (Operations on intervals)

Let A=[0,2] and B=[1,3]. Compute A∪B, A∩B, and A∖B.

Solution. A real x lies in A∪B when 0≤x≤2 or 1≤x≤3, which happens exactly when 0≤x≤3; so A∪B=[0,3]. It lies in A∩B when both hold, that is, when 1≤x≤2; so A∩B=[1,2]. It lies in A∖B when 0≤x≤2 and not 1≤x≤3. Given x≤2, “not 1≤x≤3” means x<1; so A∖B=[0,1). The endpoint 1 is excluded because 1∈B.

Unions, intersections, and differences interact through laws that mirror those for “or”, “and”, and “not”. The first pair is De Morgan’s laws, the set version of Theorem 0.1.2.

Theorem 0.3.2 (De Morgan’s laws for sets)

Let A, B, and C be sets. Then

  • (a) A∖(B∪C)=(A∖B)∩(A∖C);
  • (b) A∖(B∩C)=(A∖B)∪(A∖C).

In particular, if B,C⊆U, then (B∪C)c=Bc∩Cc and (B∩C)c=Bc∪Cc.

Idea. Unwind membership into connectives. “x∉B∪C” is “not (x∈B or x∈C)”, and De Morgan for statements turns that into “x∉B and x∉C”. So each law is its logical counterpart, applied one element at a time. We prove (a) by double inclusion; (b) is an exercise.

Proof. We prove (a) using Theorem 0.3.1.

(⊆) Let x∈A∖(B∪C). By Definition 0.3.8, x∈A and x∉B∪C. By Definition 0.3.6, the second says that “x∈B or x∈C” is false, so by Theorem 0.1.2, x∉B and x∉C. Since x∈A and x∉B, we have x∈A∖B; since x∈A and x∉C, we have x∈A∖C. Hence x∈(A∖B)∩(A∖C) by Definition 0.3.7.

(⊇) Let x∈(A∖B)∩(A∖C). By Definition 0.3.7 and Definition 0.3.8, x∈A, x∉B, and x∉C. By Theorem 0.1.2, “x∈B or x∈C” is false, so x∉B∪C. Together with x∈A, this gives x∈A∖(B∪C).

This proves (a). For the complement form, take A=U and use Definition 0.3.8: (B∪C)c=U∖(B∪C)=(U∖B)∩(U∖C)=Bc∩Cc, and similarly for (b).

The second pair of laws says each of ∩ and ∪ distributes over the other, like multiplication over addition, except that here both directions hold.

Theorem 0.3.3 (Distributive laws for sets)

Let A, B, and C be sets. Then

  • (a) A∩(B∪C)=(A∩B)∪(A∩C);
  • (b) A∪(B∩C)=(A∪B)∩(A∪C).

Idea. Double inclusion again, and in each half the “or” in a union forces a split into cases. For (b) (⊇), an element of both A∪B and A∪C is either in A, and then done, or not in A, and then it must be in B and in C. We prove (b); (a) is an exercise.

Proof. We prove (b) using Theorem 0.3.1.

(⊆) Let x∈A∪(B∩C). By Definition 0.3.6, x∈A or x∈B∩C.

Case 1: x∈A. Then x∈A∪B and x∈A∪C by Definition 0.3.6.

Case 2: x∈B∩C. Then x∈B and x∈C by Definition 0.3.7, so again x∈A∪B and x∈A∪C.

In both cases x∈(A∪B)∩(A∪C) by Definition 0.3.7.

(⊇) Let x∈(A∪B)∩(A∪C), so x∈A∪B and x∈A∪C.

Case 1: x∈A. Then x∈A∪(B∩C).

Case 2: x∉A. Since x∈A∪B and x∉A, we get x∈B. Since x∈A∪C and x∉A, we get x∈C. Hence x∈B∩C, so x∈A∪(B∩C).

In both cases x∈A∪(B∩C). This proves (b).

Remark. In Chapter 1 we will see that the intersection of two subspaces is always a subspace, while their union usually is not: the two axes in the plane are subspaces, but (1,0)+(0,1)=(1,1) lies on neither. The union is replaced there by a different construction, the sum of subspaces.

0.3.5. Indexed families of sets

Two sets are not always enough. In Chapter 1 we will need “the intersection of all subspaces that contain a given set”, and there are usually infinitely many of them. So we need unions and intersections of any number of sets at once.

An indexed family is a list of sets with one set for each label; its union keeps what lies in some member, its intersection what lies in every member.

Definition 0.3.9 (Unions and intersections of indexed families)

Let I be a set, and for each i∈I let Ai be a set. The collection (Ai)i∈I is an indexed family of sets, with index set I. Its union is ⋃i∈IAi={x:∃i∈I:x∈Ai}, and, if I is nonempty, its intersection is ⋂i∈IAi={x:∀i∈I:x∈Ai}.

In words: x lies in the union when it lies in at least one Ai, and in the intersection when it lies in every Ai. When I={1,2}, these are A1∪A2 and A1∩A2. When I={1,2,3,…}, we also write ⋃n=1∞An and ⋂n=1∞An.

Why I must be nonempty for the intersection. If I=∅, the condition “∀i∈I:x∈Ai” is vacuously true for every object x, so the “intersection” would contain everything, which is not a set we want. (When all sets live inside a fixed U, one sometimes defines the empty intersection to be U.) The empty union causes no such trouble: “∃i∈∅” is always false, so ⋃i∈∅Ai=∅.

Example (Indexed unions and intersections of intervals)

For each integer n≥1, let An=[1/n,1] and Bn=(0,1/n). Show that ⋃n=1∞An=(0,1]and⋂n=1∞Bn=∅. You may use the fact that for every real x>0 there is an integer n≥1 with 1/n<x.

Solution. The union. (⊆) Let x∈⋃nAn. By Definition 0.3.9, x∈An for some n≥1, so 0<1/n≤x≤1. Hence x∈(0,1]. (⊇) Let x∈(0,1]. Since x>0, there is an integer n≥1 with 1/n<x. Then 1/n≤x≤1, so x∈An, and hence x lies in the union. By Theorem 0.3.1, the union is (0,1].

The intersection. Suppose, for a contradiction, that some x lies in ⋂nBn. Then x∈B1=(0,1), so x>0. Choose an integer n≥1 with 1/n<x. Then x∉(0,1/n)=Bn, contradicting x∈Bn for every n. Hence the intersection has no elements, so it equals ∅.

Each Bn is nonempty (it contains 1/(2n)), and each is contained in the one before. Yet their intersection is empty. Infinite intersections can shrink to nothing even when no single step does.

De Morgan’s laws hold for indexed families with the same proofs: for a nonempty index set I, A∖⋃iBi=⋂i(A∖Bi) and A∖⋂iBi=⋃i(A∖Bi). The “or” of the finite version becomes “there exists”, and the “and” becomes “for every”, exactly as in Definition 0.1.4.

0.3.6. Cartesian products and n-tuples

A set forgets order: {1,2}={2,1}. But a point in the plane is not like that. The point (1,2) is different from (2,1). We need objects that remember order.

An ordered pair (a,b) has a first entry a and a second entry b, and two ordered pairs are equal exactly when their entries agree in order: (a,b)=(a′,b′)⟺a=a′ and b=b′.

Definition 0.3.10 (Cartesian product)

Let A and B be sets. The Cartesian product of A and B is the set of ordered pairs A×B={(a,b):a∈A, b∈B}. More generally, for sets A1,…,An, the product A1×⋯×An is the set of all ordered lists (a1,…,an) with ai∈Ai for each i.

For example, {1,2}×{x,y}={(1,x),(1,y),(2,x),(2,y)}. The order of the factors matters: (1,x)∈{1,2}×{x,y}, but (1,x)∉{x,y}×{1,2}, whose pairs have a letter first. A degenerate case: A×∅=∅ for every set A, since no pair can have a second entry from ∅.

Definition 0.3.11 (n-tuples)

Let A be a set and n≥1 an integer. An n-tuple of elements of A is an ordered list (a1,…,an) with each ai∈A. The set of all of them is An=A×A×⋯×A⏟n factors. Two n-tuples are equal exactly when ai=bi for every i=1,…,n.

Example (Sets of tuples)

Describe some elements of R2, Z3, and {0,1}3, and count the elements of {0,1}3.

Solution. The set R2 is the plane: it contains (0,0), (1,−2), and (2,π). The set Z3 contains (1,0,−4) but not (1,12,0), whose second entry is not an integer. The set {0,1}3 consists of the lists of three bits: {0,1}3={(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,0,0),(1,0,1),(1,1,0),(1,1,1)}. There are two choices for each of the three entries, giving 2⋅2⋅2=8 elements. In the same way, if A has k elements then An has kn elements.

In Chapter 1, Rn and more generally Fn become the first examples of vector spaces, with n-tuples added and scaled entry by entry.

0.3.7. Power sets

Sets can themselves be elements of sets, as the warning about {∅} showed. One such set collects every subset of a given set.

Definition 0.3.12 (Power set)

The power set of a set S is the set of all subsets of S: P(S)={X:X⊆S}.

So X∈P(S) means exactly X⊆S. For example, P({1,2})={∅,{1},{2},{1,2}}, which has 4 elements. The degenerate case is instructive: P(∅)={∅} has one element, because the empty set has exactly one subset, itself. For a set with n elements the power set has 2n elements; the last exercise proves this by induction.

0.3.8. Exercises

A. Check your understanding

Exercise (A1)

Decide whether each statement is true or false. Give a one-line reason.

  • (a) 0∈N.
  • (b) ∅∈∅.
  • (c) ∅⊆∅.
  • (d) {0}=∅.
  • (e) {1,2}={2,1,1} and (1,2)=(2,1).
  • (f) {1}∈P({1,2}) and {1}⊆P({1,2}).

Solution.

  • (a) True. By Definition 0.3.1, N includes 0 in this book.

  • (b) False. By Definition 0.3.3, nothing is an element of ∅, not even ∅.

  • (c) True. The empty set is a subset of every set, vacuously, as in Example (Subsets).

  • (d) False. 0∈{0} but 0∉∅, so the two sets do not have the same elements (Definition 0.3.5).

  • (e) The first is true: both sets have exactly the elements 1 and 2. The second is false: ordered pairs are equal only when their first entries agree, and 1≠2.

  • (f) The first is true: {1}⊆{1,2}, so {1}∈P({1,2}) by Definition 0.3.12. The second is false: 1∈{1}, but 1 is a number, not a subset of {1,2}, so 1∉P({1,2}).

B. Practice

Exercise (B1: The second De Morgan law)

Let A, B, C be sets. Prove that A∖(B∩C)=(A∖B)∪(A∖C), which is part (b) of Theorem 0.3.2.

Solution. We use Theorem 0.3.1.

(⊆) Let x∈A∖(B∩C). By Definition 0.3.8, x∈A and x∉B∩C. By Definition 0.3.7, “x∈B and x∈C” is false, so by Theorem 0.1.2, x∉B or x∉C. If x∉B, then x∈A∖B; if x∉C, then x∈A∖C. In either case x∈(A∖B)∪(A∖C) by Definition 0.3.6.

(⊇) Let x∈(A∖B)∪(A∖C). By Definition 0.3.6, x∈A∖B or x∈A∖C. In the first case x∈A and x∉B; in the second, x∈A and x∉C. In both cases x∈A, and “x∉B or x∉C” is true, so by Theorem 0.1.2 “x∈B and x∈C” is false, that is, x∉B∩C. Hence x∈A∖(B∩C).

This proves the equality.

Exercise (B2: A distributive law)

Let A, B, C be sets. Prove that A∩(B∪C)=(A∩B)∪(A∩C), which is part (a) of Theorem 0.3.3.

Solution. We use Theorem 0.3.1.

(⊆) Let x∈A∩(B∪C). Then x∈A and x∈B∪C, so x∈B or x∈C. If x∈B, then x∈A∩B; if x∈C, then x∈A∩C. In either case x∈(A∩B)∪(A∩C).

(⊇) Let x∈(A∩B)∪(A∩C). If x∈A∩B, then x∈A and x∈B⊆B∪C. If x∈A∩C, then x∈A and x∈C⊆B∪C. In either case x∈A and x∈B∪C, so x∈A∩(B∪C).

This proves the equality.

Exercise (B3: An indexed intersection)

Prove that ⋂n=1∞(−1n,1n)={0}. You may use the fact that for every real x>0 there is an integer n≥1 with 1/n<x.

Solution. Write Bn=(−1/n,1/n) and B=⋂n≥1Bn. We use Theorem 0.3.1.

(⊇) For every n≥1, −1/n<0<1/n, so 0∈Bn. By Definition 0.3.9, 0∈B.

(⊆) Let x∈B. Suppose, for a contradiction, that x≠0. Then |x|>0, so there is an integer n≥1 with 1/n<|x|. Then x≥1/n or x≤−1/n, so x∉Bn. This contradicts x∈B, which requires x∈Bn for every n. Hence x=0, that is, x∈{0}.

This shows B={0}.

C. Going deeper

Exercise (C1: When union equals intersection)

Let A and B be sets. Prove that A∪B=A∩B if and only if A=B.

Solution. (⇐) Suppose A=B. Then A∪B=A∪A and A∩B=A∩A. By Definition 0.3.6 and Definition 0.3.7, “x∈A or x∈A” and “x∈A and x∈A” are both equivalent to x∈A, so A∪A=A=A∩A. Hence A∪B=A∩B.

(⇒) Suppose A∪B=A∩B. We show A=B using Theorem 0.3.1.

(⊆) Let x∈A. Then x∈A∪B by Definition 0.3.6. Since A∪B=A∩B, we get x∈A∩B, and in particular x∈B.

(⊇) Swapping the roles of A and B in the previous paragraph, which is allowed since A∪B=B∪A and A∩B=B∩A, gives B⊆A.

Hence A=B. This proves the equivalence.

Exercise (C2: Counting subsets)

For a finite set S, write |S| for its number of elements. The aim is to prove that |P(S)|=2|S| for every finite set S.

  • (a) Check the claim when S=∅.
  • (b) Let S have n+1 elements, fix s∈S, and let S′=S∖{s}. Show that every subset X of S belongs to exactly one of the two collections: the subsets of S with s∉X, and the subsets of S with s∈X.
  • (c) Show that the subsets of S with s∉X are exactly the subsets of S′, and that X↦X∖{s} and T↦T∪{s} pair off the subsets of S containing s with the subsets of S′, each undoing the other.
  • (d) Hence prove the claim by induction on n=|S|.

Hint: in (c), use double inclusion to check that (X∖{s})∪{s}=X when s∈X.

Solution.

  • (a) The only subset of ∅ is ∅ itself, since any X⊆∅ has no elements and so equals ∅ by Theorem 0.3.1. So P(∅)={∅} has 1=20 element.

  • (b) Let X⊆S. The statement s∈X is either true or false, and not both. So X lies in exactly one of the two collections.

  • (c) First collection. If X⊆S and s∉X, then every x∈X lies in S and is not s, so x∈S′; hence X⊆S′. Conversely, if T⊆S′, then T⊆S and s∉T, since no element of S′ equals s. So the first collection is exactly P(S′).

    Second collection. If X⊆S with s∈X, then X∖{s}⊆S′. If T⊆S′, then T∪{s}⊆S contains s. Now we check that the two operations undo each other. For X containing s: an element lies in (X∖{s})∪{s} exactly when it is in X and not s, or it is s; since s∈X, this is exactly when it is in X. So (X∖{s})∪{s}=X. For T⊆S′: an element lies in (T∪{s})∖{s} exactly when it is in T or equal to s, and not equal to s; since s∉T, this is exactly when it is in T. So (T∪{s})∖{s}=T. Hence the two operations pair the subsets of S containing s one-to-one with the subsets of S′, and the two collections have the same number of elements.

  • (d) Let P(n) be the statement “every set with n elements has exactly 2n subsets”. We use Theorem 0.2.7 with n0=0. The base case P(0) is (a), since the only set with no elements is ∅. Let n≥0, suppose P(n), and let S have n+1 elements. Fix s∈S, which exists since n+1≥1, and let S′=S∖{s}, a set with n elements. By (b), the number of subsets of S is the size of the first collection plus the size of the second. By (c) and the induction hypothesis, each of these sizes equals |P(S′)|=2n. Hence S has 2n+2n=2n+1 subsets, which is P(n+1). By Theorem 0.2.7, P(n) holds for every n∈N, as claimed.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.