Sum of signature of elements of $S_n$ is $0$

I saw in a proof that for each $$n > 1$$, the symmetric group $$S_n$$ satisfies $$\sum_{g\in S_n} \varepsilon(g) =0,$$ where $$\varepsilon$$ is the signature. Is that true?

I checked it is true for $$S_2$$ and $$S_3$$ but false for $$S_4$$ (I found this sum equals $$-6$$ by counting the conjugacy classes of $$S_4$$).

• Hint: $\varepsilon:S_n\to\{+1,-1\}$ is a homomorphism. – Thomas Andrews Apr 15 at 15:04
• Alternative hint: The sum is the determinant of the $n \times n$-matrix $\begin{pmatrix} 1 & 1 & \cdots & 1 \\ 1 & 1 & \cdots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \cdots & 1 \end{pmatrix}$. – darij grinberg Apr 15 at 17:52
It's true. Let $$x$$ be any transposition, then \begin{align} \sum\limits_{g \in S_n} \varepsilon(g) &= \sum\limits_{g \in S_n} \varepsilon(xg) \\ &= \sum\limits_{g \in S_n} -\varepsilon(g) \\ &= -\sum\limits_{g \in S_n} \varepsilon(g). \end{align}
If signature means sign, then the sum is zero because exactly half the elements of $$S_n$$ have sign $$+1$$ and half the elements have sign $$-1$$.