How to solve $x^2+1\equiv0~\mod 7$ .
Initial thoughts: We want to look for $x$ such that $x^2\equiv-1~\mod 7$.
By Lagrange's we have that $x^2+1$ has at most $2$ solutions but I have no idea if they are actually met or not.
Let $x\in\Bbb{Z}$ then $x \equiv0,1,2,3,4,5,6 \mod7$ and $x^2 \equiv0,1,4,2,2,4,1\mod7$ so I would guess that the two solutions are met and are $x\equiv1\mod7$ and $x\equiv6\mod7$ yet take $1\equiv1\mod7$ but $1^2=1\neq-1 \mod7$.
So obviously I am making some serious errors/misunderstanding. Could anyone explain why I am wrong and how to solve equations of this type (i.e simple non linear congruences modulo a prime).
Thanks!