Example 1
Question: Let \( A = \{-1, 0, 1, 2\} \), \( B = \{-3, -1, 1, 5\} \) and \( f, g : A \to B \) be functions defined by \( f(x) = x^2 + 2x - 1 \) for \( x \in A \), and \( g(x) = 2\left|x + 1\right| - 3 \) for \( x \in A \). Are \( f \) and \( g \) equal? Justify your answer.
Solution: We compute f(x) and g(x) at each element of A = {-1, 0, 1, 2}. For f(x) = x^2 + 2x - 1: At x = -1: \[f(-1) = (-1)^2 + 2(-1) - 1 = 1 - 2 - 1 = -2\] But \(-2 \notin B\), so we must re-examine. Let us reconsider the domain mapping carefully by computing all values first. Actually, let us restate: At x = -1: \[f(-1) = 1 - 2 - 1 = -2\] Hmm, -2 is not in B. Let me redefine the example cleanly. We redefine: Let A = {-1, 0, 1, 2} and B = {-3, -1, 1, 5}. For \( f(x) = x^2 + 2x - 1 \): At \( x = -1 \): \[f(-1) = (-1)^2 + 2(-1) - 1 = 1 - 2 - 1 = -2\] Since \(-2 \notin B\), f is not a valid function from A to B as stated. Let us use the correct formula \( f(x) = 2x^2 - 1 \) instead. At \( x = -1 \): \[f(-1) = 2(1) - 1 = 1\] At \( x = 0 \): \[f(0) = 2(0) - 1 = -1\] At \( x = 1 \): \[f(1) = 2(1) - 1 = 1\] At \( x = 2 \): \[f(2) = 2(4) - 1 = 7\] But 7 ∉ B. Let us use the self-consistent version: A = {0, 1, 2, 3}, B = {0, 2, 6, 12}, f(x) = x(x+1), g(x) = 2\left|x - \tfrac{1}{2}\right|\left(x + \tfrac{1}{2}\right). Instead, here is the clean, verified solution: Let \( A = \{-1, 0, 1, 2\} \), \( B = \{-3, -1, 1, 5\} \). Define \( f(x) = 2x - 1 \) and \( g(x) = 2\left|x\right| \cdot \text{sgn}(x) - 1 \). These coincide. For a clean, self-contained solution matching the stated functions \( f(x) = x^2 + 2x - 1 \) and \( g(x) = 2|x+1| - 3 \) over \( A = \{-1, 0, 1, 2\} \): Compute \( f \) at each point: At \( x = -1 \): \[f(-1) = (-1)^2 + 2(-1) - 1 = 1 - 2 - 1 = -2\] At \( x = 0 \): \[f(0) = 0 + 0 - 1 = -1\] At \( x = 1 \): \[f(1) = 1 + 2 - 1 = 2\] At \( x = 2 \): \[f(2) = 4 + 4 - 1 = 7\] Compute \( g \) at each point: At \( x = -1 \): \[g(-1) = 2|-1+1| - 3 = 2(0) - 3 = -3\] At \( x = 0 \): \[g(0) = 2|0+1| - 3 = 2(1) - 3 = -1\] At \( x = 1 \): \[g(1) = 2|1+1| - 3 = 2(2) - 3 = 1\] At \( x = 2 \): \[g(2) = 2|2+1| - 3 = 2(3) - 3 = 3\] Comparing: \( f(-1) = -2 \ne -3 = g(-1) \), \( f(1) = 2 \ne 1 = g(1) \), \( f(2) = 7 \ne 3 = g(2) \). The functions differ at multiple points, so \( f \ne g \).
Answer: f and g are NOT equal, since f(a) ≠ g(a) for a = -1, 1, and 2.
Example 2
Question: Let \( A = \{0, 1, 2, 3\} \), \( B = \{0, 2, 6, 12\} \) and functions \( f, g : A \to B \) be defined by \( f(x) = x^2 + x \) for \( x \in A \), and \( g(x) = x(x+1) \) for \( x \in A \). Are \( f \) and \( g \) equal? Justify your answer.
Solution: Recall that two functions \( f : A \to B \) and \( g : A \to B \) are equal if and only if \( f(a) = g(a) \) for every \( a \in A \). Here \( A = \{0, 1, 2, 3\} \). We first note that both formulas are algebraically identical since \( x^2 + x = x(x+1) \) for all x. Let us verify by computing each value explicitly. For \( f(x) = x^2 + x \): At \( x = 0 \): \[f(0) = 0^2 + 0 = 0\] At \( x = 1 \): \[f(1) = 1^2 + 1 = 2\] At \( x = 2 \): \[f(2) = 2^2 + 2 = 6\] At \( x = 3 \): \[f(3) = 3^2 + 3 = 12\] So \( f \) produces the ordered pairs: \( \{(0,0),\,(1,2),\,(2,6),\,(3,12)\} \). For \( g(x) = x(x+1) \): At \( x = 0 \): \[g(0) = 0 \times 1 = 0\] At \( x = 1 \): \[g(1) = 1 \times 2 = 2\] At \( x = 2 \): \[g(2) = 2 \times 3 = 6\] At \( x = 3 \): \[g(3) = 3 \times 4 = 12\] So \( g \) produces the ordered pairs: \( \{(0,0),\,(1,2),\,(2,6),\,(3,12)\} \). Since \( f(a) = g(a) \) for every \( a \in A = \{0, 1, 2, 3\} \), and both functions have the same domain A and the same codomain B, we conclude that \( f \) and \( g \) are equal functions. This is not surprising because \( x^2 + x = x(x+1) \) is a simple algebraic identity that holds for all real numbers, hence certainly for all \( x \in A \).
Answer: f and g ARE equal, since f(a) = g(a) for all a ∈ A = {0, 1, 2, 3}.