Given,
A 5×5 matrix whose each entry is either 0 or 1, is such that sum of entries of each column as well as each row is 1,
Taking a possible case we get,
[1000001000001000001000001]
Now arranging the above case we get,
[\begin{matrix}1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{matrix}]\begin{matrix}\rightarrow 5\text{ways} \\ \rightarrow 4\text{ways} \\ \rightarrow 3\text{ways} \\ \rightarrow 2\text{ways} \\ \rightarrow 1\text{way}\end{matrix}} because if we fix 1 at first row and first column then in second row first column 1 cannot come and vice-versa.
So total number of such matrices will be 5×4×3×2×1=120