Do we need relative prime in the definition of a quadratic residue?

30 Views Asked by At

From my lectures I know that $a$ is a quadratic residue mod $m$ if there is a $b$ such that $b^2\equiv a \pmod m$. But in several book I now read that $a$ and $m$ have to be coprime. That would mean that $4$ is not a quadratic residue $\mod 6$. But obiously we have $2^2\equiv 4\pmod 6$. So I wonder why some authors use this definition?