+ All Categories
Home > Documents > Chapter 2_2015LA Notes(S)

Chapter 2_2015LA Notes(S)

Date post: 31-Jan-2016
Category:
Upload: afiq-de-winner
View: 243 times
Download: 0 times
Share this document with a friend
Description:
ddfd
Popular Tags:
31
1 Topic 2 DETERMINANTS Contents 2.1 Determinants by Cofactor Expansion 2.2 Evaluating Determinants by Row Reduction 2.3 Properties of Determinants; Cramer's Rule 2.4 Application to Cryptography 2.1 Determinants by Cofactor Expansion - One of main goals in this chapter is to obtain formula in finding inverses of matrices which is applicable to square matrices of all orders. - In order to do so, (i) Find the determinants of matrices (ii) Find the adjoints of matrices. Determinants of matrices - Determinant is a certain kind of function that associates a real number with a square matrix - Recall from chapter 1.4 on how to find inverses of matrices 2x2. - The inverse of matrix A (2x2) can be expressed in terms of the determinant as 1 1 1 det ad bc a b d b d b A A c d c A a c a - The expression ad bc is called determinant of matrix A. - Notation : determinant of matrix A is denoted as det A or A
Transcript
Page 1: Chapter 2_2015LA Notes(S)

1

Topic 2

DETERMINANTS

Contents

2.1 Determinants by Cofactor Expansion

2.2 Evaluating Determinants by Row Reduction

2.3 Properties of Determinants; Cramer's Rule

2.4 Application to Cryptography

2.1 Determinants by Cofactor Expansion

- One of main goals in this chapter is to obtain formula in finding inverses of matrices

which is applicable to square matrices of all orders.

- In order to do so,

(i) Find the determinants of matrices

(ii) Find the adjoints of matrices.

Determinants of matrices

- Determinant is a certain kind of function that associates a real number with a square

matrix

- Recall from chapter 1.4 on how to find inverses of matrices 2x2.

- The inverse of matrix A (2x2) can be expressed in terms of the determinant as

1 1 1

detad bc

a b d b d bA A

c d c Aa c a

- The expression ad bc is called determinant of matrix A.

- Notation : determinant of matrix A is denoted as det A or A

Page 2: Chapter 2_2015LA Notes(S)

2

- There are 3 methods to find determinants:

(1) Cofactor expansion

(2) Row reduction (chapter 2.2)

(3) Combinatorial Approach (this method does not work for determinants of 4 x 4

matrices and higher)

Definition of Minor

If A is a square matrix, then the minor of entry i j

a is denoted by i j

M

and is defined to be

determinant of sub matrix that remain after the ith row and jth column are deleted from A .

Example 1: How to find Minor of matrix A

Given a matrix

1 2 3

5 7 8

6 4 1

A

, find 11M , 23M and 32M .

- 11

1 2 37 8

5 7 8 7 32 394 1

6 4 1

A M

- 23

1 2 3

5 7 8

6 4 1

A M

- 32

1 2 3

5 7 8

6 4 1

A M

Page 3: Chapter 2_2015LA Notes(S)

3

Example 2: How to find Cofactor of matrix A

Given a matrix

1 2 3

5 7 8

6 4 1

A

, find 11C , 23C and 32C .

- 1 1

11 1139 1 39 39M C

- 2 3

23 23 1M C

- 32 32M C

- Notice that some of the cofactor and the minor of an element i ja

differ only in sign

( or ).

- A quick way to determine the choice of or sign of cofactor is to use the

“checkerboard” array

.....

.....

......

.....

- C11 = M11, C21 = - M21 , C13 = M13 , C34 = - M34 and so on.

Definition of Cofactor

If A is a square matrix, then the cofactor of entry aij is denoted by Cij = (1)i+j Mij

- 1 1 2 2det ...i i i i i n i nA a C a C a C (cofactor expansion along ith row)

- 1 1 2 2det ...j j j j n j n jA a C a C a C (cofactor expansion along jth column)

Page 4: Chapter 2_2015LA Notes(S)

4

Example 3: How to find the determinant of matrix 3x3 using cofactor expansion.

1 2 3

6 5 2

2 3 5

