1

Some properties of composite functions works only when $(\star) f: A \to B, g: B\to C, gof: A \to C$.

$(1)$ I told my university professor that I did not understand why the domain of $gof$ is equal to the domain of $f$.

$(2)$ I know how to arrive at the result that the codomain of $f$ is the domain of $g$. so that the composition gof is defined we need to $Im(f) \subseteq Dom(g)$ and since $Dom(g)$ contains the images of $f$ means that $Dom(g)$ is a codomain of $f$.

But for $(1)$(what I have not understood), he answered to me:

Now for the compound, when we write $f: A \to B$ and $g: B \to C$, we already know that the domain of $f$ is $A$, the codomain of $f$ is $B$ and the domain of $g$ is $B$. For any $a$ in $A$, we have $f (a)$ in $B$, so in the domain of $g$, therefore $g (f (a))$ is correctly defined. This shows that the domain of $gof$ is $A$.

and although what he tells me is true, since it is defined, i dont understand why that "shows that the domain of $gof$ is $A$", since i think that the domain of $gof$ does not need necessarily be the domain of $f$ to be defined.(Because of what I said in $(2)$ ). Let's take an example:

Let $f: \mathbb{R} \to [0, \infty),g: [0, \infty) \to \mathbb{R}^+$.

Here the form: $f: A \to B, g: B \to C$ is present, but $Dom(gof)$ is not $A$, i.e $\mathbb{R}$, here the domain of the $gof$ is $[0, \infty)$.

He replied that we can modify the domain and / or codomain in such a way that it is true, however I have not fully understood it and I have been confused.

So for some of the properties of the $gof$ compound functions (like this property or some of these properties) to be true, do they need to be defined like this$(\star)$? Or does it work for everyone and as my teacher answered me in $(1)$, must we change its domain and / or codomain? And if we must change it, how?

ESCM
  • 3,161
  • In your example, $A=\Bbb R,\ B=[0, \infty),\ C=\Bbb R^+$ and $g(f(a))$ is perfectly valid for every $a\in \Bbb R$ giving an output in $\Bbb R^+$, so it is a function $A\to C$. I don't see your doubt, why do you think its domain would be $[0, \infty)$. – Berci Apr 20 '20 at 19:47
  • FYI, you can use "\circ" instead of lowercase O to produce composition operator "$\circ$" – MPW Apr 20 '20 at 20:01
  • @Berci, because i am using the definition of a composite $g \circ f$ domain, that is: $g \circ f(a)$ is defined $\forall a \in Dom(f) \land f(a) \in Dom(g)$. But now I have reasoned that perhaps it could be due to the fact that: What I wrote can be transformed into $\forall a \in A \land f(a) \in Dom(g)$ and since $Dom(g)$ is a codomain of $f(a)$, therefore is always true and $\forall a \in A \land V = \forall a \in A$(Identity law), so is reduced to the domain of $f$(maybe i am overthinking it, but it does not matter) is this correct? – ESCM Apr 20 '20 at 20:52
  • @EduardoS. The notation $f:A\to B$ means by definition that $f$ is a function, ${\rm dom}(f)=A,\ {\rm im}(f)\subseteq B$ and $B$ is referred to as the codomain. Does it make it clearer? – Berci Apr 20 '20 at 21:26
  • I know that, but what i wrote is correct? – ESCM Apr 20 '20 at 21:27

1 Answers1

1

If you are already given two functions $f:A\to B$ and $g:B\to C$, then the function $g\circ f$ is already defined and you don't get to choose its domain or range. The function $g\circ f$ is a map $A\to C$ whose rule is $(g\circ f)(x) = g(f(x))$ for every $x\in A$:

$$A \overbrace{\boxed{\stackrel{f}{\longrightarrow}B\stackrel{g}{\longrightarrow}}}^{\stackrel{g\circ f}{\longrightarrow}}C$$

Addendum: If instead of $f:A\to B$ and $g:C\to D$ you have the more general case $f:A\to B$ and $g:C\to D$, then the composition may not be defined since $g$ can only be applied to values of $f(x)$ for which $f(x)\in C$.

Points which $f$ maps into the domain of $g$ are precisely $A\cap f^{-1}(C)$. The restriction of $f$ to this smaller set allows the composition to be defined. So we may define $$f^*:A\cap f^{-1}(C) \to C$$ by $f^*(x) = f(x)$ (since $x\in A$) and observe that $f^*(x) \in C$ because $x\in f^{-1}(C)$.

Then the composition $g\circ f^*$ makes sense as a map $$g\circ f^* : A\cap f^{-1}(C)\to D.$$

