<s>[INST] determinant of 3x3 matrix algebra not matching CAS Find
$$\begin{vmatrix} 
                          i & 2   & -1 
                       \\ 3 & 1+i & 2 
                     \\ -2i &  1  & 4-i                  \end{vmatrix}$$
we will expand along first row
 $$ \begin{aligned}
  \begin{vmatrix} 
                           i & 2   & -1 
                        \\ 3 & 1+i & 2 
                      \\ -2i &  1  & 4-i                 \end{vmatrix}
&=i \begin{vmatrix} 1+i & 2 \\ 1 & 4-i \end{vmatrix}
-2 \begin{vmatrix} 3 & 2 \\ -2i& 4-i \end{vmatrix}
-1 \begin{vmatrix} 3 & 1+i \\ -2i & 1 \end{vmatrix}
\\&=i[(1+i)(4-i)-2]
 -2[3(4-i)-2(-2i)]
 -1[3-(1+i)(-2i)]
\\&=i[1(4-i)+i(4-i)-2]
    -2[12-3i+4i]
    -1[3+(2i)(1+i)]
\\ &= i[4-i+4i-i^2-2]
     -2[12+i]
     -1[3+2i+2i^2]
\\ &=i[4-3i+1-2]-2[12+i]-1[3+2i-2]
\\ &= i[3-3i]-2[12+i]-1[1+2i]
\\ &=i(3-3i)-2(12+i)-1(1+2i)
\\ &=3i-3i^2-24-2i-1-2i
\\ &=3i+3-24-2i-1-2i
\\ &=3-24-1+3i-2i-2i
\\& =22-i
\end{aligned}
$$
Did something wrong. Some silly algebra mistake, did not use the cofactor expansion formula right??  Cannot catch and is time to ask for help. 
This is what maxima spits out it say the det is -28-i

 [/INST] $$ \begin{aligned}
  \begin{vmatrix} 
                           i & 2   & -1 
                        \\ 3 & 1+i & 2 
                      \\ -2i &  1  & 4-i                 \end{vmatrix}
&=i \begin{vmatrix} 1+i & 2 \\ 1 & 4-i \end{vmatrix}
-2 \begin{vmatrix} 3 & 2 \\ -2i& 4-i \end{vmatrix}
-1 \begin{vmatrix} 3 & 1+i \\ -2i & 1 \end{vmatrix}
\\&=i[(1+i)(4-i)-2]
 -2[3(4-i)-2(-2i)]
 -1[3-(1+i)(-2i)]
\\&=i[1(4-i)+i(4-i)-2]
    -2[12-3i+4i]
    -1[3+(2i)(1+i)]
\\ &= i[4-i+4i-i^2-2]
     -2[12+i]
     -1[3+2i+2i^2]
\\ &=i[4 \color{red}{+3i}+1-2]-2[12+i]-1[3+2i-2]
\\ &= i[3\color{red}{+3i}]-2[12+i]-1[1+2i]
\\ &=i(3\color{red}{+3i})-2(12+i)-1(1+2i)
\\ &=3i\color{red}{+3i^2}-24-2i-1-2i
\\ &=3i\color{red}{-3}-24-2i-1-2i
\\ &=\color{red}{-3}-24-1+3i-2i-2i
\\& =\color{red}{-28}-i
\end{aligned}
$$
</s>