existence of element of multiplicative order $4$ in $\mathbb{Z_p}$, if $p \equiv 1 \pmod4$, where $p$ is prime. Assume that $p \equiv 1 \pmod4$, where $p$ is prime.
The multiplicative group of the finite field $\mathbb{Z_p}$ is cyclic and is of order $p-1$. We know that $4$ is a divisor of $p-1$.
Now my text claims that $\mathbb{Z_p}$ contains an element $n$ of multiplicative order $4$. Why is that?
If I have understood it correctly it means that we have $n^4 \equiv 1 \pmod p$ for some $n \in \mathbb{Z_p} $ Why?
Also, why does it follow that $n^2$ has multiplicative order $2$?

The multiplicative group is cyclic and of order $p - 1$. Let $g$ be a generator; and look at the element a quarter way down the list $1, g, g^2, \dots, g^{p-2}$ of all elements, i.e, look at $h := g^{(p-1)/4}$. That element has order 4, as can be seen by explicit computation.
Note, by the way, that $h^2 = g^{(p-1)/2}$ is order 2 and therefore must be (the residue class of) $-1$.
