# Leibniz formula for determinants even/odd?

I am trying to get my head around the Leibniz formula for this $$3 \times 3$$ determinant. I know that

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}$$

But I don't know how we work out the signs in each case above? Could someone show me how? I know the sign is $$+$$ when the permutation is even but how is $$a_{1,1}a_{2,2}a_{3,3}$$ even but $$a_{1,2}a_{2,1}a_{3,3}$$ is odd?

• both of them have negative signs in what you wrote. Nov 29, 2020 at 15:26
• Did you even look at the indices properly? There is a minus sign in front of $a_{13}a_{22}a_{31}$. Nov 29, 2020 at 15:27
• Sorry my mistake, corrected now
– user635953
Nov 29, 2020 at 15:30
• There are many different ways to find the sign of a permutation. The formular $\prod_{i<j} \frac{i-j}{\sigma(i)-\sigma(j)}$, counting inversions, using cycle length in the disjoint cycle decomposition, counting how many transpositions you need to decompose $\sigma$ as a product of such, … Pick the one you like best! Nov 29, 2020 at 15:34

An alternative odd/even property is the parity of the number of inversions. An inversion of a permutation $$\sigma$$ is defined to be the set $$Inv(\sigma)=\{(i,j):i\sigma _j\}.$$ So, in your case $$Inv(321)=\{(1,2),(1,3),(2,3)\}$$ because $$3>1$$ and $$3>2$$ and $$2>1$$ is odd because it has $$3$$ inversions and $$Inv(213)=\{(1,2)\}$$ (the only one is $$2>1$$) also has $$1$$ so is odd. In general, the sign of a permutation $$\sigma$$ is $$(-1)^{|Inv(\sigma)|}.$$