# Absolute value in Hasse's theorem

The Hasse's theorem says that for an elliptic curve $E$ defined on $\mathbb{F}_p$ where $p$ is a prime number, we have:

$|n-(p+1)| < 2\sqrt{p}$ with $n$ the order of $E$.

I am wondering why the absolute value is so important here? If $n-(p+1) > 0$ then it doesn't matter. But if $n-(p+1) < 0$, as $2\sqrt{p} > 0$ we don't need to use the absolute value to conclude that $n-(p+1) < 2\sqrt{p}$.

I think I'm missing something, could someone explains why do we need to apply this function?

$|n-(p+1)| \le 2 \sqrt{p}$ is a stronger statement than $n - (p+1) \le 2 \sqrt{p}$. Rephrasing the theorem in the way you suggest would weaken the conclusion.
The point of Hasse's theorem is that the curve has "roughly" $p+1$ points. It gives a bound on how far the actual number of points, $n$, can deviate in either direction from $p+1$ (by no more than $2 \sqrt{p}$). The statement $n - (p+1) \le 2 \sqrt{p}$ only gives an upper bound on the number of points, compared to $p+1$. So there could be arbitrarily few points.