Taking the compositions of two constant functions

3.3k Views Asked by At

The questions asks to prove that the composition of g with f is not equal to f with g. However, I don't know whether you can even take the composition of constant functions or how. so if f(x)=2 and g(x)=4.

How do you take the composition?

2

There are 2 best solutions below

0
On BEST ANSWER

Suppose $f,g : \mathbb{N} \rightarrow \mathbb{N}$. Then $(f \circ g)(x) =f(g(x))$ and $(g \circ f)(x) = g(f(x))$.

Hence if $f(x) = 2$ and $g(x) = 4$, then $f(g(x)) = f(4) =2$ and $g(f(x)) = g(2) = 4$.

Hence $f \circ g$ is the constant function taking value $2$ and $g \circ f$ is the constant function taking value $4$. They are not equal.

0
On

$f\circ g = f(g(x)) = f(4) = 2 \neq g \circ f = g(f(x)) = g(2) = 4$.