Difference between revisions of "Unions and Intersections of Sets"
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
== Union of two sets == | == Union of two sets == | ||
− | The union of two sets ''A'' and ''B'' is the set of elements which are in ''A'', in ''B'', or in both ''A'' and ''B''. | + | The union of two sets ''A'' and ''B'' is the set of elements which are in ''A'', in ''B'', or in both ''A'' and ''B''. In symbols, |
− | :<math>A \cup B = \{ x: x \in A \text{ or } x \in B\}</math>. | + | :<math>A \cup B = \{ x: x \in A \text{ or } x \in B\}</math>. |
For example, if ''A'' = {1, 3, 5, 7} and ''B'' = {1, 2, 4, 6, 7} then ''A'' ∪ ''B'' = {1, 2, 3, 4, 5, 6, 7}. A more elaborate example (involving two infinite sets) is: | For example, if ''A'' = {1, 3, 5, 7} and ''B'' = {1, 2, 4, 6, 7} then ''A'' ∪ ''B'' = {1, 2, 3, 4, 5, 6, 7}. A more elaborate example (involving two infinite sets) is: | ||
− | : ''A'' = {''x'' is an even | + | : ''A'' = {''x'' is an even integer larger than 1} |
: ''B'' = {''x'' is an odd integer larger than 1} | : ''B'' = {''x'' is an odd integer larger than 1} | ||
: <math>A \cup B = \{2,3,4,5,6, \dots\}</math> | : <math>A \cup B = \{2,3,4,5,6, \dots\}</math> | ||
− | As another example, the number 9 is ''not'' contained in the union of the set of | + | As another example, the number 9 is ''not'' contained in the union of the set of prime numbers {2, 3, 5, 7, 11, ...} and the set of even numbers {2, 4, 6, 8, 10, ...}, because 9 is neither prime nor even. |
− | Sets cannot have duplicate elements, | + | Sets cannot have duplicate elements, so the union of the sets {1, 2, 3} and {2, 3, 4} is {1, 2, 3, 4}. Multiple occurrences of identical elements have no effect on the cardinality of a set or its contents. |
=== Algebraic properties === | === Algebraic properties === | ||
− | Binary union is an | + | Binary union is an associative operation; that is, for any sets ''A'', ''B'', and ''C'', |
:<math>A \cup (B \cup C) = (A \cup B) \cup C.</math> | :<math>A \cup (B \cup C) = (A \cup B) \cup C.</math> | ||
− | Thus the parentheses may be omitted without ambiguity: either of the above can be written as ''A'' ∪ ''B'' ∪ ''C''. Also, union is | + | Thus the parentheses may be omitted without ambiguity: either of the above can be written as ''A'' ∪ ''B'' ∪ ''C''. Also, union is commutative, so the sets can be written in any order. |
− | The | + | The empty set is an identity element for the operation of union. That is, ''A'' ∪ ∅ = ''A'', for any set ''A.'' Also, the union operation is idempotent: ''A'' ∪ ''A'' = ''A''. All these properties follow from analogous facts about logical disjunction. |
Intersection distributes over union | Intersection distributes over union | ||
:<math>A \cap (B \cup C) = (A \cap B)\cup(A \cap C)</math> | :<math>A \cap (B \cup C) = (A \cap B)\cup(A \cap C)</math> | ||
and union distributes over intersection | and union distributes over intersection | ||
− | :<math>A \cup (B \cap C) = (A \cup B) \cap (A \cup C).</math | + | :<math>A \cup (B \cap C) = (A \cup B) \cap (A \cup C).</math> |
− | The | + | The power set of a set ''U'', together with the operations given by union, intersection, and complementation, is a Boolean algebra. In this Boolean algebra, union can be expressed in terms of intersection and complementation by the formula |
:<math>A \cup B = \left(A^\text{c} \cap B^\text{c} \right)^\text{c},</math> | :<math>A \cup B = \left(A^\text{c} \cap B^\text{c} \right)^\text{c},</math> | ||
− | where the superscript <math>{}^\text{c}</math> denotes the complement in the | + | where the superscript <math>{}^\text{c}</math> denotes the complement in the universal set ''U''. |
=== Finite unions === | === Finite unions === | ||
One can take the union of several sets simultaneously. For example, the union of three sets ''A'', ''B'', and ''C'' contains all elements of ''A'', all elements of ''B'', and all elements of ''C'', and nothing else. Thus, ''x'' is an element of ''A'' ∪ ''B'' ∪ ''C'' if and only if ''x'' is in at least one of ''A'', ''B'', and ''C''. | One can take the union of several sets simultaneously. For example, the union of three sets ''A'', ''B'', and ''C'' contains all elements of ''A'', all elements of ''B'', and all elements of ''C'', and nothing else. Thus, ''x'' is an element of ''A'' ∪ ''B'' ∪ ''C'' if and only if ''x'' is in at least one of ''A'', ''B'', and ''C''. | ||
− | A '''finite union''' is the union of a finite number of sets; the phrase does not imply that the union set is a | + | A '''finite union''' is the union of a finite number of sets; the phrase does not imply that the union set is a finite set. |
=== Arbitrary unions === | === Arbitrary unions === | ||
− | The most general notion is the union of an arbitrary collection of sets, sometimes called an ''infinitary union''. If '''M''' is a set or | + | The most general notion is the union of an arbitrary collection of sets, sometimes called an ''infinitary union''. If '''M''' is a set or class whose elements are sets, then ''x'' is an element of the union of '''M''' if and only if there is at least one element ''A'' of '''M''' such that ''x'' is an element of ''A''. In symbols: |
: <math>x \in \bigcup \mathbf{M} \iff \exists A \in \mathbf{M},\ x \in A.</math> | : <math>x \in \bigcup \mathbf{M} \iff \exists A \in \mathbf{M},\ x \in A.</math> | ||
This idea subsumes the preceding sections—for example, ''A'' ∪ ''B'' ∪ ''C'' is the union of the collection {''A'', ''B'', ''C''}. Also, if '''M''' is the empty collection, then the union of '''M''' is the empty set. | This idea subsumes the preceding sections—for example, ''A'' ∪ ''B'' ∪ ''C'' is the union of the collection {''A'', ''B'', ''C''}. Also, if '''M''' is the empty collection, then the union of '''M''' is the empty set. | ||
=== Notations === | === Notations === | ||
− | The notation for the general concept can vary considerably. For a finite union of sets <math>S_1, S_2, S_3, \dots , S_n</math> one often writes <math>S_1 \cup S_2 \cup S_3 \cup \dots \cup S_n</math> or <math>\bigcup_{i=1}^n S_i</math>. Various common notations for arbitrary unions include <math>\bigcup \mathbf{M}</math>, <math>\bigcup_{A\in\mathbf{M}} A</math>, and <math>\bigcup_{i\in I} A_{i}</math>. The last of these notations refers to the union of the collection <math>\left\{A_i : i \in I\right\}</math>, where ''I'' is an | + | The notation for the general concept can vary considerably. For a finite union of sets <math>S_1, S_2, S_3, \dots , S_n</math> one often writes <math>S_1 \cup S_2 \cup S_3 \cup \dots \cup S_n</math> or <math>\bigcup_{i=1}^n S_i</math>. Various common notations for arbitrary unions include <math>\bigcup \mathbf{M}</math>, <math>\bigcup_{A\in\mathbf{M}} A</math>, and <math>\bigcup_{i\in I} A_{i}</math>. The last of these notations refers to the union of the collection <math>\left\{A_i : i \in I\right\}</math>, where ''I'' is an index set and <math>A_i</math> is a set for every <math>i \in I</math>. In the case that the index set ''I'' is the set of natural numbers, one uses the notation <math>\bigcup_{i=1}^{\infty} A_{i}</math>, which is analogous to that of the infinite sums in series. |
When the symbol "∪" is placed before other symbols (instead of between them), it is usually rendered as a larger size. | When the symbol "∪" is placed before other symbols (instead of between them), it is usually rendered as a larger size. | ||
Line 54: | Line 54: | ||
[[File:Venn0001.svg|thumb|The intersection of two sets <math>A</math> and <math>B,</math> represented by circles. <math>A \cap B</math> is in red.]] | [[File:Venn0001.svg|thumb|The intersection of two sets <math>A</math> and <math>B,</math> represented by circles. <math>A \cap B</math> is in red.]] | ||
− | The '''intersection''' of two | + | The '''intersection''' of two sets <math>A</math> and <math>B,</math> denoted by <math>A \cap B,</math> is the set containing all elements of <math>A</math> that also belong to <math>B</math> or equivalently, all elements of <math>B</math> that also belong to <math>A.</math> |
=== Notation and terminology === | === Notation and terminology === | ||
− | Intersection is written using the symbol "<math>\cap</math>" between the terms; that is, in | + | Intersection is written using the symbol "<math>\cap</math>" between the terms; that is, in infix notation. For example: |
<math display=block>\{1,2,3\}\cap\{2,3,4\}=\{2,3\}</math> | <math display=block>\{1,2,3\}\cap\{2,3,4\}=\{2,3\}</math> | ||
<math display=block>\{1,2,3\}\cap\{4,5,6\}=\varnothing</math> | <math display=block>\{1,2,3\}\cap\{4,5,6\}=\varnothing</math> | ||
Line 65: | Line 65: | ||
The intersection of more than two sets (generalized intersection) can be written as: | The intersection of more than two sets (generalized intersection) can be written as: | ||
<math display=block>\bigcap_{i=1}^n A_i</math> | <math display=block>\bigcap_{i=1}^n A_i</math> | ||
− | which is similar to | + | which is similar to capital-sigma notation. |
− | For an explanation of the symbols used in this article, refer to the | + | For an explanation of the symbols used in this article, refer to the table of mathematical symbols. |
===Definition=== | ===Definition=== | ||
[[File:Venn 0000 0001.svg|thumb|Intersection of three sets:<br><math>~A \cap B \cap C</math>]] | [[File:Venn 0000 0001.svg|thumb|Intersection of three sets:<br><math>~A \cap B \cap C</math>]] | ||
− | [[File:Venn diagram gr la ru.svg|thumb|Intersections of the unaccented modern | + | [[File:Venn diagram gr la ru.svg|thumb|Intersections of the unaccented modern Greek, Latin, and Cyrillic scripts, considering only the shapes of the letters and ignoring their pronunciation]] |
[[File:PolygonsSetIntersection.svg|thumb|Example of an intersection with sets]] | [[File:PolygonsSetIntersection.svg|thumb|Example of an intersection with sets]] | ||
− | The intersection of two sets <math>A</math> and <math>B,</math> denoted by <math>A \cap B</math>, | + | The intersection of two sets <math>A</math> and <math>B,</math> denoted by <math>A \cap B</math>, is the set of all objects that are members of both the sets <math>A</math> and <math>B.</math> |
In symbols: | In symbols: | ||
<math display=block>A \cap B = \{ x: x \in A \text{ and } x \in B\}.</math> | <math display=block>A \cap B = \{ x: x \in A \text{ and } x \in B\}.</math> | ||
− | That is, <math>x</math> is an element of the intersection <math>A \cap B</math> | + | That is, <math>x</math> is an element of the intersection <math>A \cap B</math> if and only if <math>x</math> is both an element of <math>A</math> and an element of <math>B.</math> |
For example: | For example: | ||
* The intersection of the sets {1, 2, 3} and {2, 3, 4} is {2, 3}. | * The intersection of the sets {1, 2, 3} and {2, 3, 4} is {2, 3}. | ||
− | * The number 9 is | + | * The number 9 is ''not'' in the intersection of the set of prime numbers {2, 3, 5, 7, 11, ...} and the set of odd numbers {1, 3, 5, 7, 9, 11, ...}, because 9 is not prime. |
===Intersecting and disjoint sets=== | ===Intersecting and disjoint sets=== | ||
− | We say that | + | We say that ''<math>A</math> intersects (meets) <math>B</math>'' if there exists some <math>x</math> that is an element of both <math>A</math> and <math>B,</math> in which case we also say that \\<math>A</math> intersects (meets) <math>B</math> '''at''' <math>x</math>''. Equivalently, <math>A</math> intersects <math>B</math> if their intersection <math>A \cap B</math> is an ''inhabited set'', meaning that there exists some <math>x</math> such that <math>x \in A \cap B.</math> |
− | We say that | + | We say that ''<math>A</math> and <math>B</math> are disjoint'' if <math>A</math> does not intersect <math>B.</math> In plain language, they have no elements in common. <math>A</math> and <math>B</math> are disjoint if their intersection is empty, denoted <math>A \cap B = \varnothing.</math> |
− | For example, the sets <math>\{1, 2\}</math> and <math>\{3, 4\}</math> are disjoint, while the set of even numbers intersects the set of | + | For example, the sets <math>\{1, 2\}</math> and <math>\{3, 4\}</math> are disjoint, while the set of even numbers intersects the set of multiples of 3 at the multiples of 6. |
=== Algebraic properties === | === Algebraic properties === | ||
− | Binary intersection is an | + | Binary intersection is an associative operation; that is, for any sets <math>A, B,</math> and <math>C,</math> one has |
− | <math display="block">A \cap (B \cap C) = (A \cap B) \cap C.</math>Thus the parentheses may be omitted without ambiguity: either of the above can be written as <math>A \cap B \cap C</math>. Intersection is also | + | <math display="block">A \cap (B \cap C) = (A \cap B) \cap C.</math>Thus the parentheses may be omitted without ambiguity: either of the above can be written as <math>A \cap B \cap C</math>. Intersection is also commutative. That is, for any <math>A</math> and <math>B,</math> one has<math display="block">A \cap B = B \cap A.</math> |
− | The intersection of any set with the | + | The intersection of any set with the empty set results in the empty set; that is, that for any set <math>A</math>, |
<math display="block">A \cap \emptyset = \emptyset</math> | <math display="block">A \cap \emptyset = \emptyset</math> | ||
− | Also, the intersection operation is | + | Also, the intersection operation is idempotent; that is, any set <math>A</math> satisfies that <math>A \cap A = A</math>. All these properties follow from analogous facts about logical conjunction. |
− | Intersection | + | Intersection distributes over union and union distributes over intersection. That is, for any sets <math>A, B,</math> and <math>C,</math> one has |
<math display="block">\begin{align} | <math display="block">\begin{align} | ||
A \cap (B \cup C) = (A \cap B) \cup (A \cap C) \\ | A \cap (B \cup C) = (A \cap B) \cup (A \cap C) \\ | ||
A \cup (B \cap C) = (A \cup B) \cap (A \cup C) | A \cup (B \cap C) = (A \cup B) \cap (A \cup C) | ||
\end{align}</math> | \end{align}</math> | ||
− | Inside a universe <math>U,</math> one may define the | + | Inside a universe <math>U,</math> one may define the complement <math>A^c</math> of <math>A</math> to be the set of all elements of <math>U</math> not in <math>A.</math> Furthermore, the intersection of <math>A</math> and <math>B</math> may be written as the complement of the union of their complements, derived easily from de Morgan's laws:<math display="block">A \cap B = \left(A^{c} \cup B^{c}\right)^c</math> |
===Arbitrary intersections=== | ===Arbitrary intersections=== | ||
− | The most general notion is the intersection of an arbitrary | + | The most general notion is the intersection of an arbitrary ''nonempty'' collection of sets. |
− | If <math>M</math> is a | + | If <math>M</math> is a nonempty set whose elements are themselves sets, then <math>x</math> is an element of the ''intersection'' of <math>M</math> if and only if for every element <math>A</math> of <math>M,</math> <math>x</math> is an element of <math>A.</math> |
In symbols: | In symbols: | ||
<math display=block>\left( x \in \bigcap_{A \in M} A \right) \Leftrightarrow \left( \forall A \in M, \ x \in A \right).</math> | <math display=block>\left( x \in \bigcap_{A \in M} A \right) \Leftrightarrow \left( \forall A \in M, \ x \in A \right).</math> | ||
− | The notation for this last concept can vary considerably. | + | The notation for this last concept can vary considerably. Set theorists will sometimes write "<math>\cap M</math>", while others will instead write "<math>\cap_{A \in M} A</math>". |
The latter notation can be generalized to "<math>\cap_{i \in I} A_i</math>", which refers to the intersection of the collection <math>\left\{ A_i : i \in I \right\}.</math> | The latter notation can be generalized to "<math>\cap_{i \in I} A_i</math>", which refers to the intersection of the collection <math>\left\{ A_i : i \in I \right\}.</math> | ||
Here <math>I</math> is a nonempty set, and <math>A_i</math> is a set for every <math>i \in I.</math> | Here <math>I</math> is a nonempty set, and <math>A_i</math> is a set for every <math>i \in I.</math> | ||
− | In the case that the | + | In the case that the index set <math>I</math> is the set of natural numbers, notation analogous to that of an infinite product may be seen: |
<math display=block>\bigcap_{i=1}^{\infty} A_i.</math> | <math display=block>\bigcap_{i=1}^{\infty} A_i.</math> | ||
− | When formatting is difficult, this can also be written "<math>A_1 \cap A_2 \cap A_3 \cap \cdots</math>". This last example, an intersection of countably many sets, is actually very common; for an example, see the article on | + | When formatting is difficult, this can also be written "<math>A_1 \cap A_2 \cap A_3 \cap \cdots</math>". This last example, an intersection of countably many sets, is actually very common; for an example, see the article on σ-algebras. |
===Nullary intersection=== | ===Nullary intersection=== | ||
− | [[File:Multigrade operator AND.svg|thumb | + | [[File:Multigrade operator AND.svg|thumb|Conjunctions of the arguments in parentheses<br><br>The conjunction of no argument is the tautology (compare: empty product); accordingly the intersection of no set is the universe.]] |
− | Note that in the previous section, we excluded the case where <math>M</math> was the | + | Note that in the previous section, we excluded the case where <math>M</math> was the empty set (<math>\varnothing</math>). The reason is as follows: The intersection of the collection <math>M</math> is defined as the set (see set-builder notation) |
<math display=block>\bigcap_{A \in M} A = \{x : \text{ for all } A \in M, x \in A\}.</math> | <math display=block>\bigcap_{A \in M} A = \{x : \text{ for all } A \in M, x \in A\}.</math> | ||
− | If <math>M</math> is empty, there are no sets <math>A</math> in <math>M,</math> so the question becomes "which <math>x</math><nowiki>'</nowiki>s satisfy the stated condition?" The answer seems to be | + | If <math>M</math> is empty, there are no sets <math>A</math> in <math>M,</math> so the question becomes "which <math>x</math><nowiki>'</nowiki>s satisfy the stated condition?" The answer seems to be ''every possible <math>x</math>''. When <math>M</math> is empty, the condition given above is an example of a vacuous truth. So the intersection of the empty family should be the universal set (the identity element for the operation of intersection), but in standard (ZF) set theory, the universal set does not exist. |
− | but in standard ( | ||
− | In | + | In type theory however, <math>x</math> is of a prescribed type <math>\tau,</math> so the intersection is understood to be of type <math>\mathrm{set}\ \tau</math> (the type of sets whose elements are in <math>\tau</math>), and we can define <math>\bigcap_{A \in \empty} A</math> to be the universal set of <math>\mathrm{set}\ \tau</math> (the set whose elements are exactly all terms of type <math>\tau</math>). |
==Licensing== | ==Licensing== | ||
Content obtained and/or adapted from: | Content obtained and/or adapted from: | ||
* [https://en.wikipedia.org/wiki/Union_(set_theory) Union (set theory)] under a CC BY-SA license | * [https://en.wikipedia.org/wiki/Union_(set_theory) Union (set theory)] under a CC BY-SA license | ||
+ | * [https://en.wikipedia.org/wiki/Intersection_(set_theory) Intersection (set theory)] under a CC BY-SA license |
Latest revision as of 13:43, 16 November 2021
Contents
Union of two sets
The union of two sets A and B is the set of elements which are in A, in B, or in both A and B. In symbols,
- .
For example, if A = {1, 3, 5, 7} and B = {1, 2, 4, 6, 7} then A ∪ B = {1, 2, 3, 4, 5, 6, 7}. A more elaborate example (involving two infinite sets) is:
- A = {x is an even integer larger than 1}
- B = {x is an odd integer larger than 1}
As another example, the number 9 is not contained in the union of the set of prime numbers {2, 3, 5, 7, 11, ...} and the set of even numbers {2, 4, 6, 8, 10, ...}, because 9 is neither prime nor even.
Sets cannot have duplicate elements, so the union of the sets {1, 2, 3} and {2, 3, 4} is {1, 2, 3, 4}. Multiple occurrences of identical elements have no effect on the cardinality of a set or its contents.
Algebraic properties
Binary union is an associative operation; that is, for any sets A, B, and C,
Thus the parentheses may be omitted without ambiguity: either of the above can be written as A ∪ B ∪ C. Also, union is commutative, so the sets can be written in any order. The empty set is an identity element for the operation of union. That is, A ∪ ∅ = A, for any set A. Also, the union operation is idempotent: A ∪ A = A. All these properties follow from analogous facts about logical disjunction.
Intersection distributes over union
and union distributes over intersection
The power set of a set U, together with the operations given by union, intersection, and complementation, is a Boolean algebra. In this Boolean algebra, union can be expressed in terms of intersection and complementation by the formula
where the superscript denotes the complement in the universal set U.
Finite unions
One can take the union of several sets simultaneously. For example, the union of three sets A, B, and C contains all elements of A, all elements of B, and all elements of C, and nothing else. Thus, x is an element of A ∪ B ∪ C if and only if x is in at least one of A, B, and C.
A finite union is the union of a finite number of sets; the phrase does not imply that the union set is a finite set.
Arbitrary unions
The most general notion is the union of an arbitrary collection of sets, sometimes called an infinitary union. If M is a set or class whose elements are sets, then x is an element of the union of M if and only if there is at least one element A of M such that x is an element of A. In symbols:
This idea subsumes the preceding sections—for example, A ∪ B ∪ C is the union of the collection {A, B, C}. Also, if M is the empty collection, then the union of M is the empty set.
Notations
The notation for the general concept can vary considerably. For a finite union of sets one often writes or . Various common notations for arbitrary unions include , , and . The last of these notations refers to the union of the collection , where I is an index set and is a set for every . In the case that the index set I is the set of natural numbers, one uses the notation , which is analogous to that of the infinite sums in series.
When the symbol "∪" is placed before other symbols (instead of between them), it is usually rendered as a larger size.
Intersection of two sets
The intersection of two sets and denoted by is the set containing all elements of that also belong to or equivalently, all elements of that also belong to
Notation and terminology
Intersection is written using the symbol "" between the terms; that is, in infix notation. For example:
For an explanation of the symbols used in this article, refer to the table of mathematical symbols.
Definition
The intersection of two sets and denoted by , is the set of all objects that are members of both the sets and In symbols:
That is, is an element of the intersection if and only if is both an element of and an element of
For example:
- The intersection of the sets {1, 2, 3} and {2, 3, 4} is {2, 3}.
- The number 9 is not in the intersection of the set of prime numbers {2, 3, 5, 7, 11, ...} and the set of odd numbers {1, 3, 5, 7, 9, 11, ...}, because 9 is not prime.
Intersecting and disjoint sets
We say that intersects (meets) if there exists some that is an element of both and in which case we also say that \\ intersects (meets) at . Equivalently, intersects if their intersection is an inhabited set, meaning that there exists some such that
We say that and are disjoint if does not intersect In plain language, they have no elements in common. and are disjoint if their intersection is empty, denoted
For example, the sets and are disjoint, while the set of even numbers intersects the set of multiples of 3 at the multiples of 6.
Algebraic properties
Binary intersection is an associative operation; that is, for any sets and one has
Intersection distributes over union and union distributes over intersection. That is, for any sets and one has
Arbitrary intersections
The most general notion is the intersection of an arbitrary nonempty collection of sets. If is a nonempty set whose elements are themselves sets, then is an element of the intersection of if and only if for every element of is an element of In symbols:
The notation for this last concept can vary considerably. Set theorists will sometimes write "", while others will instead write "". The latter notation can be generalized to "", which refers to the intersection of the collection Here is a nonempty set, and is a set for every
In the case that the index set is the set of natural numbers, notation analogous to that of an infinite product may be seen:
When formatting is difficult, this can also be written "". This last example, an intersection of countably many sets, is actually very common; for an example, see the article on σ-algebras.
Nullary intersection
Note that in the previous section, we excluded the case where was the empty set (). The reason is as follows: The intersection of the collection is defined as the set (see set-builder notation)
In type theory however, is of a prescribed type so the intersection is understood to be of type (the type of sets whose elements are in ), and we can define to be the universal set of (the set whose elements are exactly all terms of type ).
Licensing
Content obtained and/or adapted from:
- Union (set theory) under a CC BY-SA license
- Intersection (set theory) under a CC BY-SA license