<s>[INST] Finding the determinant of a $4\times4$ matrix 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? 
 [/INST] A "quick" method to compute the determinant of a $4 \times 4$ matrix by hand, is by using cofactor expansion.
Let $ D =
\begin{pmatrix}
1 & 1 & -2 & 3 \\
3 & 1 &-6 & 8 \\
0 & 7 & 3 & 0 \\
-1 & 8 & 7 & -4 
\end{pmatrix}$
Here we are going to choose which row/column contains the most $0$'s Clearly, row 3 contains the most. So we will exand along that row.
Start with the first term in row three, which is $0$ and multiply it to the $(n-1) \times (n-1)$ sub-matrix $M$, which you can obtain by covering up the column and rows that intersect at the term. Which should look like this:
$0 \cdot
\begin{pmatrix}
 1 & -2 & 3 \\
 1 &-6 & 8 \\
 8 & 7 & -4 
\end{pmatrix}$
As you can see, we can obtain a $3 \times 3$ matrix containing all original entries of our $4 \times 4$ matrix, excluding those from column 1 and row 2.
Now, we repeat this process for the remain terms in row three: $7,3,0$:
$\text{det}(D) =$
$ 0 \cdot
\begin{pmatrix}
 1 & -2 & 3 \\
 1 &-6 & 8 \\
 8 & 7 & -4 
\end{pmatrix} $
$- 7 \cdot
\begin{pmatrix}
1  & -2 & 3 \\
3  &-6 & 8 \\ 
-1 & 7 & -4 
\end{pmatrix} +$
$ 3 \cdot
\begin{pmatrix}
1 & 1  & 3 \\
3 & 1  & 8 \\
-1 & 8  & -4 
\end{pmatrix} - $
$0 \begin{pmatrix}
1 & 1 & -2  \\
3 & 1 &-6 \\
-1 & 8 & 7  
\end{pmatrix}$
The matrices being mutliplied by $0$ can be discarded. So we are left with:
$\text{det}(D) = - 7 \cdot
\begin{pmatrix}
1  & -2 & 3 \\
3  &-6 & 8 \\ 
-1 & 7 & -4 
\end{pmatrix}+$
$ 3 \cdot
\begin{pmatrix}
1 & 1  & 3 \\
3 & 1  & 8 \\
-1 & 8  & -4 
\end{pmatrix}$
Expanding along row 1 in both resulting $3 \times 3$ matrices and we get:
$\text{det}(D) =$
$ -7 \cdot \{\begin{pmatrix}
-6 & 8 \\ 
 7 & -4 
\end{pmatrix} + $
$2 \cdot \begin{pmatrix}
3  & 8 \\ 
-1 & -4 
\end{pmatrix} + $
$3 \cdot \begin{pmatrix}
3 &-6  \\
 8 & 7 
\end{pmatrix}\} + $
$
3 \cdot \{ \begin{pmatrix}
 1  & 8 \\
 8  & -4 
\end{pmatrix} - $
$\begin{pmatrix}
3  & 8 \\
-1   & -4 
\end{pmatrix} + $
$ 3 \cdot \begin{pmatrix}
3 & 1  \\
-1 & 8   
\end{pmatrix}\}$
Now all you have left is to comupute six $2 \times 2$ matrices.
As far as computing this with variables, the same principles of cofactor expansion can be applied. Just determine which row/column contains the most $0$'s (if any) and expand along that row.
</s>