If you have two statement P and Q where P is "x.<.5" and Q is "-2.<=.x".

The statement P and Q. is the set of numbers which satisfies P and Q at the same time. When you write it in set notation the and corresponds to intersection. It would be written as {x.:.x.<.5.and.-1.<=.x} which is the same as {x.:.x.<.5}intersected 
with{x.:.-1.<=.x}. Let's use the number line to visualize this.


       _______________________________________________o_ _ _ _ _ _ _
                         {x : x < 5}                  5


       _ _ _ _ _ _ __________________________________________________
                   -1            {x : -1 <= x}


       _ _ _ _ _ _ ______________________________________ _ _ _ _ _ _
                   -1     {x.:.x.<.5}intersected with{x.:.-1.<=.x}    5


Now the statement P or Q. means the set of numbers which satisfies either P or Q or both of the statements. When it is written in set notation the or corresponds to union. So P or Q. would be written as {x.:.x.<.5.or.-1.<=.x} which is the same as {x.:.x.<.5}unioned with{x.:.-1.<=.x}. Here is what P or Q. looks like on the number line.
       __________________________________________________ _ _ _ _ _ _
                   -1                                  5
       ~~~~~~~~~~~~~~~~~~~~~\ /~~~~~~~~~~~~~~~~~~~~~~~~
                  {x.:.x.<.5}unioned with{x.:.-1.<=.x}


Here is another example:

Let P be the statement x < 0 and Q be the statement x.>.100. Let's start with P or Q. Using the number line we can see:

       ______________o_ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _
       {x : x < 0}   0


       _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _o________________  
                                                 100   {x : x > 100}


       ______________o_ _ _ _ _ _ _ _ _ _ _ _ _ _ _o________________
                   \                                /
                    \                              /
                         {x : x < 0 or x > 100}

Now if we were to try and do P and Q. the number line picture would be:

       _______________o___________________________o________________
                      0                          100 
The set of P and Q. is empty since there is no number that can be both less than 0 and greater than 100 at the same time.

As you can see and. and or. are quite different so make sure that you know the difference between them before continuing.

Return to the tutorial