Determinant Cofactor
1. **Problem Statement:** Find the determinant of the matrix $$A = \begin{bmatrix} 1 & 0 & 0 & -1 \\ 3 & 1 & 2 & 2 \\ 1 & 0 & -2 & 1 \\ 2 & 0 & 0 & 1 \end{bmatrix}$$ using cofactor expansion.
2. **Formula and Rules:** The determinant of a 4x4 matrix can be found by expanding along any row or column using cofactors. The cofactor expansion along the first row is:
$$\det(A) = \sum_{j=1}^4 (-1)^{1+j} a_{1j} M_{1j}$$
where $a_{1j}$ are elements of the first row and $M_{1j}$ are the determinants of the 3x3 minors obtained by removing the first row and $j$-th column.
3. **Step-by-step Expansion:**
- Elements of the first row: $a_{11}=1$, $a_{12}=0$, $a_{13}=0$, $a_{14}=-1$.
- Since $a_{12}$ and $a_{13}$ are zero, their terms vanish.
- Calculate minors for $j=1$ and $j=4$.
4. **Minor $M_{11}$:** Remove first row and first column:
$$\begin{bmatrix} 1 & 2 & 2 \\ 0 & -2 & 1 \\ 0 & 0 & 1 \end{bmatrix}$$
Calculate its determinant:
$$\det(M_{11}) = 1 \times \begin{vmatrix} -2 & 1 \\ 0 & 1 \end{vmatrix} - 2 \times \begin{vmatrix} 0 & 1 \\ 0 & 1 \end{vmatrix} + 2 \times \begin{vmatrix} 0 & -2 \\ 0 & 0 \end{vmatrix}$$
Calculate each 2x2 determinant:
- $\begin{vmatrix} -2 & 1 \\ 0 & 1 \end{vmatrix} = (-2)(1) - (1)(0) = -2$
- $\begin{vmatrix} 0 & 1 \\ 0 & 1 \end{vmatrix} = 0 \times 1 - 1 \times 0 = 0$
- $\begin{vmatrix} 0 & -2 \\ 0 & 0 \end{vmatrix} = 0 \times 0 - (-2) \times 0 = 0$
So,
$$\det(M_{11}) = 1 \times (-2) - 2 \times 0 + 2 \times 0 = -2$$
5. **Minor $M_{14}$:** Remove first row and fourth column:
$$\begin{bmatrix} 3 & 1 & 2 \\ 1 & 0 & -2 \\ 2 & 0 & 0 \end{bmatrix}$$
Calculate its determinant:
$$\det(M_{14}) = 3 \times \begin{vmatrix} 0 & -2 \\ 0 & 0 \end{vmatrix} - 1 \times \begin{vmatrix} 1 & -2 \\ 2 & 0 \end{vmatrix} + 2 \times \begin{vmatrix} 1 & 0 \\ 2 & 0 \end{vmatrix}$$
Calculate each 2x2 determinant:
- $\begin{vmatrix} 0 & -2 \\ 0 & 0 \end{vmatrix} = 0 \times 0 - (-2) \times 0 = 0$
- $\begin{vmatrix} 1 & -2 \\ 2 & 0 \end{vmatrix} = 1 \times 0 - (-2) \times 2 = 4$
- $\begin{vmatrix} 1 & 0 \\ 2 & 0 \end{vmatrix} = 1 \times 0 - 0 \times 2 = 0$
So,
$$\det(M_{14}) = 3 \times 0 - 1 \times 4 + 2 \times 0 = -4$$
6. **Calculate determinant of $A$:**
$$\det(A) = (-1)^{1+1} \times 1 \times (-2) + (-1)^{1+4} \times (-1) \times (-4) = 1 \times (-2) + (-1)^5 \times (-1) \times (-4) = -2 - 4 = -6$$
7. **Final answer:**
$$\boxed{-6}$$