I was working through Can the composition of two non-invertible functions be invertible? For the image below is $f \circ g$ invertible?

Thanks!
I was working through Can the composition of two non-invertible functions be invertible? For the image below is $f \circ g$ invertible?

Thanks!
Yes, good job! You've correctly constructed a counterexample that demonstrates how $f \circ g$ can be invertible even though $f$ is not invertible (since $f$ only needs to be invertible when its domain is restricted to the range of $g$).
Your counterexample is good.
You can see in your example the two properties in action: