Is the method of calculating determinant of $3\times 3$ matrix by diagonals, apply also on $4\times 4$ matrix?
for example:
$$\begin{matrix}2&2&1&3|\\1&4&4&5|\\5&1&1&6|\\7&1&4&5|\end{matrix}\begin{matrix}2&2&1\\1&4&4\\5&1&1\\7&1&4\end{matrix}$$
$\det = 2\cdot4\cdot1\cdot5+\dotsb+3\cdot1\cdot1\cdot4 - 7\cdot1\cdot4\cdot3-\dotsb-5\cdot5\cdot4\cdot1 = 171$
Is this valid?
No the Rule of Sarrus is only valid for 3-by -3 matrices, in general for n-by -n matrices we can refer to Laplace expansion method, that is by the first row
$$\begin{vmatrix} 2& 2& 1& 3\\ 1& 4& 4& 5\\ 5& 1& 1& 6\\ 7& 1& 4& 5 \end{vmatrix}=2\begin{vmatrix} 4& 4& 5\\ 1& 1& 6\\ 1& 4& 5 \end{vmatrix}-2\begin{vmatrix} 1& 4& 5\\ 5& 1& 6\\ 7& 4& 5 \end{vmatrix}+1\begin{vmatrix} 1& 4& 5\\ 5& 1& 6\\ 7& 1& 5 \end{vmatrix}-3\begin{vmatrix} 1& 4& 4 \\ 5& 1& 1 \\ 7& 1& 4 \end{vmatrix}$$