Is the function $f: (\mathbb{R} - \{0\})\rightarrow \mathbb{R}$ defined by $f(x) = \frac{1}{x}$ surjective? 
Is the function $f: (\mathbb{R} - \{0\})\rightarrow \mathbb{R}$ defined by $f(x) = \frac{1}{x}$ surjective?

My notes say that it isn't but I don't see why. The codomain is all real numbers, and if I plug in every single $x$ in the domain, it is possible to map to all the real numbers, so the range equals to codomain?  
 A: $f(x)=0$ has no solutions. In fact if $\frac{1}{x}=f(x)=0$, since $x\neq 0$, then $1=0\cdot x=0$.
Therefore it is not surjective.
A: It has been answered that $f$ is not a surjection as there is no $x$ so that $f(x) = 0$.
A discussion in the comments then arose about how to change the domain and/or range so that $f(x) = 1/x$ is surjective.  This post will address that.
The easiest way to do that would be to modify the range from $\mathbb R$ to $\mathbb R \setminus \{0\}$ so $f:\mathbb R \setminus \{0\}\rightarrow \mathbb R \setminus \{0\}$.  This is surjective as for any $z \in \mathbb R \setminus \{0\}$ we have $\frac 1z$ in domain and $f(\frac 1z)= z$.
To extend the domain so that $f:D \rightarrow \mathbb R $ and $f(x) = \frac 1x; x \in \mathbb R \subset X$ we simply need to add any element to the domain and define $f$ or that element is equal to $0$.
So, believe, it or not, the following is perfectly valid math:
Let $X = [\mathbb R \setminus \{0\}] \cup \{babar,\ the\ elephant\}$ and let $f: X \rightarrow \mathbb R$ be defined as $f(x) = \frac 1x$ if $x \in \mathbb R\setminus \{0\}$ and $f(babar,\ the\ elephant) = 0$.
Then $f$ is surjective.  (No, I'm not kidding.)
You could also do:
Define the extended reals to include $\infty, -\infty$ and include the identities $\frac 1{\infty} = \frac 1{-\infty} = 0$, and let $X = [\mathbb R \setminus \{0\}] \cup \{\infty\}$ then $f:X\rightarrow \mathbb R$ as $f(x) = \frac 1x$ is surjective.  
Perhaps the most elegant is simply to define $f: \mathbb R \rightarrow \mathbb R$ as $f(0) = 0$ and $f(x) = \frac 1x$ for all $x \ne 0$.
But those last three are actually exactly the same.  To extend the range to include $0$, we need to add an element $k$ to the domain and define $f(k) =0$.  It does not matter whether $k$ is $\infty$, $0$, or $babar,\ the \ elephant$.
A: Another good thing to do here would be to draw a sketch of the graph of $\frac{1}{x}$ and look at the values it takes on.
