I posted a question on this, and the number of matrices came to be 36:
The number of $3\times3$ non singular matrices with four entries as 1 and all other entries as 0, is (JEE Main 2010)
However, I also came across this, which counts the same thing for three by three matrices with exactly four elements being an $a$, the answer there is 45.
I am trying to reconcile the two. What is different in the second question that makes the answer 45 (as compared to 36).