A problem from 104 Number Theory Problems:
If s is the least positive integer such that $a^s\equiv-1\pmod{m}$, show that ord$_m(a) = 2s$.
Solution: Indeed, $a^{2s}\equiv1\pmod{m}$, so $d$ divides $2s$. If $d < 2s$, then $a^{2s-d}\equiv-1\pmod{m}$ violates the minimality assumption on s.
How does $d < 2s$ imply $a^{2s-d}\equiv-1\pmod{m}$ ??
OBS: It's written $2$ instead of $a$ in the last congruence but I think it's an erratum.
We need some conditions on $m$. We will suppose that $m\gt 2$.
In general outline, the argument described is correct. But the details are not. Let $d$ be the order of $a$. Then as in the post we have $d\mid 2s$. If $d\lt 2s$, then since $d$ divides $2s$ we have $d\le s$ and, since $m\gt 2$, we have $d\lt s$. Note that if $d\lt s$ then $$a^{d}a^{s-d}\equiv a^{s}\equiv -1\pmod{m}.$$ From $a^d\equiv 1\pmod{m}$, it follows that $a^{s-d}\equiv -1\pmod{m}$. This is what contradicts the minimality of $s$.