Вы находитесь на странице: 1из 15

MATRICES

• Some Words:
One: Matrix
More than one: Matrices
• Definition: In Mathematics, matrices are used
to store information.
• This information is written in a rectangular
arrangement of rows and columns.
• Each entry, or element, of a matrix has a
precise position and meaning.
1
Definition
The Determinant of a 2 X 2 matrix A where
a c 
A=  
b d 
is the number ad – bc.
a c 
 
b d 
Some Notation: det(A) = ad – bc
2
Example

 3 4
A=  
7 1
Find the determinant of A

Det(A) =3x1 – 7x4

Det(A) = - 25
3
Definition
The inverse of a matrix A, written A-1, is the
matrix such that:
A A-1 =  = A-1A
a c  a and d change position
If A =  
b d 
then A =
-1 1  d c 
ad  bc  b a

The determinant of A c and b change


4
sign 4
To find the inverse of a matrix
Step 1: Exchange the elements in the leading
diagonal.

Step 2: Change the sign of the other two


elements.

Step 3: Multiply by the reciprocal of the


determinant.

5
Example
 1 3 
P=   Find P-1
 1 2 
 2 3  Exchange the elements in the
Step 1:   leading diagonal
 1 1
 2 3  Change the sign of the other two
Step 2:  
 1 1  elements.

Step 3: det(P) = -1x2– -1x3 = 1


1  2 3   2 3 
P-1 =   =  
1  1 1   1 1 
6
Applications: Cryptology
Matrix inverses can be used to encode and
decode messages.
To start: Set up a code.
The letters of the English alphabet are given
corresponding numbers from 1-26.
The number 27 is used to represent a space
between words.
ABC DEFGHI J K L MN OP QR S TUVWX Y Z
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
7
Secret Code
In this code, the words
SECRET CODE is given by:
19 5 18 5 20 27 3 15 4 5

27 represents the space between the words.

Any 2X2 matrix, with positive integers and


where the inverse matrix exists, can be used
as the encoding matrix.
8
 4 3
Let’s use A =   as the encoding matrix.
 1 1

To encode the message SECRET CODE, we


need to create a matrix with 2 rows.
 19 3 5 27 15 5
 
 5 18 20 3 4 ?
The last entry is blank, so we enter 27 for a
space.
 19 3 5 27 15 5
 
 5 18 20 3 4 27

We are now ready to encode the message. 9


To encode the message, multiply by A:

Encoding  4 3   193 5 27 15 5 
   
matrix first  1 1   518 20 3 4 27 
 91 66 80 117 72 101
=  
 24 21 25 30 19 32 

The encryption for SECRET CODE is

91 24 66 21 80 25 117 30 72 19 101 32

10
Decoding
To decode a message, simply put it back in
matrix form and multiply on the left with the
inverse matrix A-1

Since only A and A-1 are the only “keys”


needed to encode and decode a message,
it becomes easy to encrypt a message.

The difficulty is in finding the key matrix.

11
Example

1 2 
Encoding matrix A =  
1 3 

(i) Use this matrix and the code for the English
alphabet above, to encode the message
DISCRETE MATHS.
(ii) Also, decode
55 70 75 102 22 31 58 85 49 69
12
D S R T A H
(i) DISCRETE MATHS  
 I C E E M T S
 4 19 18 20 27 1 8 
 
 9 3 5 5 13 20 19 
 1 2   4 19 18 20 27 1 8 
   
ENCODE  1 3   9 3 5 5 13 20 19 

 22 25 28 30 53 41 46 
=  
 31 28 33 35 56 60 65 
Encoded message:22 31 25 28 28 33 30 35 53 56 41 46 65
13
1  3 2 
(ii) A-1 =  
1 3  1 2  1 1 
 3 2 
 
 1 1 

Decode:  3 2   55 75 22 58 49 
  
 1 1   70 102 31 85 69 
 25 21 4 4 9 
=  
 15 27 9 27 20 
25 15 21 27 4 9 4 27 9 20
Y o u did i t 14

Вам также может понравиться