If $f = \{ (4,5),\ (-2,-1),\ (3,4),\ (-1,0)\}$ and $g = \{(0,-1),\ (4,-2),\ (6,3),\ (-1,4)\}$, find $g \circ f$, if it exists.
When I did this question, I arrived at the following answer:
$$ \begin{aligned} g(f(4)) &= g(5) = \text{DNE} \\ g(f(-2)) &= g(-1) = 4\\ g(f(3)) &= g(4) = -2 \\ g(f(-1)) &= g(0) = -1 \end{aligned}$$
$$ g \circ f = \{(-2,4),\ (3,-2),\ (-1,-1) \}$$
But the answer key for this question says that $g \circ f$ does not exist.
Is the answer key wrong? Or is this process wrong? I do not think I am doing anything incorrectly considering those values do exist in the domain of $g$, but I do not know if I'm missing a bigger picture here.
The answer key is correct. All of your answers are right except for the last one.
Your candidate is not $g\circ f$. It is $g\circ h$, where $h$ is the restriction of $f$ to a smaller domain $\{-2,-1,3\}$.
In general, $g\circ f$ has the same domain as $f$ and the same range (or codomain, if that’s your terminology) as $g$.
The image of $g\circ f$ needn’t equal the image of $g$, since the image of $f$ might not equal the domain of $g$.