A

(a) along the first row

(b) along the second row

(c) along the third column

Solution

(a)

1 2 3 1 2 3 1 2 3

6 5 2 6 5 2 6 5 2

2 3 5 2 3 5 2 3 5

5 2 6 2 6 5

det( )3 5 2 5 2

1 23

3A

25 6 30 4 18 1

1

2 3 01

33

(b)

1 2 3 1 2 3 1 2 3

6 5 2 6 5 2 6 5 2

2 3 5 2 3 5 2 3 5

det( )A

133

Page 5: Chapter 2_2015LA Notes(S)

5

(c)

1 2 3 1 2 3 1 2 3

6 5 2 6 5 2 6 5 2

2 3 5 2 3 5 2 3 5

det( )A

133

Smart choice of row or column

* In matrix 4x4, it is good to choose the row or column that has the most zeros entry so that it

will be easiest to find the determinant using cofactor expansion.

Example 4: How to find the determinant of matrix 4x4 using cofactor expansion.

3 3 0 5

2 2 0 2

4 1 3 0

2 10 3 2

A

Solution

- By choosing column 3 – because it has the most zeros:

3 3 0 5

2 2 0 2det

4 1 3 0

2 10 3 2

A

2 2 2 3 3 5

0 4 1 0 0 4 1 0

2 10 2 2 10 2

3 3 5 3 3 5

3 2 2 2 3 2 2 2

2 10 2 4 1 0

3 3 5 3 3 5

3 2 2 2 3 2 2 2

2 10 2 4 1 0

choose row 1 choose column 3A B

Page 6: Chapter 2_2015LA Notes(S)

6

3 3 5

3 2 2 2

2 10 2

3 3 4 20 3 4 4 5 20 4

3 72 24 80

384

A

3 3 5

3 2 2 2

4 1 0

3 5 2 8 2 3 12 0 6 6

3 30 18 0

144

B

Example 5

Evaluate det (A)

(a)

2

0 2 1

1 2 2

0 0 1

A

(b)

12

1 3 1 1

1 1 0 3

3 0 0 3

8 1 0 0

A

Adjoint of a Matrix

384 144 240A B

Definition

If A is any nxn matrix and Cij is the cofactor of aij then the matrix

11 12 1

21 22 2

1 1 1

n

n

n n n

c c c

c c cC

c c c

is

called the matrix of cofactors from A. The transpose of this matrix is called the adjoint of A and

denoted by adj(A).

CT = adj (A)

Page 7: Chapter 2_2015LA Notes(S)

7

Example 6: How to find Adjoint of matrix A

Given,

1 2 3

5 7 8

6 4 1

A

. Find the adjoint of A (adj(A)).

* in order to find the adjoint of matrix A, first, find the matrix of cofactors from matrix A.

Solution

(i)

7 8 5 8 5 7( ) ( ) ( )

4 1 6 1 6 439 53 22

2 3 1 3 1 2( ) ( ) ( ) 14 19 8

4 1 6 1 6 45 7 3

2 3 1 3 1 2( ) ( ) ( )

7 8 5 8 5 7

AC

(ii) adj(A) = C T =

39 14 5

53 19 7

22 8 3

Example 7

Find the adjoint of matrices A and B.

(a)

1 0 2

3 4 6

1 2 3

A

(b)

1 4 1

B 4 1 2

2 2 3

Page 8: Chapter 2_2015LA Notes(S)

8

* once the determinant and adjoint of matrix A are obtained, now we can find the inverse of

matrix A by using a formula in the Definition.

Inverse of a Matrix Using Its Adjoint

Example 8: How to find inverse of matrix A

1 2 3

5 7 8

6 4 1

A

Solution

(i) det A 1(7-32) +(-2)(-5-48) +3(20-42) = 1

(ii) From Example 6, adj A

39 14 5

53 19 7

22 8 3

(iii) Inverse of matrix,

1 1( )

det ( )A adj A

A

39 14 51

53 19 71

22 8 3

39 14 5

53 19 7

22 8 3

Definition

If A is an invertible matrix, then

1 1( )

det ( )A adj A

A

Page 9: Chapter 2_2015LA Notes(S)

