The endomorphism of field

Can we find a field $K$ and an endomorphism $f$ of $K$, such that $f$ is not trivial and $f$ is not surjective? In other words, can we find an endomorphism of $K$ which is not an automorphism?

Solutions Collecting From Web of "The endomorphism of field"

Consider the Frobenius endomorphism of fields of characteristic $p$ given by

$$x \to x^{p}$$

This is not always an automorphism. For example, the image of rational function field $\mathbb{F}_{p}(t)$ under the Frobenius endomorphism does not contain $t$.

Yes, lots; for example, the endomorphisms $F(x) \to F(x)$ fixing $F$ are precisely given by extending $x \mapsto \frac{p(x)}{q(x)}$ where $p, q$ are two nonzero polynomials of total degree at least $1$. Assuming WLOG that $\gcd(p, q) = 1$, this map is an automorphism if and only if $p = ax + b, q = cx + d$ where $ad – bc \neq 0$ (exercise).

On the other hand, if $K$ is a finite extension of its prime subfield, then any endomorphism of $K$ is an automorphism (exercise). These are precisely the number fields and the finite fields.