Example 1
Question: Let \( A = \{2, 3, 4, 5\} \), \( B = \{3, 6, 7, 10, 12, 15\} \), and \( g = \{(2, 6), (3, 3), (4, 12), (3, 7), (5, 15)\} \). Is \( g \) a function from \( A \) to \( B \)? Justify your answer.
Solution: To check whether \( g \) is a function from \( A \) to \( B \), we verify two conditions: Condition 1 — Every element of \( A \) must have at least one image in \( B \). Looking at the first components of the ordered pairs in \( g \): we have \( 2, 3, 4, 3, 5 \). All four elements \( 2, 3, 4, 5 \) of \( A \) appear. So this condition is satisfied. Condition 2 — No element of \( A \) should have more than one image in \( B \). We observe that the element \( 3 \in A \) appears in two ordered pairs: \( (3, 3) \) and \( (3, 7) \). This means 3 is mapped to both 3 and 7, which are two different elements of \( B \). Since the element \( 3 \in A \) has two distinct images \( 3 \) and \( 7 \) in \( B \), the uniqueness condition for a function is violated. Therefore, \( g \) is NOT a function from \( A \) to \( B \).
Answer: No, g is not a function from A to B, because the element 3 in A has two images (3 and 7) in B.
Example 2
Question: Let \( P = \{a, b, c, d\} \), \( Q = \{1, 2, 3, 4, 5\} \), and \( h = \{(a, 2), (b, 4), (c, 1), (d, 3)\} \). Is \( h \) a function from \( P \) to \( Q \)? Justify your answer.
Solution: To check whether \( h \) is a function from \( P \) to \( Q \), we verify two conditions: Condition 1 — Every element of \( P \) must have at least one image in \( Q \). The first components of the ordered pairs in \( h \) are \( a, b, c, d \). These are exactly the four elements of \( P = \{a, b, c, d\} \). So every element of \( P \) has an image. This condition is satisfied. Condition 2 — Every element of \( P \) must have a unique (exactly one) image in \( Q \). Looking at each element: The element \( a \) appears only once, mapped to \( 2 \). The element \( b \) appears only once, mapped to \( 4 \). The element \( c \) appears only once, mapped to \( 1 \). The element \( d \) appears only once, mapped to \( 3 \). No element of \( P \) maps to two different elements of \( Q \). Also, all images \( 2, 4, 1, 3 \) lie in \( Q = \{1, 2, 3, 4, 5\} \). Both conditions are satisfied. Note that \( 5 \in Q \) has no pre-image in \( P \), but this is perfectly allowed — a function does not require every element of the co-domain to be used. Therefore, \( h \) IS a function from \( P \) to \( Q \).
Answer: Yes, h is a function from P to Q, because every element of P has exactly one image in Q and all images belong to Q.