9

Example 9

Find the inverse of matrices A and B.

(a)

1 0 2

3 4 6

1 2 3

A

(b)

1 4 1

4 1 2

2 2 3

B

Page 10: Chapter 2_2015LA Notes(S)

10

uppertriangular matrix

lowertriangular matrix

Determinant of triangular matrices

If A is an n x n triangular matrix (lower triangular, upper triangular or diagonal) then det(A) is

the product of the entries on the main diagonal of the matrix that is 11 22 33det ... nnA a a a a .

Example 10

(a)

3 0 0

1 4 0

2 1 5

A

det = 3 x 4 x 5 = 60A

(b)

2 3 1 4

0 3 4 2

0 0 1 3

0 0 0 4

A

det 2 x 3 x (-1) x 4

24

A

A Useful Technique for Evaluating 2 x 2 and 3 x 3 Determinants

- Arrow technique to find the determinant of matrices 2x2 and 3x3 (It does not work for

matrices of size 4x4 or higher).

(a) 2x2 matrix 11 12

21 22

a a

a a

Example 11

5 1

det 5 13 1 10 5510 13

Page 11: Chapter 2_2015LA Notes(S)

11

(b) 3x3 matrix

11 12 13 11 12

21 22 23 21 22

31 32 33 31 32

a a a a a

a a a a a

a a a a a

22 23 21 23 21 22

11 12 13

32 33 31 33 331 32

a a a a a aa a a

a a a a a a

11 22 33 23 32 12 21 33 23 31 13 21 32 22 31

11 22 33 12 23 31 13 21 32 13 22 31 12 21 33 11 23 32

a a a a a a a a a a a a a a a

a a a a a a a a a a a a a a a a a a

Example 12

1 2 3

det 4 5 6

7 8 9

1 2 3 1 2

4 5 6 4 5

7 8 9 7 8

45 84 96 105 48 72 240

Page 12: Chapter 2_2015LA Notes(S)

12

2.2 Evaluating Determinants by Row Reduction

BASIC THEOREM ON DETERMINANT

1. Let A be a square matrix. If A has a row of zeros or a column of zeros, then

det(A) = 0

Example 13

1 4 6

2 2 3 det( ) 0

0 0 0

A A

1 4 0

2 3 0 det( ) 0

3 1 0

B B

2. Let A be a square matrix, then

det(A) = det (AT)

Example 14

1 0 2 1 1 2

1 1 3 0 1 5

2 5 4 2 3 4

TA A

det(A) = 25 det (A T) = 25

Page 13: Chapter 2_2015LA Notes(S)

13

3. Let A be a n x n matrix

(a) If B is a matrix that results when a single row or single column of A is multiplied by a

scalar k then

det (B) = k det (A)

Example 15(a)

1

1 0 2 2 0 4

1 1 3 2R 1 1 3

2 5 4 2 5 4

A B

det(A) = 25 det (B) = 2 det(A)

= 2(25) = 50

(b) If B is a matrix that results when two rows or two columns of A are interchanged, then

det (B) = − det (A)

Example 15(b)

2 3

1 0 2 1 0 2

1 1 3 R R 2 5 4

2 5 4 1 1 3

det( ) 25

A B

A

det(B) = − det(A) = −25

(c) If B is a matrix that results when a multiple of one row of A is added to another row or

when a multiple of one column of A is added to another column then

det (B) = det (A)

Page 14: Chapter 2_2015LA Notes(S)

14

Example 15(c)

2 1 1

det( ) 25det( ) 25

1 0 2 0 1 5

1 1 3 R +R R 1 1 3

2 5 4 2 5 4

BA

A B

4. Let E be a n x n elementary matrix.

(a) If E results from multiplying a row of In by k then det (E) = k

Example 16(a)

3 3

1 0 0 1 0 0

0 1 0 3R R 0 1 0

0 0 1 0 0 3

A E

det(E) = 3

(b) If E results from interchanging two row of In , then

det(E) = 1 [i.e. det (E) = - det (In)]

Example 16(b)

2 3

1 0 0 1 0 0

0 1 0 R R 0 0 1

0 0 1 0 1 0

I E

