Let S be the set containing all 3×3 matrices with entries from {−1,0,1}. The total number of matrices A∈S such that the sum of all the diagonal elements of ATA is 6 is \_\_\_\_\_\_\_\_.
Answer: 5376
Solutions · 1
Official solution
trace(ATA) equals the sum of squares of all 9 entries of A. With entries in {−1,0,1}, each square is 0 or 1, so this sum equals the number of non-zero entries. We need exactly 6 non-zero entries (each ±1) and 3 zero entries.
Choose which 6 of the 9 positions are non-zero: (69)=84 ways; each non-zero entry independently is +1 or −1: 26=64 ways.
Total =84×64=5376.