Legendre symbol: Showing that $\sum_{m=0}^{p-1} \left(\frac{am+b}{p}\right)=0$

I have a question about Legendre symbol. Let $a$, $b$ be integers. Let $p$ be a prime not dividing $a$. Show that the Legendre symbol verifies: $$\sum_{m=0}^{p-1} \left(\frac{am+b}{p}\right)=0.$$

I know that $\displaystyle\sum_{m=0}^{p-1} \left(\frac{m}{p}\right)=0$, but how do I connect this with the previous formula? Any help is appreciated.


Solution 1:

To allow the question to be marked as answered, then:

Show that as $m$ ranges from $0$ to $p−1$, $am$ ranges over all residue classes modulo $p$, and hence $am+b$ ranges over all residue classes modulo $p$.