I have almost always seen the determinant expanded by using the first row:
$$ A = \begin{vmatrix} a & b & c\\ d & e & f\\ g & h & i \end{vmatrix} $$
Such as:
$ |A| = a(ei−fh)−b(di−fg)+c(dh−eg) $
How does the expansion by 2nd and 3rd rows work?
Here's what I have tried to guess:
Expanding by 2nd row:
$ |A| = -d(bi−ch)+e(ai−cg)-f(ah−bg) $
Expanding by 3rd row:
$ |A| = g(bf−ce)-h(af−cd)-i(ae−bd) $
Let me know if the above is right.
A determinant is an alternating multi-linear form. From that, $\det(\vec x_1+\vec x_2,\vec y,\vec z)=det(\vec x_1,\vec y,\vec z)+det(\vec x_2,\vec y,\vec z)$, and $\det(\vec x,\vec y-\alpha\vec x,\vec z-\beta\vec x)$ so hence
$\det A = \begin{vmatrix} a & b & c\\ 0 & e & f\\ 0& h & i \end{vmatrix} +\begin{vmatrix} 0 & b & c\\ d & e & f\\ 0 & h & i \end{vmatrix}+\begin{vmatrix} 0 & b & c\\ 0 & e & f\\ g & h & i \end{vmatrix}=a\begin{vmatrix} 1 & b & c\\ 0 & e & f\\ 0& h & i \end{vmatrix} +d\begin{vmatrix} 0 & b & c\\ 1 & e & f\\ 0 & h & i \end{vmatrix}+g\begin{vmatrix} 0 & b & c\\ 0 & e & f\\ 1 & h & i \end{vmatrix}=a\begin{vmatrix} 1 & 0 & 0\\ 0 & e & f\\ 0& h & i \end{vmatrix} +d\begin{vmatrix} 0 & b & c\\ 1 & 0 & 0\\ 0 & h & i \end{vmatrix}+g\begin{vmatrix} 0 & b & c\\ 0 & e & f\\ 1 & 0 & 0 \end{vmatrix}$.