Saturday, August 17, 2013

IB MATHEMATICS Topic : Matrices – Using Matrices in Cryptography

Cryptography hiding and uncovering information in codes. Whenever information is required to be sent from one place to another so that even if it were intercepted it would still be secure, it must first be put in the form of some code. When it is received by its intended recipient, it must then be decoded.
Originally it was used to encode written messages. Both sender and recipient would have codebooks which they would use to code and decode the message. Today, it is used in computer networks to keep them secure, and to make sure that emails, banking data, government communications, telephone calls, internet traffic, cannot be easily intercepted and decoded to extracxt information.
Messages are sent in code or cipher form. The method of converting text to ciphertext is called enciphering and the reverse process is called deciphering. Codes can be created with matrices, using simple matrix addition and multiplication. The result is written as a list of numbers and the reverse process is applied at the receiving end to read the message.
A simple code may be constructed by giving each letter a number.
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
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
0
The word 'WIRE' would then be encoded as 23 9 18 5. We could write this in matrix form as A matrix could then be added, mod 26, to this matrix to give another layer of security. Suppose we add the matrixThe matrix to be transmitted is then
The message 'WIRE MONEY QUICK' could be broken into groups of four letters and
each group encoded.
(WIRE)(MONE)(YQUI)(CKKK)
Note that the last letter is repeated to make a group of four letters.
The matrix representing 'MONE' is
The matrix representing 'YQUI' is
The matrix representing 'CKKK' is
The message to ne sent is 5 15 21 7 21 22 17 7 7 24 24 11 11 18 14 13.
The additive inverseis required to decode the message.

IB MATHEMATICS Topic : Matrices – Finding Inverses of 3x3 Matrices

Finding the inverse of a 3x3 matrix is quite involved. The steps are:
1. Form the adjoint matrix.
2. Permute the signs according to
3. Take the transpose.
4. Find the determinantof the original matrix and divide the matrix by it, which means multiplying the matrix by a factor
Example: Find the inverse of
We find the adjoint matrix by, for each element, crossing out the elements in the same row and column, and finding the determinant of the submatrix left behind. For instannce, take the element 3 in the top left hand corner. Cross out the top row and the first column. The submatrix left behind is with determinant 0*1-2*2=-4. This goes in place of the 3. The adjoint matrix formed in this way is:
Now permute the signs, which results in those signs labelled with a “–“ in 2. above changing signs.
Take the transpose to obtain
Finally multiply the matrix by the reciprocal of the determinant of the original matrix:
The inverse is

IB MATHEMATICS Topic : Matrices – 2 x 2 Matrices – Sums, Products, Determinants and Inverses

Adding Matrices
Matrices add in the natural way:

Example:
Multiplying Matrices
Multiplying is a little more complex. Remember that you multiply rows by columns.
Example:
Determinants of Matrices
To find the determinant of a matrix multiply diagonal corners together and subtract.

Example:
Inverses of Matrices

Each entry in the matrix can be divided byin the natural way. An example is shown below

IB MATHEMATICS Topic ; Matrices – Using Matrices to Represent Data




Two different stores sell two different prodents – pens and pancils.
In store 1, pens sell for 30p and pencils sell for 20p.
In store 2, pens sell for 25 p and pencils sell for 22p.
We can represent this data in a two way table.


Pens
Pencils
Store 1
30
20
Srore 2
25
22
Leaving out the first row and the first column gives us the cost matrix
Suppose that someone goes shoppong for pens and pencils and wants to know the cheapest place to shop. They want to buy 4 pens and 5 pencils.
In store 1 they would pay 4*30+5*20=220p
In store 2 they would pay4*25+5*22=210p
Obviously store 2 is cheaper. We can do this calculation with matrices by representing the number of pens and pencils to be bought as a vector. Multiplying the cost matrix by this vectore gives the costs of buying from the two stores.

This can be extended to any number of stores selling any number of products. If stores 1 and 2 sold rubbers at 10p and 15 p respectively, and store 3 sold pens at 24p, pencils at 30 and rubbers at 5p, the cost matrix would beIf a shopper wanted to buy 4 pens, 5 pencils and 6 rubbers, we would find

Store 3 is now the cheapest.

IB MATHEMATICS Topic : Matrices - Determinants of Matrices

The determinant of 2 by 2 matrix can be worked out almost instantly:

ie multiply the diagonal numbers together and subtract them.
The determinant of a 3 by 3 matrix is much more difficult. We have to carry out a process called expanding along a row or a column, In the example below I will expand along a row – the top row.
Example:


We label the positions in the matrix with +1's and -1's: For the first term, 3, cross out the entries in the same row and column as this 3.


Our second term is



Our third term is
The determinant is

IB MATHEMATICS Topic : Matrices – Properties of Matrix Multiplication

When two matricesandare multiplied to produce a third matrixthe entry in the ith row and jth column, labelledcan be considered as a dot product.
If the matrixis considered to be made up of row vectorsand the matrixis considered to be made up of column vectorsthen the elementinis the dot product ofwith
This view is helpful in understanding the following property of matrix multiplication.
Example
Then
The proof can be written in terms of the dot product.
If the ith row ofisand the jth column ofisthen the element in the ith row and jh column ofisWhen the transpose ofis taken, this will be the element in the jth row and ith column.
When the transpose of is taken, the ith row will become the ith column, and when the transpose ofis taken, the jth column will become the jth row. The element in the jth row and ith column ofwill be the dot product ofwithas before hence
Another important properties of matrix multiplication concerns inverses:
The proof of this is quite easy.
An inverse ofissinceand
Also the inverse is unique since ifis any other inverse thenand
For the matrices A and B above