Difference between revisions of "Sets:Operations"
Line 16: | Line 16: | ||
There are a few other common set operations. The set difference of <math> A </math> and <math> B </math> is defined as <math> A\backslash B = \{x : x\in A, x\not\in B\} </math>. We read <math> A\backslash B </math> (also sometimes denoted as <math> A-B </math>) as "<math> A </math> without <math> B </math>". Note that this operation is not commutative; that is, <math> A\backslash B </math> does not equal <math> B\backslash A </math> in most cases. Example: if <math> A = \{1, 2, 3, 4, 5\} </math> and <math> B = \{0, 1, 3, 4, 5, 6\} </math>, then <math> A\backslash B = \{2\} </math> and <math> B\backslash A = \{0, 6\} </math>. | There are a few other common set operations. The set difference of <math> A </math> and <math> B </math> is defined as <math> A\backslash B = \{x : x\in A, x\not\in B\} </math>. We read <math> A\backslash B </math> (also sometimes denoted as <math> A-B </math>) as "<math> A </math> without <math> B </math>". Note that this operation is not commutative; that is, <math> A\backslash B </math> does not equal <math> B\backslash A </math> in most cases. Example: if <math> A = \{1, 2, 3, 4, 5\} </math> and <math> B = \{0, 1, 3, 4, 5, 6\} </math>, then <math> A\backslash B = \{2\} </math> and <math> B\backslash A = \{0, 6\} </math>. | ||
+ | |||
+ | Another set operation is the Cartesian product (or the product of two sets). The Cartesian product of two sets <math> A </math> and <math> B </math> is defined as <math> A\times B = \{(a, b): a\in A </math> and <math> b\in B\} </math>, where <math> (a,b) </math> is an ordered pair. For example, if <math> A = \{1, 2, 3\} </math> and <math> B = \{0, 1\} </math>, then <math> A\times B = \{(1,0), (1,1), (2,0), (2,1), (3,0), (3, 1)\} </math>. The number of elements in the Cartesian product <math> A\times B </math> is the product of the number of elements in set <math> A </math> and set <math> B </math> (for example, if <math> A </math> has 3 elements and <math> B </math> has 2, then <math> A\times B </math> has 6). | ||
==Resources== | ==Resources== | ||
* [https://link-springer-com.libweb.lib.utsa.edu/content/pdf/10.1007%2F978-1-4419-7127-2.pdf Course Textbook], pages 101-115 | * [https://link-springer-com.libweb.lib.utsa.edu/content/pdf/10.1007%2F978-1-4419-7127-2.pdf Course Textbook], pages 101-115 |
Revision as of 16:02, 26 September 2021
Definitions
The two main set operations that we deal with are union and intersection. The union of two sets and is defined as or . For example:
- The union of and is
- The union of the even integers and odd integers is .
- The union of the set of rational numbers and the set of irrational numbers is .
- , and .
- For sets and such that , , since all elements of are already in if .
The intersection of and is defined as and ; that is, the intersection of and is the set of all elements shared by the two sets. Sets and are "disjoint" if .
- The intersection of and is .
- The intersection of the even integers and odd integers is the empty set, since no element between these two sets is shared (an integer cannot be both even and odd).
- , and .
- For sets and such that , .
There are a few other common set operations. The set difference of and is defined as . We read (also sometimes denoted as ) as " without ". Note that this operation is not commutative; that is, does not equal in most cases. Example: if and , then and .
Another set operation is the Cartesian product (or the product of two sets). The Cartesian product of two sets and is defined as and , where is an ordered pair. For example, if and , then . The number of elements in the Cartesian product is the product of the number of elements in set and set (for example, if has 3 elements and has 2, then has 6).
Resources
- Course Textbook, pages 101-115