How many 3 × 3 matrices M with entries from {0, 1, 2} are there, for which the sum of the diagonal entries of M^{T} M is 5?
M is 3×3,mij∈{0,1,2}trace(MTM)=5To find: the number of such matrices M(1)126(2)198(3)162(4)135(MTM)ij=ci⋅cjtrace(MTM)=∣c1∣2+∣c2∣2+∣c3∣2cj=column j of Mcount ordered (c1,c2,c3) with ∑∣cj∣2=5c∈{0,1,2}3:∣c∣2=a+4b(a=#1,b=#2)∣c∣2∈{0,1,2,3,4,5}N(0)=1,N(1)=3,N(2)=3,N(3)=1,N(4)=3,N(5)=6(0,0,5),(0,1,4),(0,2,3),(1,1,3),(1,2,2)(0,0,5):3⋅N(0)2N(5)=3⋅6=18(0,1,4):6⋅N(0)N(1)N(4)=6⋅9=54(0,2,3):6⋅N(0)N(2)N(3)=6⋅3=18(1,1,3):3⋅N(1)2N(3)=3⋅9=27(1,2,2):3⋅N(1)N(2)2=3⋅27=81Total=18+54+18+27+81=198198⇒option (2)198⇒(2)