How many matrices M with entries from {0,1,2} are there, for which the sum of the diagonal entries of is 5?
For , the -th diagonal entry of is , the sum of squares of column , so
Each of the nine entries contributes , or to this sum, so arises in only two ways.
One entry , one entry and seven entries : the can be placed in 9 ways and the in 8 ways, giving matrices.
Five entries and four entries : matrices.
Total .
Hence, the correct option is (B).
Tagged Trace and special matrices. Machine-assigned, so read it as a strong shortlist rather than a verdict.