Relationship between domain,co-domain and range of composition functions

definitionfunctions

I recently need to write some proofs involving the relationship between donmain, co-domain and range, which I am little confused about, for example:


1.If $f:A\rightarrow{R},g:B\rightarrow{R},g \circ f:C\rightarrow{R}$

Then we have $C = range(f)\cap A \cap B$

2.If we have some $c\in C$, then also $f(c)\in B$


My questions:

1.Is these statements true, if so, is it possible to prove it?

Or if it's false, what would be the counter example and the right relationship?

2.Any other result we can conclude from the condition?

Any help would be appreciated.


Definitions I'm using:

$f:A\rightarrow{B}$:

$f$:domain $\rightarrow$ co-domain

domain:

Subset of R that f is defined on

(for example, domain of $\frac{1}{x}$ is R without $0$)

co-domain:

R as default

range:

Outputs of f as a subset in co-domain

Best Answer

The requirement here is that we need $g \circ f$ to make sense and that is possible when $f(C) \subseteq \text{domain}\ (g) = B$. So if $C = \text{range}\ (f) \cap A \cap B,$ then $x \in C \Rightarrow x \in A \Rightarrow f(x) \in \text{range}\ (f)$. This is the best we can conclude from here. So there may very well be some elements in range$\ (f)$ such that they are not in domain $(g)$. Hence we can not define $g \circ f$ properly from this.

Consider for example: $f : \mathbb{R} /\{0\} \longrightarrow \mathbb{R}$ defined as $f(x) = \frac{1}{x}$ and $g: \mathbb{R}/\{1,2\} \longrightarrow \mathbb{R}, g(x) = \frac{1}{x^2-3x+2}$. Then, we can see that $g \circ f: \mathbb{R}/\{\frac{1}{2},1\}\longrightarrow \mathbb{R},g(f(x)) = \frac{x^2}{1-3x+2x^2} = \frac{x^2}{(2x-1)(x-1)} $. For the moment we just focus on the domains.

We can here see that $C = \mathbb{R}/\{1, \frac{1}{2}\} \ne \text{range}\ (f) \cap A \cap B$ as $\frac{1}{2} \in \text{range}\ (f)\cap A\cap B $ but doesn't in $C$.

We can construct many examples like this. The key is to understand when is $g \circ f$ defined. Hope this helps.