How many 3×3 matrices M with entries from {0,1,2} are there, for which the sum of the diagonal entries of MTM is 5 [2017]
(2)
Let M=[a1a2a3a4a5a6a7a8a9], where ai∈{0,1,2}
Then MTM=[a1a4a7a2a5a8a3a6a9][a1a2a3a4a5a6a7a8a9]
Sum of the diagonal entries in MTM=5
⇒(a12+a42+a72)+(a22+a52+a82)+(a32+a62+a92)=5,
which is possible when
Case I: Five ai's are 1 and four ai's are zero.
Which can be done in C49 ways
=9×8×7×64×3×2×1=126
Case II: One ai is 1, one ai is 2 and the remaining seven ai's are zero
It can be done in C19×C18=9×8=72 ways
∴ Total number of ways=126+72=198