Prove that if $f \circ g = f\circ h$, then $g = h$

3.5k Views Asked by At

Given three functions,

$$f\colon A\to B, g\colon C\to A,h\colon C\to A$$

Prove or disprove that if $f \circ g = f \circ h$, then $g = h$.

4

There are 4 best solutions below

2
On BEST ANSWER

Here is a counterexample: \begin{align} g(1) & = 1 \\ g(2) & = 2 \\ g(3) & = 3 \\ \\ h(1) & = 1 \\ h(2) & = 3 \\ h(3) & = 2 \\ \\ f(1) & = 1 \\ f(2) & = 2 \\ f(3) & = 2 \end{align}

1
On

Let $g:\mathbb R\to\mathbb R,g(x)=x$, $h:\mathbb R\to\mathbb R,h(x)=2x$, and $f:\mathbb R\to\mathbb R,f(x)=0$ for a counterexample.

0
On

A function with the property that $f \circ g = f \circ h \implies g = h$ would be one such that $f$ has a left inverse. This would mean $f$ is injective. Thus your statement holds if and only if $f$ is injective (or more generally $f$ is a monomorphism).

0
On

Put $g(x) = x^2$, $h(x) =\cos(x)$ and $f(x) = 1$ for a real number $x$. We have $f\circ g = f\circ h$.