# Harry Potter and the Cryptography with Matrices

By Chua, Boon Liang | Australian Mathematics Teacher, Fall 2006 | Go to article overview

# Harry Potter and the Cryptography with Matrices

Chua, Boon Liang, Australian Mathematics Teacher

Introduction

Cryptography, the science of encrypting and deciphering messages written in secret codes, has played a vital role in securing information since ancient times. Julius Caesar employed what has become known as the Caesar Shift Cipher when encoding messages to communicate with his generals. Under this form of encryption technique, each letter in a message is substituted with the letter that was a certain number of places further down the alphabet. Caesar used a shift of three places, and so A is replaced by D, B is replaced by E, and so on. In modern history, the Nazis continued to use the presumably highly sophisticated Engima machine to encrypt their messages when they communicated, still unaware that three Polish mathematicians had already cracked the unbreakable codes of the Engima machine and had provided the Allied Forces with the means to gain access to their top secrets. More recently, with millions of financial transactions conducted over the Internet daily, cryptography has become more important than ever. Companies have begun to make online transactions more secure by installing encryption software to prevent sensitive information such as credit card numbers from falling into the wrong hands.

There are several cryptographic techniques and many make extensive use of mathematics to secure information. This article describes an activity built around one of the techniques that illustrates an application of matrices. Secondary school teachers may use this activity to consolidate their students' learning of certain concepts of matrices such as the algorithm for matrix multiplication and the concept of the multiplicative inverse of a matrix.

The activity

To capitalise on the popularity of the Harry Potter series by J. K. Rowling, the entire activity is framed in the context of the Harry Potter story with the aim of stimulating and heightening students' interest. The activity begins with the following scenario:

```   Harry Potter is in deep trouble. He is being
pursued by Lord Voldemort and is presently
hiding in a secret location to escape from
being captured by him. He needs to send
messages to his two good friends, Ron and
Hermione, to tell them about his situation
and whereabouts. Of course, he has to send
the messages in code, just in case they are
intercepted and cracked by Lord Voldemort
along the way. So he composes his first
message "Please save me!" by replacing each
letter in the message by a number according
to the code in Table 1.
```

Then students are asked to translate Harry's plain message into code, which appears as follows when completed:

```P  L  E A S  E   S  A V  E   M  E !
16 12 5 1 19 5 0 19 1 22 5 0 13 5 27
```

The activity continues with the story of the clever, but devious, Harry using a super hi-tech LOCK to encrypt his message to make it unbreakable by others, except for Ron and Hermione. The super hi-tech LOCK used is

[ILLUSTRATION OMITTED]

Here, students are told that the LOCK is a rectangular array of numbers in rows and columns, and are asked to write down the special name of such an array of numbers, as well as its order.

Next, the story proceeds to describe the encryption technique that Harry uses. First, he writes his encoded message in groups of three numbers as shown below:

[ILLUSTRATION OMITTED]

Second, he pre-multiplies each group of numbers by his super hi-tech LOCK. To reinforce the students' learning of matrix multiplication, they are instructed to apply the second step to the five groups of numbers. For instance, the first group,

[ILLUSTRATION OMITTED]

yields the result:

[ILLUSTRATION OMITTED]

Now what has happened is that the letters P, L and E, which are originally given the codes 16, 12 and 5 respectively, have now ended up being correspondingly represented by the codes 21, -4 and 22. …

If you are trying to select text to create highlights or citations, remember that you must now click or tap on the first word, and then click or tap on the last word.
One moment ...
Default project is now your active project.
Project items
Notes

#### Cited article

Style
Citations are available only to our active members.
Buy instant access to cite pages or passages in MLA 8, MLA 7, APA and Chicago citation styles.

(Einhorn, 1992, p. 25)

(Einhorn 25)

(Einhorn 25)

1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

#### Cited article

Harry Potter and the Cryptography with Matrices
Settings

#### Settings

Typeface
Text size Reset View mode
Search within

Look up

#### Look up a word

• Dictionary
• Thesaurus
Please submit a word or phrase above.

Why can't I print more than one page at a time?

Help
Full screen
• Highlights & Notes
• Citations
Some of your highlights are legacy items.

### How to highlight and cite specific passages

1. Click or tap the first word you want to select.
2. Click or tap the last word you want to select, and you’ll see everything in between get selected.
3. You’ll then get a menu of options like creating a highlight or a citation from that passage of text.

## Cited passage

Style
Citations are available only to our active members.
Buy instant access to cite pages or passages in MLA 8, MLA 7, APA and Chicago citation styles.

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn, 1992, p. 25).

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn 25)

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn 25)

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences."1

1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

## Thanks for trying Questia!

Please continue trying out our research tools, but please note, full functionality is available only to our active members.

Your work will be lost once you leave this Web page.

Search by...
Show...

### Oops!

An unknown error has occurred. Please click the button below to reload the page. If the problem persists, please try again in a little while.