How to find if function is bijective analytically I've been given the following problem

"Define $f:\Bbb{R}\rightarrow(0,1]$ by $f(x)=e^{-x^2}$. Determine whether or not $f$ is injective and/or surjective"

I don't really just want the answer. I'm just stumped as to how to do this without just going out and graphing it. Is there a way to do it without using a graphing utility? I tried to get the inverse of the function analytically and got $y=\sqrt{-\ln{x}}$
Not sure how to proceed or is it really as simple as typing the original function into desmos and examining the function by eye? 
 A: $e^{-1^{2}}=e^{-(-1)^{2}}$ so $f$ is not injective. Since every number $x$ in $(0,1]$ is $f(y)$ when  $y =\sqrt {-\ln\, x}$ it follows that $f$ is surjective. 
A: $f(x_1)=f(x_2)$ then $e^{-x_1^2}=e^{-x_2^2}$ shows $x_1^2=x_2^2$. this reveals two answer $x_1=x_2$ and $x_1=-x_2$. thus the function isn't injection.
for surjectivity let $b\in(0,1]$ then $\ln b=-x^2$ or $x=\sqrt{-\ln b}$ so it is surjective and existance of this $x$ is sufficient to show that it is onto.
A: Injectivness is pretty simple: suppose that $\exists x,y$ such that $f(x)=f(y)$, then we get:
$e^{-x^{2}}=e^{-y^{2}} \Rightarrow x^{2}=y^{2}$ and by that: $x=\pm y$ so the function is not injective and thus not invertible. If we restrict the dominion on $\bigl(0,1\bigl]$ then we get that $f$ is injective. The expression you have got: 
$$ x=\sqrt{-lny} $$ gives you surjectivness, and so $f$ in bijective and thus invertible. 
Usually it is pretty crucial showing that $f(x)=f(y)\Rightarrow x=y$ and in thi case it is not even true if we don't take a restricted dominion. Indeed when you find $x=\sqrt{-lny}$ you have to decide if either $x$ is equal to the square root with a plus sign or a minus sign, which basically says it is not injective on $\mathbb{R}$
