The number of all 3×3 matrices A, with entries from the set {−1,0,1}, such that the sum of the diagonal elements of AAT is 3, is\_\_\_\_\_\_.
Answer: 672
Solutions · 1
Official solution
trace(AAT) equals the sum of squares of the 9 entries, so we need exactly 3 entries equal to ±1 and 6 entries equal to 0.
Choose which 3 of the 9 positions are non-zero: (39)=84 ways; each independently +1 or −1: 23=8 ways.
Total =84×8=672.