Det of matrix $4\times 4$

74 Views Asked by At

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?

4

There are 4 best solutions below

0
On BEST ANSWER

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}$$

0
On

No, it is not valid. My computation using Octave shows that the determinant is negative.

octave:1> A = [ 2 2 1 3; 1 4 4 5; 5 1 1 6; 7 1 4 5]
A =

   2   2   1   3
   1   4   4   5
   5   1   1   6
   7   1   4   5

octave:2> det(A)
ans = -114.00
0
On

No, it isn't valid. When you calculate the determinant of an $n\times n$ matrix by minors, you compute $n!$ products. When $n=3, n!=6$ and there are $6$ broken diagonals, and the "spaghetti rule" still involves $6$ products. But when $n=4, n!=24,$ and there are only $8$ broken diagonals, so there isn't much hope.

You can easily come up with examples to prove it doesn't work. (In fact, I imagine it's harder to come up with examples where it does work.)

0
On

The fastest method is Gaussian elimination to obtain a triangular matrix – in this case the determinant is the product of the diagonal elements: \begin{align} &\begin{vmatrix} 2&2&1&3\\1&4&4&5\\5&1&1&6\\7&1&4&5 \end{vmatrix} =-\begin{vmatrix} 1&4&4&5\\2&2&1&3\\5&1&1&6\\7&1&4&5 \end{vmatrix} =-\begin{vmatrix}\begin{array}{rrrr} 1&4&4&5\\0&-6&-7&-7\\0&-19&-19&-19\\0&-27&-24&-30 \end{array}\end{vmatrix}=19\times 3\begin{vmatrix}\begin{array}{rrrr} 1&4&4&5\\0&6&7&7\\0&1&1&1\\0&9&8&10 \end{array}\end{vmatrix}\\[1ex] =&-19\times 3\begin{vmatrix}\begin{array}{rrrr} 1&4&4&5\\0&1&1&1\\0&6&7&7\\0&9&8&10 \end{array}\end{vmatrix}=-19\times 3\begin{vmatrix}\begin{array}{rrrr} 1&4&4&5\\0&1&1&1\\0&0&1&1\\0&0&-1&1 \end{array}\end{vmatrix} =-19\times 3\begin{vmatrix} 1&4&4&5\\0&1&1&1\\0&0&1&1\\0&0&0&2 \end{vmatrix}=-114\\ & \end{align}

However, in the case of $4\times4$ matrices, you have two other possibilities, for a computation by blocks:

  • If $M=\begin{pmatrix}A&B\\C&D \end{pmatrix}$ is a $4×4$ matrix consisting of blocks of size $2$, and if $CD=DC$, then we can compute a $2×2$ determinant: $$\det M=\det(AD-BC).$$
  • We can use Laplace's expansion along the first two columns. To explain the computation, we introduce some notations:

\begin{array}{ll} p_{ij}&\text{is the $2×2$ determinant of rows $i$ and $j$ of the first two columns},\\ q_{ij}&\text{is the $2×2$ determinant of rows $i$ and $j$ of the last two columns.} \end{array} With these notations, one has $$\det M=p_{12}q_{34}+p_{13}q_{42}+p_{14}q_{23}+q_{12}p_{34}+q_{13}p_{42}+q_{14}p_{23}.$$