det(E) = −1

Page 15: Chapter 2_2015LA Notes(S)

15

(c) If E results from adding a multiple of one row of In to another row, then det (E) = 1

Example 16(c)

3 1 1

1 0 0 1 0 3

0 1 0 3R R R 0 1 0

0 0 1 0 0 1

A E

det(In) = 1 det(E) = 1

5. Let A be a square matrix with two proportional rows/columns, then

det(A) = 0

(proportional : a row (column) is a multiple of another row (column))

Example 17

(a)

1 2 7

4 8 5

2 4 3

A

2 2 1

det( ) 0

Column column

A

(b) 3 1

1 2 4

3 4 5 2

2 4 8

A R R

det( ) 0A

EVALUATING DETERMINANTS BY ROW REDUCTION

- This row reduction method is a method that involves substantially less computation than

cofactor expansion.

- The idea of the method is to reduce the given matrix to upper triangular form by

elementary row operation.

Page 16: Chapter 2_2015LA Notes(S)

16

Example 18: Evaluating det(A) by row reduction

0 1 5

3 6 9

2 6 1

A

Solution

- Firstly, we will reduce the matrix A to row echelon form

(which is upper triangular)

0 1 5

det( ) 3 6 9

2 6 1

A

3 6 9the first and second rows of

1 0 1 5 were interchanged

2 6 1

1 2 3 a common factor of 3 from the

3 0 1 5 first row was taken through

2 6 1 the determinant sign

A

1 2 32 times the first row was

3 0 1 5added to the third row

0 10 5

1 2 310 times the second row

3 0 1 5was added to the third row

0 0 55

1 2 3 a common factor of 55

3 55 0 1 5 from the last row was taken

0 0 1 thro

ugh the determinant sign

3 55 1 165

Page 17: Chapter 2_2015LA Notes(S)

17

Example 19

Evaluate det(A) by row reduction

1 2 3 1

5 9 6 3

1 2 6 2

2 8 6 1

A

Page 18: Chapter 2_2015LA Notes(S)

18

2.3 PROPERTIES OF THE DETERMINANTS FUNCTION

Let A and B be n x n matrices, E is an n x n elementary matrix and k is any scalar, then

1. det (k A) = k n det (A)

2. det (A + B) ≠ det (A) + det (B)

3. det (AB) = det (A) . det (B)

4. det (EB) = det (E) . det (B)

5. det ( AT ) = det (A)

6. If A is invertible then

(a) det (A) 0

(b) det ( A−1) = 1

det( )A = [det (A)] −1

Remark:

(a) det ( (kA) −1) = 1

det( )kA=

1

det( )nk A

(b) det ( kA −1) = k n det ( A−1) = det( )

nk

A

Example 22

Find det (A) if given by

1 2 3

3 1 6

1 3 2

A

Hence , find

(i) det (4A) (ii) det (A 1) (iii) det (2A 1)

(iv) det ( (2A) 1 ) (v) det ( A T )

Page 19: Chapter 2_2015LA Notes(S)

19

Solution

1 2 3

det 3 1 6

1 3 2

1 6 2 3 2 31 3 1

3 2 3 2 1 6

2 18 3 4 9 1 12 3

A

16 39 15 8

(i) det 4A .detnk A

(ii) 1det A 1

det( )A

(iii) 1det 2A 1

.det

nkA

(iv) 1det 2A

1

.detnk A

(v) det TA det ( AT ) = det (A)

Page 20: Chapter 2_2015LA Notes(S)

20

CRAMER’S RULES

If Ax= b is a system of n linear equations in n unknowns such that det (A) 0, then the system

has a unique solution. The solution is

11

det( )

det( )

Ax

A , 2

2

det( )

det( )

Ax

A , 3

3

det( )

det( )

Ax

A

det( )

det( )

nn

Ax

A

where Aj is the matrix obtained by replacing the entries in the jth column of A by the entries in

the matrix b.

Example 23

Solve the system of linear equations below using the Cramer’s rule.

1 2 3

1 2 3

1 2 3

4 6

3 5 2 19

2 2 3 15

x x x

x x x

x x x

Solution

1

2

3

1 4 1 6

