# Restriction of a function and surjectivity [closed]

I have a function $$f:[-1,1] \rightarrow \mathbb R$$. If $$f$$ is surjective then restriction $$f_{|[0,1]}:[0,1] \rightarrow \mathbb R$$ is surjective?

if I consider the function $$f(x)=\tan({{\pi x} \over {2} })$$ is surjective in $$(-1,1)$$ but $$f_{|[0,1]}:[0,1) \rightarrow \mathbb R$$ is not surjective so the question is false in general? or exist functions surjective with restriction surjective?

• Of course there exist functions with certain restrictions that maintain surjectivity ($x^2$ is surjective over $\mathbb{R}_+$, restricted over $\mathbb{R}_+$), but that is not true in general. Commented Aug 1 at 13:29
• You gave a counterexample. So the question is not "false in general" (that makes no sense); its answer is just: "no", as you showed. And your own final question is off topic. Commented Aug 1 at 14:47
• I’m voting to close this question because it was self-answered. Commented Aug 1 at 14:48

In general if $$B \subseteq [0,1)$$, then your function $$f(x) = \tan \left(\frac{\pi x}{2} \right)$$ is not surjective because if you pick any $$y \in \mathbb{R}-f(B)$$, then there is no way to hit an $$x$$ in $$B$$ with $$f|_B(x)= y$$. Moreover,

If $$A \subseteq B \subseteq \operatorname{dom}(g) = X$$ and $$g: X \to Y$$ is a surjective function, but the restriction $$g|_B$$ is not, then $$g|_A$$ is not either.

This is because of the fact that for any function $$f: \widetilde{X} \to \widetilde{Y}$$ and and sets $$\widetilde{X}$$ and $$\widetilde{Y}$$ with $$R \subseteq S \subseteq \operatorname{dom}(f) = \widetilde{X}$$, we have

$$(f|_S)|_R = f|_R$$

On the finite case (i.e. $$|X| < \infty$$), you can always find a subset $$A$$ of $$X$$ such that any of the equivalent statements below are satisfied:

• $$g|_A$$ is a surjection
• $$g(A) = Y$$
• $$|g(A)| \geq |Y|$$
• The function $$h: g(A) \to Y$$ is surjective.
• $$|A| \geq |Y|$$
• $$\exists B \subseteq A$$ with $$|B| = |Y|$$