MPW
  • 43,638
  • You're telling me the same thing as my teacher, so I'm stay with the doubt. – ESCM Apr 20 '20 at 19:19
  • How you explain my example? – ESCM Apr 20 '20 at 19:20
  • What is your example? You haven't given any specific functions. Can you be explicit? Choose a particular function and show what you mean. – MPW Apr 20 '20 at 19:21
  • So, my example is not sufficient? why? – ESCM Apr 20 '20 at 19:26
  • You don't have an explicit example. What is the function $f$? What is the function $g$? What are their domains/ranges? What are their rules of assignment? Likewise with $g\circ f$? – MPW Apr 20 '20 at 19:33
  • @EduardoS. In your example, $g(f(-17))$ is perfectly well defined so $-17$ IS in the domain of the composite function. Why do you think it isn't? – Ned Apr 20 '20 at 19:45
  • Yes, I was going to add this. If you mean $f:\mathbb{R}\to[0,\infty)$ and $g:[0,\infty)\to \mathbb{R}^+$, then certainly $g\circ f:\mathbb{R}\to\mathbb{R}^+$. The domain of $g\circ f$ is $\mathbb{R}$, not $[0,\infty)$. For example, $(g\circ f)(-4) = g(f(-4))$. Do you see why the domain of $g\circ f$ is not limited to just $[0,\infty)$? The domain is where the initial input $x$ lives, not where the intermediate result $f(x)$ lives. – MPW Apr 20 '20 at 19:46
  • @MPW Now I have reasoned that my mistake perhaps it could be due to the fact that: What I wrote can be transformed into $\forall a \in A \land f(a) \in Dom(g)$ and since $Dom(g)$ is a codomain of $f(a)$, therefore is always true and $\forall a \in A \land V = \forall a \in A$(Identity law), so is reduced to the domain of $f$(maybe i am overthinking it, but it does not matter). Is this correct? – ESCM Apr 20 '20 at 20:54
  • Okay, I see. You are right, if you didn't already know $f$ maps into $B$. But note that you are specifically told $f$ "ends up" in $B$ and $g$ "starts out" in $B$, so that's not a consideration (it's automatic). Otherwise instead of $f:A\to \boxed{B}$ and $g:\boxed{B}\to C$, you would have been given $f:A\to \boxed{B}$ and $g:\boxed{C}\to D$ and would THEN have to impose the restriction to only consider $x\in A$ such that $f(x)\in C$. – MPW Apr 20 '20 at 21:00
  • So since is given information I don't need to consider that $f(x) \in B$, since is already true. – ESCM Apr 20 '20 at 21:26
  • That is correct – MPW Apr 20 '20 at 21:28
  • So, if the $f,g$ functions are of the form $f: A \to B, g: C \to D$ I will have to impose the restrictions $x \in A$ and $f(x) \in C$ and the result of these restrictions will end in the functions defined for $g \circ f$ as: $f: A \to B, g: B \to C$? – ESCM Apr 20 '20 at 21:30
  • So basically, in that cases, the domain of $f$ is always replaced by the set ${x \in Dom(f) \land f(x) \in Dom(g)}$? – ESCM Apr 20 '20 at 21:40
  • Yes i know when is defined the composition. This part $f^*= f|_{A\cap g^{-1}(C)}$ means that the new domain of $f$ to make $g \circ f$ defined, will be that? – ESCM Apr 20 '20 at 21:47
  • And the part $A\cap g^{-1}(C)$ is equivalent to ${x \in A \land f(x) \in C}$? – ESCM Apr 20 '20 at 21:49
  • I'm afraid I botched these comments completely. Let me edit my answer instead, we're in danger of having these comments removed for going on too long. – MPW Apr 20 '20 at 21:51
  • Without going further, the composition between: $f: [0, \infty) \to \mathbb{R}, g: \mathbb{R} - {0} \to \mathbb{R}$ as $f: \sqrt{x}, g: \frac{1}{x}$. The domain of $g\circ f$ is equal to $(0, \infty)$. Now $f$ will be $f: (0, \infty) \to \mathbb{R} - {0}, g: \mathbb{R} - {0} \to \mathbb{R}$ getting that now $gof$ is well defined? – ESCM Apr 20 '20 at 21:51
  • Here you're really using $f^:(0,\infty)\to\mathbb{R}\setminus{0}$ and $g:\mathbb{R}\setminus{0}\to \mathbb{R}$, so $g\circ f^:(0,\infty)\to\mathbb{R}$. Or you can throw out your original $f$ and only consider your "new" $f$ instead of calling it "$f^*$. Either way, what you have done is to restrict the domain until the composition is defined. – MPW Apr 20 '20 at 22:21
  • 1
    My brain hurts now. – MPW Apr 20 '20 at 22:22