Consider $A$ as on the $n\times n$ chessboard. Then each product would correspond to a setting of $n$ rooks which cannot hit each other (each row and each column will contain exactly one rook, the column index of the rook in terms of the row index is the permutation $\sigma$). Then, if the permutation is odd (contains an odd number of cycles of length even (e.g. transpositions)) the product of the entities gets a minus sign.
Probably a recursive definition would get you closer (expanding by the first row):
- for a $1\times 1$ matrix $\det\pmatrix{a}:=a$.
- for $A\in M_{n}(\Bbb C)$, let $A_{i}$ denote the matrix where we delete the $i$th column and first row from $A$, and let the first row be $(a_1,\dots,a_n)$, then define
$$\det\pmatrix{a_1&\dots&a_n\\ \vdots & \ddots & \vdots \\
&\dots &}:=a_1\det(A_1)-a_2\det(A_2)+a_3\det(A_3)-\dots$$
By induction it is possible to prove that we get back the same expression (each permutation will be counted, exactly once, with the appropriate sign).
The geometrical meaning!
Let $v_1,..,v_n$ be vectors in $\Bbb R^n$, written -say- as column vectors in the matrix $A$. Then $\det(A)$ is just the (signed) $\,n$ dimensional volume of the $n$ dimensional parallelepipedone spanned by $v_1,...,v_n$. The sign is positive iff the vectors $v_1,...,v_n$ in this order are in the 'same direction' as the standard basis $e_1,..,e_n$.
And to show that the quantity described at 3. indeed gives the determinant defined at 2, observe the following:
- Let $V$ denote the signed volume described in 3., then it is multilinear, in particular
$$\lambda_i\, V( e_i,v_2,..,v_n)+\lambda_j\, V( e_j,v_2,..,v_n)=
V(\lambda_i e_i+\lambda_j e_j,\,v_2,..,v_n)$$
- If we consider a parallelepippedon spanned by $v_1,..,v_n$, placed on the origin, and we move its 'top face' along a vector that is on the 'base face', then the height doesn't change, so neither changes $V$, meaning algebraically:
$$V(v_1,v_2,v_3,...,v_n)=V(v_1,\,v_2-\lambda v_1,v_3,...,v_n)$$
Applying these steps is called the Gauss elimination of the matrix (actually, one more step is included: to multiply a vector by a nonzero scalar), and it can always lead either to a matrix with a $0$ column or to the identity matrix $I$.
Knowing that, all you have to check is that the determinant and the signed volume coincides for these final cases, and that the steps of Gauss elimination do exactly the same effect on the determinant as on the signed volume.
Let
$$A=\begin{pmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{pmatrix}.$$
Using first row expansion, we get
$$\det(A)=a_{11}\det\begin{pmatrix}a_{22}&a_{23}\\a_{32}&a_{33}\end{pmatrix}-a_{12}\det\begin{pmatrix}a_{21}&a_{23}\\a_{31}&a_{33}\end{pmatrix}+a_{13}\det\begin{pmatrix}a_{21}&a_{22}\\a_{31}&a_{32}\end{pmatrix}\\
=a_{11}a_{22}a_{33}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}+a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{13}a_{22}a_{31}.$$
From the above formula, each term is in the form of $a_{1j_1}a_{2j_2}a_{3j_3}$ where the second indices $j_1, j_2, j_3$ is a permutation of $1,2,3$. For example, the first term has $1,2,3$ as the second indices; the second term has $1,3,2$; the third term has $2,1,3$, etc.
The sign of each term is the sign of the permutation. For example, the sign of $1,2,3$ is clearly $1$. For the second term, $1,3,2$ is obtained from $1,2,3$ by one transposition $2,3\rightarrow 3,2$, so the sign is $-1$, etc.
Generalizing this to $n\times n$ matrices gives the formula $\sum_{\pi}\text{sign}(\pi)a_{1\pi(1)}\cdots a_{n\pi(n)}$.
Best Answer
For one, but that might be irrelevant to you, this formula is not the way you want to actually compute determinants; there are much more efficient methods for that. But I will try to help you understand the formula.
We have an $n \times n$-matrix $A$. Its elements are $a_{i,j}$ as usual, or $a[i,j]$ in more C-like notation. The outer sum sums over all permutations (this set is $S_n$), so that is an outer loop. A permutation is just a reordering of the indices, like $(1,3,2)$ for $n=3$; for $n=3$ there are $3!$ permutations of the indices: $(1,2,3),(1,3,2),(2,1,3),(2,3,1),(3,1,2),(3,2,1)$, and for $n$ indices there are $n!$ in general. Here we can interpret this as a function: $(3,2,1)$ is the function that sends $1$ to $3$, $2$ to $2$ and $3$ to $1$, e.g. Now, each permutation has a sign $\operatorname{sgn}(\sigma)$, which is either +1 or -1. The identity has sign +1, while interchanging two elements of a permutation changes the sign to the opposite one. So $(1,3,2), (3,2,1), (2,1,3)$ are odd permutations on $n=3$, because we interchanged one pair. One can prove that half the permutations are even (have sign +1), and the other half has sign -1.
Now for each permutation $\sigma$ we take the multiplication of the elements of $A$ as specified by the permutation, interpreted as a map. So $(1,3,2)$ is the map $1 \rightarrow 1, 2 \rightarrow 3, 3 \rightarrow 2$, so we get the product $a_{1,1}a_{3,2}a_{2,3}$, where the second index is the original, the first its image under $\sigma$.
The formula says that $\det(A)$ is the sum of all such products where we consider all permutations of the index set, and the products from an odd permutation get a minus sign.
So for $n=3$ we get $$\det(A) = a_{1,1}a_{2,2}a_{3,3} - a_{1,1}a_{2,3}a_{3,2} - a_{1,3}a_{2,2}a_{3,1} - a_{1,2}a_{2,1}a_{3,3} + a_{1,2}a_{2,3}a_{3,1} + a_{1,3}a_{2,1}a_{3,2}$$ where the minus signs correspond to the odd permutations from above.
So you need algorithms to enumerate all permutations, and compute their signs, and then loop over all these products. It's quite complicated to get right, and not very efficient. But this formula allows one to prove some facts for determinants, so it has its uses.