For a 3×2 matrix A, the diagonal sum of ATA equals the sum of squares of all 6 elements of A. We need:
a112+a212+a312+a122+a222+a322=5 where each element is from {−2,−1,0,1,2}.
Possible squares: 02=0, (±1)2=1, (±2)2=4.
Case 1:
Distribution 4+1+0+0+0+0 (one ±2, one ±1, four 0's).
Arrangements: (16)×(15)=30.
Sign choices: 2×2=4. Total: 30×4=120.
Case 2:
Distribution 1+1+1+1+1+0 (five ±1, one 0).
Arrangements: (16)=6 ways to place the 0.
Sign choices for five ±1: 25=32. Total: 6×32=192.
Total matrices: 120+192=312