Set theory basics
De Morgan's laws - (P ∪ Q)' = P' ∩ Q'
(P ∩ Q)' = P' ∪ Q'
The basic laws of algebra:
- Distributive laws: A∪(B∩C) = (A∪B) ∩ (A∪C)
A∩(B∪C) = (A∩B) ∪ (A∩C) - Associative laws: A∪(B∪C) = (A∪B) ∪ C = A ∪ B ∪ C
A∩(B∩C) = (A∩B) ∩ C = A ∩ B ∩ C - Commutative laws: A∪B = B∪A
A∩B = B∩A
They may look strange but these laws also apply to the algebra that you are familiar with: 3(a+b) = 3a + 3b
To be more precise with the distributive laws, you have to say what distributes over what:
- A∪(B∩C) = (A∪B) ∩ (A∪C) - union is distributive over intersection
- A∩(B∪C) = (A∩B) ∪ (A∩C) - intersection is distributive over union.
In ordinary algebra, multiplication is distributive over addition - 3(a+b)=3a+3b - but addition is not distributive over multiplication: 3+(a x b) does not equal (3+a)(3+b), so you have to be careful how you use this law.
Another set function is the set difference operation A-B = A ∩ B'
Union is not distributive over set difference: A∪(B-C) ≠ (A∪B)-(A∪C) and set difference is not distributive over union: A-(B∪C) ≠ (A-B)∪(A-C) so you have to be very careful whether you can use the distributive law or not.
The commutative law is very natural, and applies to plus and times with numbers, and applies to union and intersection with sets, but it isn't always true. You have already come across things which do not commute - matrices under multiplication.