3 5 2 19

2 2 3 15

x

x

x

1 4 1

3 5 2

2 2 3

A

det (A) = 5

Page 21: Chapter 2_2015LA Notes(S)

21

1

6 4 1

19 5 2

15 2 3

A

det (A1) = 5 , x1 = 5

5

= 1

2

1 6 1

3 19 2

2 15 3

A

det (A2) = 10 , x2 = 10

5

= 2

3

1 4 6

3 5 19

2 2 15

A

det (A3) = 15 , x3 = 15

5

= 3

Example 24

Find the value of x1, x2 and x3 using the Cramer’s rule if given the system of linear

equations as below

1 2 3

1 2 3

1 2 3

2 4 6 18

4 5 6 24

3 2 4

x x x

x x x

x x x

Page 22: Chapter 2_2015LA Notes(S)

22

2.4 CRYPTOGRAPHY

Cryptography is a study of encoding and decoding secret messages.

- Substitution ciphers replacing each letter of the alphabet by a different letter using Table

1 below.

Plain A B C D E F G H I J K L M N

Cipher D E F G H I J K L M N O P Q

O P Q R S T U V W X Y Z

R S T U V W X Y Z A B C

Table 1

Example 25

UNITEN PUTRAJAYA CAMPUS

becomes

XQLWHQ SXWUDMDBD FDPSXV

Terms in Cryptography

1) Ciphers: codes

2) Plaintext: uncoded messages

3) Cipher text: coded messages

4) Enciphering: Process of converting from plaintext to cipher text

Deciphering: Reverse process from cipher text to plaintext

Page 23: Chapter 2_2015LA Notes(S)

23

1. The disadvantage of substitution ciphers is that they preserve the frequencies of

individual letters, making it relatively easy to break the code by statistical method.

2. One way to overcome this problem is to divide the plaintext groups of letters and

encipher the plaintext group by group rather than one letter at a time.

3. A system of cryptography in which the plaintext is divided into sets of n letters, each of

which is replaced by a set of n cipher letters, is called polygraphic system.

4. The cyphers that we will discuss are called Hill ciphers.

Hill Ciphers

- Sets of n plaintext letters are replaced by sets of n ciphers letters.

- Each letter is assigned a numerical value as in Table 2.

Plain A B C D E F G H I J K L M N O

Cipher 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Table 2

In the simplest Hill ciphers, successive pairs of plaintext are transformed into cipher text by the

following procedure:

Step 1: Choose a 2x2 matrix A to perform the encoding (must be invertible).

Step 2: Group successive plaintext letters into pairs and replace each plaintext letter by its

numerical value.

Step 3: Successively convert each plaintext letter pair into a column vector P and form the

product AP.

P Q R S T U V W X Y Z

16 17 18 19 20 21 22 23 24 25 0

Page 24: Chapter 2_2015LA Notes(S)

24

Step 4: Convert each cipher-text vector C = AP into its alphabetic equivalent using a

modular arithmetic.

Example 26

Obtain the Hill cipher of the message I AM HIDING using the enciphering matrix 1 2

0 3

.

Solution

Let a matrix A is 1 2

0 3

IA MH ID IN GG corresponds to

9

1

13

8

Thus,

1 2 9 11

0 3 1 3

1 2 13 29

0 3 8 24

However, there is aproblem here, because the

number 29 has no alphabet equivalent (Table 2).

To resolve this problem, we make the

aggreement as *.

* Whenever an integer greater than 25 occurs, it will be replaced by the remainder that results

when this integer is divided by 26.

1 2 13 29 3 or

0 3 8 24 24

Page 25: Chapter 2_2015LA Notes(S)

25

These correspond to the cipher text pairs

11

3

3

24

KC CX _ _ _ _ _ _

The entire cipher text message is KCCX _ _ _ _ _ _ as a single string without spaces.

Since the plaintext was grouped in pairs and enciphered by 2 x 2 matrix, the Hill cipher in

Example 26 is referred to as a Hill 2-cipher.

Modular Arithmetic

Modular arithmetic is a technique of working with remainders.

e.g.: mod (26): integers greater than 25 will be replaced by their remainders after division by 26.

