Find the area of a triangle whose vertices are (1,0), (2,2), and (4,3)
$$\begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix}=\begin{vmatrix}1&0&1\\2&2&1\\4&3&1\end{vmatrix}$$
$$=1(-1)^2\begin{vmatrix}2&1\\3&1\end{vmatrix}+0(-1)^3\begin{vmatrix}2&1\\4&1\end{vmatrix}+1(-1)^4\begin{vmatrix}2&2\\4&3\end{vmatrix}$$ $$=1(-1)+0+1(-2)$$ $$=-3$$
Then you multiply by $-\frac{1}{2}$ to get a positive area of $\frac{3}{2}$.
My question is where does $-1$ come from in the second line of the equation and why is it being squared first, then cubed, then raised to a power of 4?
It comes from $$\det(A) = \sum_{j=1}^n (-1)^{i+j} a_{i,j} M_{i,j}$$ with $n=3$ and minor $M_{i,j}$, where $i=1$. So in this case $$\det(A) = \sum_{j=1}^3 a_{1,j}(-1)^{1+j} M_{1,j}=1(-1)^2\begin{vmatrix}2&1\\3&1\end{vmatrix}+0(-1)^3\begin{vmatrix}2&1\\4&1\end{vmatrix}+1(-1)^4\begin{vmatrix}2&2\\4&3\end{vmatrix}$$