Free preview
82 lessons
Mathematical Foundations for ML
Free preview
Mathematical Foundations for ML · 82 lessons
No surprise gaps
Actually remember it
Skip what you know
One subscription. All learning paths included.
Our content is best on a larger screen
Set union
Given two sets, we often want to combine them. The union collects elements from both.
Definition
The union of sets and , written , contains all elements that are in , in , or in both.
To form a union, we collect every element from either set. When the same element appears in both sets, we list it just once - sets don't have duplicates.
Gotcha
In mathematics, " or " always means " or or both". An element in both sets is still included in the union. This differs from everyday language, where "or" sometimes implies exclusivity.
Let and . Find .
Solution
The union contains all elements that are in , in , or in both.
From :
From :
Combining these (noting that appears in both, but we list it only once):
Practice questions
4 questions
Let and .
What is ?
Select the correct answer:
+ 3 more questions
Set intersection
Sometimes we want elements that satisfy both conditions simultaneously. This is the intersection.
Definition
The intersection of sets and , written , contains only elements that are in both and .
The key word is "and". To form an intersection, we keep only elements that appear in both sets - everything else is excluded.
Key Point
When two sets have no elements in common, their intersection is the empty set . We say the sets are disjoint - they share no elements.
For example, the set of odd integers and the set of even integers are disjoint - no integer is both odd and even, so their intersection is .
Let and .
Find . Then let and find .
Solution
Finding :
The intersection contains only elements in both sets. Checking which elements of are also in :
Finding :
Checking which elements of are also in :
Practice questions
4 questions
Let and .
What is ?
Select the correct answer:
+ 3 more questions
Venn diagrams
A Venn diagram is a visual way to represent sets and their relationships. The outer rectangle represents all elements under consideration - we label it . Sets are drawn as overlapping circles inside.
The overlapping circles create four distinct regions:
Each element belongs to exactly one region. Use the buttons below to see how the union and intersection appear on a Venn diagram.
The union covers all three inner regions (both circles). The intersection covers only the overlap.
Draw a Venn diagram for with and . Place each element in the correct region. Identify and from the diagram.
Solution
First, we classify each element by which sets it belongs to:
Reading from the diagram:
Union : all elements inside either circle -
Intersection : only the element in the overlap -
Practice questions
4 questions
The Venn diagram below shows sets and with .
What is ?
Select the correct answer:
+ 3 more questions