Back to Course

Sets and Logic

Set Fundamentals and Notation

A set is a well-defined collection of distinct objects, called Elements, typically denoted by capital letters like or .
Set FundamentalsVisualization of a set A within a universal set U, demonstrating membership.Universal Set (U)Set A12341, 2, 3 ∈ A4 ∉ A
Notation describing the membership status of an object relative to a set.
=Element of / Belongs to(none)
=Not an element of(none)
=Target set(none)
Distinctness: Elements within a set must be unique; repetitions do not change the set.
Well-Defined: There must be a clear criterion to determine if any object belongs to the set.
Cardinality: Represented as , it denotes the number of unique elements in set .

Set Operations and Venn Diagrams

Sets can be manipulated through Union, Intersection, and Relative Complement to form new collections. A Venn Diagram uses overlapping circles inside a rectangle to visualise these operations.
Union: A ∪ BIntersection: A ∩ BAll elements in A OR BElements in BOTH A AND B
The Inclusion-Exclusion Principle calculates the size of the union by subtracting the double-counted intersection.
=Cardinality of the union(count)
=Cardinality of the intersection(count)
=Size of set A(count)
Union (∪): Contains all elements present in either set A, set B, or both. Symbolically: .
Intersection (∩): Contains only elements present in both set A and set B simultaneously. Symbolically: .
Disjoint Sets: Sets with an empty intersection (). For disjoint sets, since there is no overlap to subtract.
Overlapping Sets: Sets whose intersection is non-empty but neither is a subset of the other.
The Complement of set (written or ) is everything in the Universal Set that is not in . The set difference removes elements of from .
Complement: A'Difference: A \ BEverything NOT in AIn A but NOT in B
The complement contains every element of the universal set that does not belong to A.
=Complement of A(none)
=Universal set(none)
=Elements in A but not in B (set difference)(none)
Complement Notation: , , and all mean the same thing.
Set Difference: . Note: in general.
Difference via Intersection: , which is equivalent by definition.

Properties of Union and Intersection

Set operations obey algebraic properties analogous to arithmetic, including commutative, associative, and distributive laws.
Union distributes over intersection, just as multiplication distributes over addition in algebra.
=Union (analogous to addition)(none)
=Intersection (analogous to multiplication)(none)
Both sides reduce to , since and .
LHS = . RHS = . Both give .
Commutative: and .
Associative: and .
Distributive: Union distributes over intersection AND intersection distributes over union — both directions work for sets (unlike numbers where only × distributes over +).
Identity Elements: (empty set is identity for ∪) and (universal set is identity for ∩).
Idempotent Laws: and .
Complement Laws: and .
Absorption Laws: and .
De Morgan's Laws connect complement with union and intersection, allowing you to 'break apart' complements of compound sets.
Complementing a union turns it into an intersection of complements, and vice versa. The complement 'flips' the operation.
=Everything NOT in A or B(none)
=Elements outside A AND outside B(none)
Proof Strategy: Show each side is a subset of the other. If , then , so AND , meaning .
Verification Shortcut: Pick concrete sets and compute both sides. If , , : LHS , RHS .
Mnemonic: 'Break the bar, change the sign' — the complement bar distributes but the operation flips.

Propositions and Logical Operators

Logic uses Conjunction (AND), Disjunction (OR), and Negation (NOT) to evaluate the truth of complex statements.
PQP ∧ QP ∨ QTTTTTFFTFTFTFFFF
Standard symbolic representations for logical disjunction, conjunction, and negation.
=Conjunction (AND)(logic)
=Disjunction (OR)(logic)
=Negation (NOT)(logic)
Conjunction (∧): True ONLY when both components are True. With propositions, the conjunction has rows in its truth table.
Disjunction (∨): False ONLY when both components are False. This is inclusive OR (both true is still true).
Negation (¬): Flips the truth value. Double negation cancels: .
Truth Table: A systematic table listing all combinations of truth values for variables, used to evaluate compound propositions.
Tautology vs Contradiction: A tautology is always True (e.g., ). A contradiction is always False (e.g., ). Every other formula is a contingency.

Conditional Logic and Quantifiers

A Conditional statement asserts that if is true, then must also be true.
Conditional: P → QContrapositive: ¬Q → ¬PInverse: ¬P → ¬QConverse: Q → PLogically EquivalentNegationReverse LabelsLogically Equivalent
The contrapositive of a conditional statement is logically equivalent to the original statement.
=Implication (If...then)(logic)
=Logical Equivalence(logic)
=Negation(logic)
Only False Case: is False ONLY when is True and is False. A false hypothesis makes the conditional automatically True (vacuous truth).
Contrapositive: — logically equivalent to . Always valid for proofs.
Converse: — NOT equivalent to .
Inverse: — NOT equivalent to . The inverse is the contrapositive of the converse.
Material Equivalence: . This lets you convert any conditional into a disjunction.
A Biconditional asserts that and have the same truth value — both true or both false.
The biconditional is true exactly when both the conditional and its converse hold simultaneously.
=If and only if (iff)(logic)
=Forward direction(logic)
=Backward direction (converse)(logic)
Truth Values: True when both are T or both are F. False when they differ — exactly 2 True rows out of 4.
Read As: 'p if and only if q', abbreviated 'p iff q'.

Inductive and Deductive Reasoning

Mathematical reasoning falls into two categories: induction (specific → general) and deduction (general → specific).
Inductive Reasoning: Drawing general conclusions from specific observations or patterns. Example: observing 2, 4, 6, 8, ... and concluding the pattern is .
Deductive Reasoning: Drawing specific conclusions from accepted general premises. Example: 'All men are mortal; Socrates is a man; therefore Socrates is mortal.'
Key Difference: Inductive conclusions are probable but not certain; deductive conclusions are guaranteed if the premises are true.
Aristotelian Logic: Every Proposition is either True or False with no third option — the foundation of all deductive reasoning in mathematics.

Truth Sets: Linking Sets and Logic

Every logical proposition has a truth set — the set of all values making true — creating a direct bridge between set theory and logic.
Truth Set of $\neg p$: The complement , since is true exactly where is false.
Truth Set of $p \lor q$: The union , since the disjunction is true when either is true.
Truth Set of $p \land q$: The intersection , since both must be true simultaneously.
Truth Set of $p \to q$: The set , using the equivalence .
Power of the Link: Any set identity (like De Morgan's Law) can be proved via truth tables, and any logical equivalence can be expressed in set notation.