Question:
Let $\mathrm{M}$ be any $3 \times 3$ matrix with entries from the set $\{0,1,2\}$. The maximum number of such matrices, for which the sum of diagonal elements of $\mathrm{M}^{\mathrm{T}} \mathrm{M}$ is seven, is
Solution:
$\left[\begin{array}{lll}a & b & c \\ d & e & f \\ g & h & i\end{array}\right]\left[\begin{array}{lll}a & d & g \\ b & e & h \\ c & f & i\end{array}\right]$
$a^{2}+b^{2}+c^{2}+d^{2}+e^{2}+f^{2}+g^{2}+h^{2}+i^{2}=7$
Case-I : Seven (1's) and two ( 0 's)
${ }^{9} \mathrm{C}_{2}=36$
Case-II : One $(2)$ and three ( 1 's) and five $(0$ 's $)$
$\frac{9 !}{5 ! 3 !}=504$
$\therefore$ Total $=540$