Example 27

(a) 7 2 mod5 (b) 19 3 mod 2

(c) 90 12 mod 26 (d) 12 0 mod 4

Definition:

If m (modulus) is a positive integer and a and b are any integers, then a is equivalent to b

modulo m, written

a = b (mod m)

if a - b is an integer multiple of m.

Page 26: Chapter 2_2015LA Notes(S)

26

Now we can write a = b (mod m) in the form of a= r (mod m) with a is any integer, r is the

residue and m is the modulo value.

Example 28: Residues mod 26

Find the residue modulo 26 of :

(a) 87 (b) -38 (c) -26

(d) 1050 (e) -650 (f) 47

Example 29

Obtain the Hill cipher of the message DARK NIGHT using the enciphering matrix 4 3

1 2

.

Solution

Theorem (from theorem 10.15.1 – Anton & Rorres 11th ed.)

For any integer a and modulus m, let

R = remainder of | |a

m .

Then the residue r of a modulo m is given by

0

0 0

0 0 0

R if a

r m R if a and R

if a and R

Page 27: Chapter 2_2015LA Notes(S)

27

Example 30

Find the Hill cypher of the massage I LOVE LINEAR ALGEBRA using the encipher matrix

5 8

3 7

.

Page 28: Chapter 2_2015LA Notes(S)

28

Now we are going to discuss on how to decipher cipher text message to plain text message.

In order to do so, the reciprocal or multiplicative inverse is introduced as below.

In ordinary arithmetic every nonzero number a has a reciprocal or multiplicative inverse,

denoted by a -1, such that

1 1 1 (mod )aa a a m

The reciprocal must be a number in between 1 to 25 and cannot be divided by 2 and 13.

Example 31: Reciprocal of 15 mod 26

15 x = 1 (mod 26) – need to find x in between 1 to 25 that satisfies the condition

15(7) = 105 = 1 (mod 26)

which is 26*4 104 and the residue is 1 that satisfies 1 1 1 (mod )aa a a m .

Table 3 lists the reciprocals modulo 26 for the reference.

a 1 3 5 7 9 11 15 17 19 21 23 25

a-1 1 9 21 15 3 19 7 23 11 5 17 25

Table 3

This table is used to decipher massage from cipher text to plaintext.

Deciphering

- Decipherment uses the inverse (mod 26) of the enciphering matrix in a Hill cipher.

- In a Hill 2-cipher, successive pairs of plaintext vectors can be recovered from the

corresponding cipher text vectors by the following illustration.

Definition:

If a is a number in Zm, then a number a-1 in Zm is called a reciprocal or multiplicative

inverse of a modulo m if :

1 1 1 (mod )aa a a m

Page 29: Chapter 2_2015LA Notes(S)

29

Let 11 12

21 22

a aA

a a

be invertible modulo 26 and be used in a Hill 2-cipher.

If p = 1

2

p

p

is a plaintext vector, then c = Ap (mod 26) is the corresponding cipher text vector

and p = A-1c (mod 26).

Remark:

If a b

Ac d

has entries in Z26, then the inverse of A (mod 26) is given by

1 1( ) (mod 26)d b

A ad bcc a

1where ( )ad bc is the reciprocal of the residue of (mod26)ad bc .

**note that, A-1 must be a number in modulo 26

Corollary 10.15.3

A square matrix A with entries in Zm is invertible modulo m iff m and the residue of det(A)

modulo m have no common prime factors.

Theorem 10.15.2

A square Matrix A with entries in Zm is invertible modulo m iff the residue of det(A)

modulo m has a reciprocal modulo m.

Corollary 10.15.4

A square matrix A with entries in Z26 is invertible modulo 26 iff the residue of det(A)

modulo 26 is not divisible by 2 or 13.

Page 30: Chapter 2_2015LA Notes(S)

30

Example 32

Decipher the following Hill 2-cipher, which was enciphered by the matrix 1 2

3 5

K R W M B K Y L

Page 31: Chapter 2_2015LA Notes(S)

31

Example 33

Decipher the following Hill 2-cipher, which was enciphered by the matrix 7 5

2 3

BADZQYST


Recommended