44
1 Section 2.3 Set Operations and Cartesian Products A B Intersections of Sets The intersection of Set A and B, written is the set of elements common to both A and B. {/ } A B xx A and x B

1 Section 2.3 Set Operations and Cartesian Products Intersections of Sets The intersection of Set A and B, written is the set of elements common to both

Embed Size (px)

Citation preview

1

Section 2.3 Set Operations and Cartesian Products

A B

Intersections of Sets

The intersection of Set A and B, written is the set of elements common to both

A and B.

{ / }A B x x A and x B

2

ExampleSuppose we have two candidates, Mr. Brown and Mr.

Green running for a city office.

A voter decided for whom she should vote by recalling their campaign promises.

Mr. Green Mr. BrownSpend less money, m

Emphasize traffic law enforcement, t

Increase services to suburban areas, s

Spend less money, m

Crack down on crooked politicians, p

Increase services to city, c

3

Mr. Green Mr. Brown

Spend less money, m

Emphasize traffic law enforcement, t

Increase services to suburban areas, s

Spend less money, m

Crack down on crooked politicians, p

Increase services to city, c

Lets look at each candidates promises as a set.

Mr. Green’s set = { m,t,s}

Mr. Brown’s set = { m,p,c}

The only element common to both sets is m, this is the intersection of both sets.

4

To represent the sets as a Venn Diagram

T

S

P

CM

Mr. Green

Mr. Brown

5

Find the intersection of the given sets

• A) { 3,4,5,6,7} and {4,6,8,10}– Elements common to both sets:

{ 3,4,5,6,7} {4,6,8,10} = {4,6}

B) { 9,14,25,30} {10,17,19,38,52}

{ 9,14,25,30} {10,17,19,38,52} =

6

• C) { 5,9,11} and

• { 5,9,11} =

• Sets with no elements in common are called

disjoint sets

A set of dogs and a set of cats are disjoint sets

DOGS CATS

7

Union of Sets

• Form the union of sets A and B by taking all the elements of set A and including all the elements of set B.

T

S

P

C

A B

Set A Set B

M

8

Union of Sets

The union of sets A and B, written

A B, is the set of all elements

belonging to either of the sets, or

A B = { x | x A or x B}

9

Find the union of the sets• A) { 2,4,6} and {4,6,8,10,12}

– Answer: { 2,4,6} {4,6,8,10,12} =

{2,4,6,8,10,12}

• B) { a,b,c,d} and { c, f, g} – Answer: {a,b,c,d,f,g}

• C) {3,4,5} and – Answer: {3,4,5}

10

More examples• U = { 1,2,3,4,5,6,9}

– A = { 1,2,3,4}– B = { 2,4,6}– C = { 1,3,6,9}

• Find

'

' {5,6,9}

' The set of elements belonging to A' and B.

' {5,6,9} {2,4,6} {6}

A B

A

A B

A B

'A B

11

• Find ' 'B C

' {1,3,5,9}

' {2,4,5}

' ' {1,2,3,4,5,9}

B

C

B C

12

