All the entries of the matrix A are $0$, $1$ or $-1$, and it has exactly $2012$ nonzero entries. Determine the sum of the entries in the main diagonal of the matrix $A · A^T$
I can only figure out that $A · A^T$ is symmetric matrix but I don't know how I can use this property?
UPDATE: I have not satisfied with given answers.The question is still active there is no accepted answer.
Hint: the sum of all diagonal entries of $AA^T$ is equal to $\sum_i\sum_j(A)_{ij}(A^T)_{ji}=\sum_i\sum_jA_{ij}^2$ (we usually write this as $\operatorname{tr}(AA^T)=\|A\|_F^2$, where $\|\cdot\|_F$ denotes Frobenius norm). Since $A_{ij}\in\{0,1,-1\}$, $A_{ij}^2$ is either $0$ or $1$.