Let A and B be sets and $S \subseteq A \times B $ . Let $\pi_{1}$ be the projection function on $S$ to $A$ and $\pi_{2}$ be the projection function on $S$ to $B$. Give an example to show that.
$\pi_{2}$ need not be onto $B.$
Proof:
Let $A = \Bbb R, B = \Bbb R,S = \{(x,y) \in \Bbb R \times \Bbb R ,y=x^2 \}$
Then $\; y \ge 0$.
Would this not be onto because$ y = x,$ and $y=-x$. Then would it not be a proper mapping?
The projection is always well defined (a proper mapping). It is not clear what "it" is in your last statement, but no, what you are writing has nothing to do with it. $\pi_2$ is not onto because none of the negative values in $B$ are in the image of S.
A much simpler example: take any $A$, a non-empty $B$, and $S$ be the empty subset of $A \times B$. The projection restricted to $S$ has empty image, so it cannot be onto.