Find A (B C') • Answer:

Find the inside set of parentheses:

B C' = {2,4,6} {2,4,5} =

Now find the intersection A of this set with B C'.

A (B C') = A {2,4,5,6}

= {1,2,3,4} {2

{2

,4

,4,5

,5,6}

,

6}

= {2,4}

13

(A' C') B'Find

14

Try to describe the following sets in words:

• 1. A (B C') The set of all elements that are in A, and are in B or not in C.

2. (A' C') B'The set of all elements that are not in A or not in C, and are not in B.

15

Differences of Sets

• Let Set A = { 1,2,3,4,5,6,7,8,9,10}• Let Set B = { 2,4,6,8,10}

• If the elements from B are taken away from Set A

• then Set C = {1,3,5,7,9}

• Set C is the difference of sets A and B.

16

Difference of Sets

The difference of sets A and B, written

A – B is the set of all elements belonging to set A and not to set B, or

A - B = {x | x A and x B}

17

A - B

A B

Since x B is the same as x B' , then

A-B can be described as

{x | x A and x B'} or A B'

18

Examples

• Let U = {1,2,3,4,5,6,7}– A = {1,2,3,4,5,6}– B = { 2,3,6}– C = {3,5,7}

• Find1. A – B

2. B – A

3. (A – B) C '

19

Let U = {1,2,3,4,5,6,7}A = {1,2,3,4,5,6}B = { 2,3,6}C = {3,5,7}

Find A – B

• Begin with set A and exclude any elements found also in set B.

• So A – B = {1,2,3,4,5,6} – { 2,3,6 } = {1,4,5}

20

Let U = {1,2,3,4,5,6,7}A = {1,2,3,4,5,6}B = { 2,3,6}C = {3,5,7}

Find B – A

For B-A an element must be in set B and not in set A.

But all elements of B are in A, so B-A =

• {2,3,6} – {1,2,3,4,5,6} =

B A2,3,6 1,4,

5

21

Let U = {1,2,3,4,5,6,7}A = {1,2,3,4,5,6}B = { 2,3,6}C = {3,5,7}

Find (A – B)

We know A – B = {1,4,5}

And C’ = { 1,2,4,6}

So (A – B) = { 1,2,4,5,6}

In general A – B does not equal B - A

C '

C '

22

Writing ordered pairs

• In set notation {4,5} = {5,4}• There are many instances in math where order

matters. So we write ordered pairs using parentheses.

• Ordered Pairs:• In the ordered pair (a,b), a is called the first

component and b is called the second component.

• In general (a,b) (b,a).

23

Ordered Pairs

• Two ordered pairs (a,b) and (c,d) are equal if their first components are equal and if their second components are equal.

• So (a,b) = (c,d) if and only if a = c and b=d.

• True or false: (4,7) = (7,4)

24

Cartesian Product of Sets

• A set may contain ordered pairs as elements.

• If A and B are sets, then each element of A can be paired with an element of B.

• The set of all ordered pairs is known as the Cartesian Product of A and B.

• Written A X B.

25

Exercises

• Find • A X B =

• B X A =

• A X A =

For Set A = {1,5,9} and B = { 6,7}

{(1,6),(1,7),(5,6),(5,7),(9,6),(9,7)}

{(6,1),(6,5),(6,9),(7,1),(7,5),(7,9)}

{(1,1),(1,5),(1,9),(5,1),(5,5),(5,9),(9,1),(9,5),(9,9)}

26

Cardinal Number of a Cartesian Product

( ) ( ) ,

( ) ( )

( ) ( ) ( ) ( )

If n A a and n B b

then n A X B n B X A

n A X n B n B X n A ab

For example:

Set A = {1,2,3}, then n(A) =

Set B = {4,5}, then n(B)=

3

2

So, n(A) X n(B) = 3x2 = 6

AXB= {(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)}

27

Set Operations

• Let A and B be any sets, with U the universal set.

• The complement of A, written A’ is

' { | and }A x x U x A

U

A’

A

28

The intersection of A and B is

{ | and }A B x x A x B

U

AB

29

The Union of A and B is

{ | or }A B x x A x B

U

AB

30

The Difference of A – B is

{ | and }A B x x A x B

U

AB

31

The Cartesian Product of A and B is

{( , ) | and }A X B x y x A y B

32

Regions of Venn Diagrams

U

AB

1

3

4

2

Region 1: Elements outside of set A and Set B.

Region 2: Elements belong to A but not to B

Region 3: Elements belonging to both A and B

Region 4: Elements belong to B but not to A

U

AB

1

3

4

2

33

Example

Let U = {q,r,s,t,u,v,w,x,y,z}

Let A = {r,s,t,u,v}

Let B = {t,v,x}

Place the elements in their proper regions.

U

AB

1

3

4

2t,

v

x

r, s, u

q, w, y, z

First find intersection points

What elements belong to B and A?

What elements belong to U?

34

Venn Diagram

• Represent three sets.

• Let A, B and C be sets

U

AB

C

1

3

24

5

6

7

8

35

Exercises

• Shade the set

( ' ')A B C

Is the statement true

( ) ' ' 'A B A B

36

Use the Venn Diagram

1

U

24

AB

33

A B

( ) 'A BRegion 1,2,4

Region 3

Region 1,4

'A

'BRegion 1,2

' 'A BRegion 1,2,4

37

De Morgan’s Laws

• For any sets A and B,

( ) ' ' ' and ( ) ' ' 'A B A B A B A B

38

Section 2.4Cardinal Numbers and Surveys

• Suppose we have this data from a survey – 33 people like Tim McGraw– 32 favor Celine Dion– 28 favor Britney Spears– 11 favor Tim and Celine– 15 favor Tim and Britney– 5 like all performers– 7 like non of the performers

• Can we determine the total number of people surveyed from the data.

39

U

Tim

Mc Graw

BritneySpears

Celine Dion

a

b

c

d

e

f

g

h

10

4

9

12

5

6

12

7

First look at intersection region d – 5 who like all three singers

7 like non

Region a

11 like Tim and Celine

Put them in regions d and e

11-5=6 for region e

15 like Britney and Tim

Regions c and d

15 -5 = 10 region c

Region b

33-10-5-6=12

Region g

14 like Britney and Celine

14-5=9

Region h

28-10-5-9= 4

Region f

32-6-5-9=12

To find out how many students were surveyed – Add numbers in all the regions - 65

40

Cardinal Number Formula

• For any two sets A and B

( ) ( ) ( ) ( )n A B n A n B n A B

41

Find n(A)

• Try this

Find ( ) if ( ) 22, ( ) 8,

and ( ) 12.

n A n A B n A B

n B

Use the formula:

( ) ( ) ( ) ( )n A B n A n B n A B

Rearrange the formula to find n(A)

42

Find ( ) if ( ) 22, ( ) 8,

and ( ) 12.

n A n A B n A B

n B

use the formula:

n(A B)= n(A) + n(B) - n(A B)

Rearrange the formula

n(A) = n(A B) - n(B) + n(A B)

n(A) = 22 -12 + 8

= 18

43

• Some utility company has 100 employees with – T = set of employees who can cut trees– P = set of employees who can climb poles– W = set of employees who can splice wires

( ) 45 n( ) 20

( ) 50 ( ) 25

( ) 57 ( ) 11

( ) 28 ( ' ' ') 9

n T P W

n P n T W

n W n T P W

n T P n T P W

U

TP

W

11

9

14

173

23

13

44

Homework

• Section 2.3 odd only

• 7-28,41-54,55-96,97,101,105,109,117,127

• Section 2.4 odd

• 1-16,17