Sei sulla pagina 1di 3

New International School Thailand Year 11 Extended Mathematics

NAME

CLASS

DATE

How are matrices used in code making?


Read through the following pages. Answer all of the questions and write full explanations in the spaces provided. The aim of this investigation is to learn how matrices are used to encode and decode messages. It is hoped, that by the end of the assignment, you will be able to encode and decode messages using matrices. You will be expected to research some of the work. All research should be correctly referenced. This task will be assessed using criterion A: knowledge and understanding, and criterion D: reflection in mathematics. Please type your answers to the questions THEN delete the questions. Leave the font as Comic Sans so that your teacher can see it better.

Introduction
From very early times, people have felt the need to keep some messages secret. In order to do this, many solutions were found. As it took so long to get from one country to another, one method was to shave someones head, write the message on it, and then let the hair grow to conceal the message! A message could be written on the inside of a belt, or inside clothing. Another method, invented by the Greeks 2500 years ago, used a scytale (sounds like Italy). Two examples are shown below.

The earliest evidence that codes have been used to change messages was used by the military. Years later, the Roman Emperor Julius Caesar would use a transposition code where the letters are shifted. Caesar shifted the letters by three spaces and is known as the Caesar Shift. The Caesar Shift looks like this. The letters a b c d e f are replaced by d e f g h i g h i j k l j k l m n o p q r q r s t s t u v w x y x a b c m n o p u v w x y z

Using a key
The rule for encoding a message is known as the KEY. So the key for the Caesar Shift is shift three letters. The best codes are ones where the key is simple so that messages can be encoded easily, but are still hard to decode.

Using matrices
Page 1 of 3

The following method shows how using a matrix and a simple key can be used to encode messages easily. Plain text message: Year eleven are the best. . 24 Step 2: Write the original message in matrix form. (If there arent enough letters, fill in with (say) qs). y e a r e n a r b e s t e l e v e t h e q q q q Step 3: Choose a key for how we are going to read the columns. Let us use the key 2 3 1 4. Step 4: Write the encoded message. elnteqaeahsqyeeebqrvretq
Can you see how this message is created? Explain.
This message was created by putting the message into a matrix, then altering it according to the key to read the columns 2 3 1 4.

Step 1: Choose the dimensions of the matrices. For example,

What are the limitations of this method? (You are advised to research frequency analysis).
If the pattern keeps repeating it will be too easy to break.

Hills Cypher
Other methods change the letters of the alphabet into numbers. In 1929, an American university professor named Lester Hill changed letters into numbers and then used matrices to encode and decode the messages. This method uses matrix multiplication and the inverse of a matrix. Hills method uses an inverse of a matrix. To show how this method works, we will use a key which is a matrix with a determinant of 1. 22 Plain text message: basketball is the best sport ever matrices. 22

Step 1: Write the original message in

b a e t l l t h e s p o e v s k b a i s e b t s r t e r
Step 2: a b c d e becomes

g h i

Page 2 of 3

1 2 3 4 5 6 7 8 9 1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

2 0

2 1

2 2

2 3

2 4

2 5

26

Replace each letter with a number (e.g. a = 1, b = 2, etc.) and write the result as one big matrix.

2 1 5 20 12 12 20 8 5 19 16 15 5 22 19 11 2 1 9 19 5 2 20 19 18 20 5 18
Step 3: Choose a key. Make sure that it is a 22 Step 4:
Choose a

matrix with a determinant of 1.

Use matrix multiplication to get the encoded message.


matrix with a determinant of 1. Encode the plain text message. Show, and explain,

2 2
your method clearly. Why is this method of encoding plaintext a much better system than the ones shown previously? Explain your reasoning and justify your comments. Use the inverse of your key and show how the new matrix can be decoded to get you back to the original message. Show, and explain, your method clearly.

Links to the Areas of Interaction


Spend a few minutes reading through your work.
Which of the MYP areas of interaction best relates to this work?

Self-reflection
Reflect upon what you have done. What did you learn? How would you approach the work differently next time?

Page 3 of 3

Potrebbero piacerti anche