Sets and logic are the "grammar" of mathematics. The language of sets is used to write the solutions of equations and inequalities, the domain and range of functions, and events in probability. Logic teaches you to understand words such as "necessary", "sufficient", "at least one", "every" and "there exists" precisely and to draw correct conclusions. The topic also underpins counting problems and methods of proof.
A set is a collection of objects grouped by some property; the objects are its elements. A set is described in two ways: by listing its elements (A = {1, 2, 3}) or by a defining property (B = {x | x² < 9}).
Order and repetition do not matter in a set: {1, 2, 2, 3} = {3, 1, 2}.
The main number sets: N — natural, Z — integers, Q — rational, R — real numbers; N ⊂ Z ⊂ Q ⊂ R. Intervals are sets too: [2; 5) = {x | 2 ≤ x < 5}.
A set with n elements has 2ⁿ subsets (including the empty set and the set itself)
Why 2ⁿ? Each element has two options: it is in the subset or it is not. n independent choices give 2 · 2 · … · 2 = 2ⁿ possibilities.
Union A ∪ B — elements belonging to at least one of the sets
Intersection A ∩ B — elements belonging to both sets
Difference A \ B — in A but not in B; complement Ā — elements of the universal set not in A
If the intersection is empty (A ∩ B = ∅), the sets are called disjoint. The operations behave like those on numbers: A ∪ B = B ∪ A, A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
De Morgan’s laws: (A ∪ B)‾ = Ā ∩ B̄, (A ∩ B)‾ = Ā ∪ B̄ — "the complement of a union is the intersection of the complements".
Operations on intervals are done on the number line: [1; 5) ∩ (3; 7] = (3; 5), [1; 5) ∪ (3; 7] = [1; 7]. These are exactly the operations used to write the answer to a system of inequalities (intersection) and to a collection (union).
A = {1, 2, 3, 4}, B = {3, 4, 5}. Find the union, the intersection and the difference.
In a Venn diagram the sets are drawn as circles and the universal set as a rectangle. Counting problems use the inclusion–exclusion principle:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C)
The intersection is subtracted because it was counted in both n(A) and n(B), i.e. twice. With three sets the common part is first added three times and subtracted three times, so it is added back once.
It is convenient to fill in a diagram from the centre outwards (from the region where most sets overlap).
A class has 30 pupils: 18 learn English, 15 learn German and 5 learn neither. How many learn both?
Of 120 students, 60 attend a maths club, 50 physics and 40 chemistry. 25 attend maths and physics, 20 maths and chemistry, 15 physics and chemistry, and 10 all three. How many attend no club?
A statement (proposition) is a declarative sentence that is either true (T) or false (F). "7 is prime" is a true statement; "x > 2" is not a statement, because x is unknown (it is a predicate).
The implication A ⇒ B is false only when A is true and B is false
Think of an implication as a promise: "If it rains, I will take an umbrella". The promise is broken only if it rains and no umbrella is taken. If it does not rain, the promise is not broken whatever you do — that is why F ⇒ T and F ⇒ F are true.
De Morgan: ¬(A ∧ B) = ¬A ∨ ¬B, ¬(A ∨ B) = ¬A ∧ ¬B.
The statement equivalent to A ⇒ B is its contrapositive ¬B ⇒ ¬A. The converse B ⇒ A is not equivalent to it.
In terms of sets: A ⇒ B means the set satisfying A is a subset of the set satisfying B. The smaller set is the sufficient condition, the larger one the necessary condition.
What kind of condition is "x > 3" for "x > 1"?