Determinant of all possible matrices with elements $\pm 1$

determinantlinear algebramatrices

Given that A is an element of set $\mathbb{B}$ consisting of all $N\times N$ matrices with elements $\pm 1$, how can I find the following sum:
\begin{equation}
\sum_{A\in \mathbb{B}} \det(A)
\end{equation}

My initial approach was to use elementary row operations to reduce the matrix to the following form:
\begin{equation}
\begin{bmatrix}
1 & 0 \\
0 & A^{N-1}
\end{bmatrix}
\end{equation}

where $A^{N-1}$ consists of elements $\{-2,0,2\}$. Since each row has those elements, we can divide each row to 2. That will reduce the determinant to $2^{N-1}A'$. But the road ended here. My insight is that, as we have $\pm 1$ for each element, determinants should cancel out and give $0$.

Best Answer

Let's define a map $\varphi : \mathbb{B} \rightarrow \mathbb{B}$ such that for every $A \in \mathbb{B}$, you obtain $\varphi(A)$ by swapping the two first rows of $A$. It is obvious that $\varphi$ is a bijection (it is an involution), so $$ \sum_{A \in \mathbb{B}} \det(A) = \sum_{A \in \mathbb{B}} \det(\varphi(A))= - \sum_{A \in \mathbb{B}} \det(A)$$

So $$\boxed{ \sum_{A \in \mathbb{B}} \det(A)=0}$$