2
$\begingroup$

I am trying to answer the following question from a past exam paper:

Let $A = $ {$1,2,3$}, $B = $ {$2,3,4$}, and $C = $ {$1,2,3,4$}, consider the following functions:


$f: A \to B$

$f(x) = x + 1$


$g: A \to C$

$g(x) = x$


$h: C \to A$

$h(1) = 2$, $h(2) = 3$, $h(3) = 2$, $h(4) = 1$


The question is: which of the following are / are not defined. If they are defined, find their domain, codomain and range. If they are not defined, state why.

$f \circ g$

$f \circ h$

$h \circ f$

$g \circ h$

I am struggling to understand functions, and wondered if someone might be willing to go through the process of answering one of the above so I can understand how it is done. I have tried searching, but can not find an example that I can understand. Thank you!

$\endgroup$
1
  • 1
    $\begingroup$ First thing to check is if the domain and range sets are aligned. For example, as $f:A\to B$ and $g:A\to C$ we can't compose $f\circ g$ as $g$ takes us to $C$ but $f$ is not defined on $C$. $\endgroup$
    – lulu
    Jan 4 '18 at 20:51
1
$\begingroup$

I am going to answer two of them (one for defined, one for not defined) and leave rest to you:

For example if we take $f \circ g$, notice that in the first place since $f$ is defined on $A$, not $C$, $f \circ g$ is not defined (Also notice that in order for $f \circ g$ to be defined, $g$ must have range on $A$, which is not the case; it has range on $C$).

But for example if we take $f \circ h$, since there is no such problem as in the previous example, we can simply say that $f(h(1)) = f(2) = 3$, $f(h(2)) = f(3) = 4$, $f(h(3)) = f(2) = 3$ and $f(h(4)) = f(1) = 2$, which are all in $B$, therefore it is defined and we can write $f \circ h: C \to B$ where $C$ is the domain of $f \circ h$ and $B$ is the range, and also codomain of $f \circ h$.

$\endgroup$
10
  • $\begingroup$ So would I be correct in stating that $h \circ f$ is not defined because the domain of $h$ != $B$. And that $g \circ h$ is defined because $C \to C$? $\endgroup$
    – Shannon
    Jan 4 '18 at 21:28
  • $\begingroup$ Yes, and what you have found in the case $g \circ h: C \to C$ is a permutation on set $C$, indeed. It sends $1 \to 2$, $2 \to 3$, $3 \to 2$, $4 \to 1$. And your answer and reasoning for the case of $h \circ f$ is correct as well. $\endgroup$
    – ArsenBerk
    Jan 4 '18 at 21:33
  • $\begingroup$ Great, thank you. I think I now understand how to determine if a function is defined or not, however, can I just confirm I understand what must be done in order to find the domain and range: Using $g \circ h$ as the example, would {1,2,3,4} ($C$) be the domain and {1,2,3} ($A$) be the range? I am completely lost as to how you determine the co-domain however. $\endgroup$
    – Shannon
    Jan 4 '18 at 21:46
  • $\begingroup$ When a function $f$ is defined as $f:X \to Y$, we call $X$ the domain and $Y$ the codomain. Range $Z$ is a subset of codomain $Y$ where $f(X) = Z$. Here is a better illustration for these definitions: mathsisfun.com/sets/images/domain-range-codomain.svg $\endgroup$
    – ArsenBerk
    Jan 4 '18 at 21:52
  • $\begingroup$ After that, can you tell me what is the domain, codomain and range for the case of $g \circ h$ again? $\endgroup$
    – ArsenBerk
    Jan 4 '18 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.