Sets

A mathematical set is a collection of distinct objects, such as numbers, letters, shapes, or functions. The objects in a set are called its elements or members. Sets can be defined by listing their elements between curly braces, or by using a rule or a description that specifies the criteria for membership.

The set {1, 2, 3} contains only the numbers 1, 2, and 3 as its elements.

The set {x : x2} contains square numbers as its elements.


Set Notation

 

1

Common Sets

 

2

3

4

5

6

7

all sets

Examples

List the sets defined by

8

9

10

11

 

Venn Diagrams

Venn diagrams are graphical representations of the relationships between sets of elements. U represents the Universal set

A U B : The union of sets A and B

union

The joining of sets A and B

 

A ∩ B The intersection of sets A and B

intersect

The elements that are in both A and B

 

 

A C B The complement of B ( aka B')

comp

The elements not in set B

 

A - B The difference of A and B

diff

The elements in Set A that are not in set B

 

Mutually exclusive : can't happen at same time

mutex

 

Not just two sets!

3

 

Example

50 people were asked if they had dogs or cats

cat

27 people had dogs , 30 people had cats, 5 people didn't have dogs or cats at all.

15 people had dogs only, 18 people had cats only, 12 people had dogs and cats ,

Let set A be dogs and set B be cats

A U B : Union of dogs and cats : 15 +12 +18 = 45

A ∩ B :Intersection of dogs and cats : 12

A C B : The complement of cats , so 50 - 30 = 20

B C A : The complement of dogs , so 50 - 27 = 23

Example

A survey of pet owners is shown as a venn diagram

  1. How many people had fish ?
  2. How many people had both Dogs and Fish only ?
  3. How many people took part in the survey ?

fish

  1. 12 +3+ 5 + 7 = 27 people had fish
  2. 3 people had both dogs and fish only.
  3. 16+8+18+3+5+7+12 =69 people took part in the survey.

Probability and Venn Diagrams

Example

A survey was carried out on a sample of 120 pupils :-

Complete the Venn diagram to illustrate the results and calculate the probability that a pupil selected at random likes both chocolate and cake.

cake

Firstly, 31 pupils like all 3 options - so 31 can be written in the intersection of the 3 options. The 20 pupils who didn't like any of the options re shown outside the circles .

cake2

57 pupils like chocolate and sweets, 31 of these have already been accounted for - so 26 can be written in the intersection between chocolate and sweets.

cake2

Similarly, 46 pupils like both sweets and cake - so 15 can be written in the intersection between cake and sweets.

 

cake3

78 pupils like sweets, 15 + 31 + 26 = 72, so 6 must be be written in the sweets only part of the venn diagram.

 

cake4

There are now 3 sections left, cake only, cake and chocolate, chocolate only.

Let x = no of pupils who like cake only.
Let y = no of pupils who like cake and chocolate only.
z = no of pupils who like chocolate only

 

cake6

Out of the 120 pupils, 20 didn't like any of the options, so 100 pupils like at least one of the options.

so x + y + z +15+31+26+6 =100 → x + y + z + 78 =100 → x + y +z =22

53 pupils like cake so x + y +15 +31 = 53 → x + y = 7

Substituting x + y = 7 into x + y + z = 22 →7 + z =22 → z =15

15 pupils like chocolate only

cake7

74 pupils like chocolate, so y + z +31+ 26 = 74 → y + z = 17

but z = 15 so y + 15 = 17 → y = 2

33 pupils like cake and chocolate.

cake8

x + y +z =22 → x + 2 + 15 = 22 → x = 22 -17→ x = 5

5 pupils like cake only.

cake9

Finally, the probability that a pupil likes chocolate and cake is 33 /120 =0.275 = 27.5%

 

Functions

A function consists of two sets, the domain and codomain,
and a rule which maps each element of the domain
 to exactly one element in the codomain.

The Domain is the set of input numbers,
the Codomain is the set of possible output numbers,
the Range is the set of actual output images.

Example

2

so

12

Example

13

14

15

 

Example

16

17

18

 

Example

19

20

21 22

23 24

25

 

 

 

© Alexander Forrest