Daniel Fischer's answer is correct, but there is some confusion in the other answers and comments as to the meaning of "rank-nullity theorem" and its connection to the equivalence of injectivity/surjectivity on finite-dimensional spaces. To clear this up, I'm adding this answer as an appendix to Daniel Fischer's.
Let $V$ and $W$ be vector spaces (of arbitrary dimension, over the same field), and let $T\in L(V, W).$
Direct Sum Theorem. If $V = X \oplus Y$, then $\dim V = \dim X + \dim Y.$
Rank-Nullity Theorem. $\dim V = \dim \ker T + \dim \operatorname{im} T.$
Surjective-Injective-Bijective (SIB) Theorem.$^1$ If $\dim V = \dim W < \infty$, then surjectivity, injectivity, and bijectivity of $T$ are equivalent.
Since the SIB theorem is a corollary of the rank-nullity theorem, one may wonder: Since the rank-nullity theorem holds in arbitrary dimension, why does the SIB theorem hold only in finite dimension? The answer, as @fgp points out in a comment to @DonAntonio's answer, is the following lemma.
Lemma. Let $\kappa$ and $\lambda$ be cardinals and suppose $\kappa + \lambda = \kappa.$ If $\kappa < \infty,$ then $\lambda = 0$.
Proof of SIB theorem from rank-nullity theorem. It suffices to prove equivalence of injectivity and surjectivity (both directions require finite dimension). Let $\kappa = \dim V = \dim W \; (< \infty).$
- $(\text{Injectivity} \implies \text{surjectivity})$ If $T$ is injective, then $\ker T = 0,$ hence $\dim \operatorname{im} W = \kappa$ by the rank-nullity theorem. Write $W = \operatorname{im} T \oplus U$. By the direct sum theorem, $\kappa = \kappa + \dim U.$ By the lemma, $\dim U = 0$, so $\operatorname{im} T = W$, thus $T$ is surjective.
- $(\text{Surjectivity} \implies \text{injectivity})$ If $T$ is surjective, then $\operatorname{im} T = W$, so the rank-nullity theorem gives $\kappa = \dim \ker T + \kappa$. By the lemma, $\dim \ker T = 0$, so $T$ is injective. $\square$
$^1$ This is not a standard name. I am also not arguing that my designation of $\dim V = \dim \ker T + \dim \operatorname{im} T$ as the rank-nullity theorem is the "correct" terminology. The important thing is to see how the theorems are related.