[Math] Finding the determinant of a $4\times4$ matrix

determinantmatrices

How does one find the determinant of a $4\times 4$ matrix? I am using Cramer's rule to solve a system of linear equations but don't know how to find the determinant of a $4\times 4$ matrix. Our matrix is with variables and not actual values so the answer will be in terms of the variables. Is there a rule/formula that I can use to get the determinant without using co-factor expansion?

The matrix given is

\begin{bmatrix}
1 & 1 & -2 & 3 \\
3 & 1 &-6 & 8 \\
0 & 7 & 3 & 0 \\
-1 & 8 & 7 & -4
\end{bmatrix}

, but then to use cramers rule and then to find the subsequent determinants the matrix will change? so was hoping for a general formula?

Best Answer

When using Cramer's rule, there will be no variables whatsoever, rather, you know that the coordinates of the solution to $Ax=b$ are given by $$x_i=\frac{\det{(A\mid i)}}{\det A}$$ where $(A|i)$ is the matrix obtained by replacing $A$'s $i-th$ column with the column vector $b$. I give you an example on how to compute $\det A$, and maybe you can compute the remaining determinants yourself. Recall how how the detereminant behaves:

$({\rm i})$ It remains unchanged if we sum a multiple of a row (column) to another row (column)

$(\rm ii)$ It changes sign if we permute two rows (columns)

$(\rm iii)$ Scalars hop off the determinant.

Thus you may partially triagulate your matrix and operate as follows $$\begin{align} \det \left( {\begin{matrix} 1 & 1 & { - 2} & 3 \\ 0 & { - 2} & 0 & { - 1} \\ 0 & 7 & 3 & 0 \\ 0 & 9 & 5 & { - 1} \\ \end{matrix} } \right) &= - \det \left( {\begin{matrix} 1 & 1 & { - 2} & 3 \\ 0 & 2 & 0 & 1 \\ 0 & 7 & 3 & 0 \\ 0 & 9 & 5 & { - 1} \\ \end{matrix} } \right) \cr \text{cofactor} &= - \det \left( {\begin{matrix} 2 & 0 & 1 \\ 7 & 3 & 0 \\ 9 & 5 & { - 1} \\ \end{matrix} } \right) \cr R_2-3R_1\to R_2'\;,R_3-9R'_2\to R_3'\;\; &= - \det \left( {\begin{matrix} 0 & { - 6} & 7 \\ 1 & 3 & { - 3} \\ 0 & { - 22} & {26} \\ \end{matrix} } \right) \cr \text{ permute rows } &= \det \left( {\begin{matrix} 1 & 3 & { - 3} \\ 0 & { - 6} & 7 \\ 0 & { - 22} & {26} \\ \end{matrix} } \right) \cr \text{ cofactor } &= \det \left( {\begin{matrix} { - 6} & 7 \\ { - 22} & {26} \\ \end{matrix} } \right) = - 2 \end{align} $$

You can also triangulate it, and just calculate $\prod a_{ii}$ which is almost what I did above. Here is W|A's computation.


ADD There is a formula that does not involve cofactors, but it involves $4!=24$ terms, namely $$\det A=\sum_{\sigma \in S_4}\operatorname{sgn}\sigma a_{1\sigma(1)}\cdots a_{n\sigma(n)}$$

Related Question