Often, it is convenient to describe a set by stating a property that members of the set must satisfy.
In such cases, set-builder notation comes to the rescue.
Set-builder notation always has the following general form:
The vertical bar, ‘$\,|\,$’, is read as such that
or with the property that.
For example:
| [beautiful math coming... please be patient] $\{ x\ |\ x\gt 0\}$ | can be read as | the set of all $\,x\,$ with the property that $\,x\,$ is greater than zero |
| [beautiful math coming... please be patient] $\{ x\ |\ x\gt 0\}$ | can be read as | the set of all $\,x\,$ such that $\,x\,$ is greater than zero |
Here's how those words attach themselves to different parts of the sentence:
[beautiful math coming... please be patient]
$$
\overset{\text{the set of all}}{\overbrace{\strut\ \ \{\ \ }}
\overset{\text{ex}}{\overbrace{\strut\ \ x\ \ }}
\underset{\text{with the property that}}{\underbrace{
\overset{\text{such that}}{\overbrace{\strut\ \ |\ \ }}}}
\overset{\text{ex}}{\overbrace{\strut\ \ \ x\ \ }}
\overset{\text{is greater than}}{\overbrace{\strut\ \ \gt\ \ }}\ \
\overset{\text{zero}}{\overbrace{\strut\ \ 0\ \ }}\ \
\}
$$
Notice that the closing brace, ‘$\,\}\,$’, is not verbalized.
It is required, however, since it marks the end of the set structure.
Of course, sets often have different names.
In the example above, the set could alternately be described using
interval notation:
[beautiful math coming... please be patient]
$$
\{ x\ |\ x\gt 0 \} = (0,\infty )
$$
Set-builder notation uses the concept of dummy variable.
Roughly, a dummy variable is just a name
given to something so that we have a way to talk about it;
the name used doesn't affect the result.
Dummy variables are used in
function notation:
‘$\,f(x)= x+2\,$’ describes the rule ‘take a number and add two’.
Here, the dummy variable is $\,x\,$.
‘$\,f(t)=t+2\,$’ also describes the rule ‘take a number and add two’.
Here, the dummy variable is $\,t\,$.
The set
[beautiful math coming... please be patient]
$\,\{x\ |\ x\gt 0\}\,$ can be written, using the dummy variable $\,t\,$, as
[beautiful math coming... please be patient]
$\{t\ |\ t\gt 0\}\,$.
Or, it can be written, using the dummy variable $\,w\,$, as
[beautiful math coming... please be patient]
$\,\{w\ |\ w\gt 0\}\,$.
Of course, it's a good idea to stick to the
normal conventions for naming variables:
for real numbers, use letters near the end of the alphabet; for integers, use letters near the middle of the alphabet.
Addition, ‘$\,+\,$’, is a connective for numbers.
That is, two numbers $\,x\,$ and $\,y\,$ can be connected to get a new number,
[beautiful math coming... please be patient]
$\,x+y\,$.
Similarly, ‘$\,\cup\,$’ (union) and
‘$\,\cap\,$’ (intersection) are connectives for sets; they combine two sets
to give a new set.
Let $\,A\,$ and $\,B\,$ be sets.
The set ‘$\,A\cup B\,$’ is read as ‘$\,A\,$ union $\,B\,$’.
By definition:
[beautiful math coming... please be patient]
$$
A\cup B = \{ x\ |\ x\in A \ \text{ or }\ x\in B\}
$$
(This is the mathematical word ‘or’ being used here.)
Thus, to find $\,A\cup B\,$, you put in everything
from $\,A\,$, and also everything from $\,B\,$.
Venn diagrams are illustrations that are useful for showing the relationship between sets.
In the Venn diagram below, $\,A\,$ is the left circle,
$\,B\,$ is the right circle, and
$\,A\cup B\,$ is shaded.
The set ‘$\,A\cap B\,$’ is read as ‘$\,A\,$ intersect $\,B\,$’.
By definition:
[beautiful math coming... please be patient]
$$
A\cap B = \{ x\ |\ x\in A \ \text{ and }\ x\in B\}
$$
(This is the mathematical word ‘and’ being used here.)
Thus, $\,A\cap B\,$ consists of everything
that is common to both $\,A\,$ and $\,B\,$; i.e.,
the overlap of $\,A\,$ and $\,B\,$.
In the Venn diagram below, the double-hatched (darker) area in the middle is
$\,A\cap B\,$.
Let $\,U\,$ be a set (the universal set), and let
$\,A\,$ be a
subset of $\,U\,$.
The set
[beautiful math coming... please be patient]
$\overline{A}\,$ is read as ‘$\,A\,$ bar’ or ‘the complement of $\,A\,$’
and is defined by:
[beautiful math coming... please be patient]
$$
\overline{A} = \{ x\ |\ x\in U \ \text{ and }\ x\notin A\}
$$
Thus, $\,\overline{A}\,$ is everything that is not in $\,A\,$; it is
everything that is outside of $\,A\,$.
In English, the word complement means to fill out or to make a whole,
and the set $\,\overline{A}\,$ ‘fills out’ the set $\,A\,$ to give all of $\,U\,$.
In the Venn diagram below, the universal set $\,U\,$
is the rectangle, the subset $\,A\,$ is the circle,
and
[beautiful math coming... please be patient]
$\,\overline{A}\,$ is the yellow region inside the rectangle, but
outside the circle.