• No results found

Permutations

In document Linear Algebra (Page 170-174)

7.7 LU Redux

8.1.2 Permutations

Considernobjects labeled 1 throughn and shuffle them. Each possible shuf- fle is called apermutation. For example, here is an example of a permutation of 1–5: σ= 1 2 3 4 5 4 2 5 1 3

8.1 The Determinant Formula 171

We can consider a permutation σ as an invertible function from the set of numbers [n] := {1,2, . . . , n} to [n], so can write σ(3) = 5 in the above example. In general we can write

1 2 3 4 5

σ(1) σ(2) σ(3) σ(4) σ(5)

,

but since the top line of any permutation is always the same, we can omit it and just write:

σ=σ(1) σ(2) σ(3) σ(4) σ(5) and so our example becomes simply σ = [4 2 5 1 3].

The mathematics of permutations is extensive; there are a few key prop- erties of permutations that we’ll need:

• There aren! permutations ofndistinct objects, since there arenchoices for the first object, n−1 choices for the second once the first has been chosen, and so on.

• Every permutation can be built up by successively swapping pairs of objects. For example, to build up the permutation 3 1 2 from the trivial permutation

1 2 3

, you can first swap 2 and 3, and then swap 1 and 3.

• For any given permutationσ, there is some number of swaps it takes to build up the permutation. (It’s simplest to use the minimum number of swaps, but you don’t have to: it turns out thatany way of building up the permutation from swaps will have have the same parity of swaps, either even or odd.) If this number happens to be even, then σ is called an even permutation; if this number is odd, then σ is an odd permutation. In fact, n! is even for all n ≥ 2, and exactly half of the permutations are even and the other half are odd. It’s worth noting that the trivial permutation (which sends i→i for every i) is an even permutation, since it uses zero swaps.

Definition The sign function is a function sgn that sends permutations to the set {−1,1} with rule of correspondence defined by

sgn(σ) =

1 if σ is even −1 if σ is odd.

Permutation Example

Reading homework: problem 1

We can use permutations to give a definition of the determinant. Definition The determinantof n×n matrix M is

detM

=

P

σ

sgn(σ)m

1 σ(1)

m

2 σ(2)

· · ·m

n σ(n)

.

The sum is over all permutations of n objects; a sum over the all elements of {σ : {1, . . . , n} → {1, . . . , n}}. Each summand is a product of n entries from the matrix with each factor from a different row. In different terms of the sum the column numbers are shuffled by different permutations σ.

The last statement about the summands yields a nice property of the determinant:

Theorem 8.1.1. If M = (mij) has a row consisting entirely of zeros, then

mi

σ(i) = 0 for every σ and some i. Moreover detM = 0.

Example 102 Because there are many permutations of n, writing the determinant this way for a general matrix gives a very long sum. For n = 4, there are 24 = 4!

permutations, and forn= 5, there are already 120 = 5!permutations.

For a4×4matrix, M =      m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34 m41 m42 m43 m44     

, then detM is:

detM = m11m22m33m44−m11m23m32m44−m11m22m34m43

− m12m21m33m44+m11m32m34m42+m11m24m32m43 + m12m23m31m44+m12m21m34m43±16 more terms.

8.1 The Determinant Formula 173

This is very cumbersome.

Luckily, it is very easy to compute the determinants of certain matrices. For example, if M is diagonal, meaning that Mi

j = 0 whenever i 6= j, then all summands of the determinant involving off-diagonal entries vanish and

detM =X σ

sgn(σ)m1σ(1)m2σ(2)· · ·mnσ(n) =m11m22· · ·mnn.

The determinant of a diagonal matrix is the product of its diagonal entries.

Since the identity matrix is diagonal with all diagonal entries equal to one, we have

detI = 1.

We would like to use the determinant to decide whether a matrix is in- vertible. Previously, we computed the inverse of a matrix by applying row operations. Therefore we ask what happens to the determinant when row operations are applied to a matrix.

Swapping rows Lets swap rowsiandjof a matrixM and then compute its determi- nant. For the permutationσ, letσˆ be the permutation obtained by swapping positions

iand j. Clearly

sgn(ˆσ) =−sgn(σ).

Let M0 be the matrixM with rowsi andj swapped. Then (assuming i < j):

detM0 = X σ sgn(σ)m1σ(1)· · ·mjσ(i)· · ·miσ(j)· · ·mnσ(n) = X σ sgn(σ)m1σ(1)· · ·miσ(j)· · ·mjσ(i)· · ·mnσ(n) = X σ (−sgn(ˆσ))mσˆ1(1)· · ·miσˆ(i)· · ·mjˆσ(j)· · ·mnˆσ(n) = −X ˆ σ sgn(ˆσ)m1σˆ(1)· · ·miσˆ(i)· · ·mjσˆ(j)· · ·mnσˆ(n) = −detM.

The step replacing P σ by

P ˆ

σ often causes confusion; it holds since we sum over all

permutations (see review problem 3). Thus we see that swapping rows changes the sign of the determinant. I.e.,

Figure 8.2: Remember what row swap does to determinants!

Reading homework: problem 8.2

Applying this result to M =I (the identity matrix) yields

detEij =−1,

where the matrixEji is the identity matrix with rowsiandjswapped. It is a row swap elementary matrix.

This implies another nice property of the determinant. If two rows of the matrix are identical, then swapping the rows changes the sign of the matrix, but leaves the matrix unchanged. Then we see the following:

Theorem 8.1.2. If M has two identical rows, thendetM = 0.

In document Linear Algebra (Page 170-174)

Related documents