410 likes | 461 Views
Introduction to Sets. A set is just a collection of stuff. But the stuff must be written inside curly braces Each item in the curly braces is separated by commas Some examples of sets include:. Called the empty set. There are two very small rules about the stuff in the Set.
E N D
A set is just a collection of stuff • But the stuff must be written inside curly braces • Each item in the curly braces is separated by commas • Some examples of sets include:
There are two very small rules about the stuff in the Set • You don’t list anything more than once • The order you list things in doesn’t matter
Is not the correct way to write out this set (it repeats an element)
Is not the correct way to write out this set (it repeats an element)
Both of these would be considered identical Sets since they have all the same elements and only the order is different.
So what if I get tired of writing out all of these Sets? • Just as with logic we can make up place holders (variables) to refer to any Set we specify. Typically we use single capital letters to do this. So now I can just use A and we all know what I mean.
Let’s consider the following sets How many items are in each of the sets on the left? |A| = 6 |C| = 2 |B| =3 |D| = 4 |E| = 0
Some well known and named sets • “N” is the natural numbers {0, 1, 2, 3, 4, 5, …} • “Z” is the set of integers{…-2,-1,0,1,2,…} • “Q” is the set of rational numbers (any number that can be written as a fraction • “R” is the set of real numbers (all the numbers/fractions/decimals that you can imagine
Cardinality This is just asking how many elements are in the set…
Cardinality This is just asking how many elements are in the set… and we just learned how to do it.
Solve the following problems • What is |A|? 3 • What is |B|+|C| 6 • What is |D|+|E|-|A|? 1
Set Builder Notation • We don’t always have the ability or want to directly list every element in a set. So Mathematicians have invented “Set Builder Notation” This can be read as “All x’s such that x is an element of the Natural Numbers”
Set Builder Notation • Two key symbols that we will see: This means “is an element of” This means “is subset of”
For example • We can say
Set Builder Notation consists of two halves • The first half gives a description of what values we want to include in our set • The second half places constrains on which of the values mentioned in the first half we will actually use.
More Practice Understanding Set Builder Notation
Set Operations • Just like in logic there are lots of ways we can perform operation on sets. Most of these operations are different ways of combining two different sets buy some (like Cardinality) only apply to a single set.
Union Create a new set by combining all of the elements or two sets
Intersection Create a new set using the elements the two sets have if common
Difference Create a new set by taking all of the elements of the first set (A) and removing all of the elements in the second set (B)
Practice with Set Operations Set Operations
Power Set or Create a set that consists of all of the subsets of the set that is given (A)
Cartesian Product Create a new set consisting of coordinate pairs by combining pairs of elements (one from each set) in all possible combinations.
What is a coordinate pair • Its just like what you learned about when you learned about graphing or points • It is something written in the form (x, y) • The first value in the parentheses is the x-coordinate • The second value in the parentheses is the y-coordinate