0% found this document useful (0 votes)
82 views3 pages

EJ743766

Harry Potter sends an encrypted message to his friends Ron and Hermione asking for help. He encrypts the message "Please save me!" using a coding system that replaces each letter with a number. He then further encrypts the message by multiplying each group of three numbers by a matrix "lock". Only Ron and Hermione can decrypt the message using the inverse of the lock matrix as a "key". The activity teaches students about matrix multiplication and inverse matrices while engaging their interest with the Harry Potter theme.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views3 pages

EJ743766

Harry Potter sends an encrypted message to his friends Ron and Hermione asking for help. He encrypts the message "Please save me!" using a coding system that replaces each letter with a number. He then further encrypts the message by multiplying each group of three numbers by a matrix "lock". Only Ron and Hermione can decrypt the message using the inverse of the lock matrix as a "key". The activity teaches students about matrix multiplication and inverse matrices while engaging their interest with the Harry Potter theme.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BOON LIANG CHUA

Harry Potter
and The
Cryptography with Matrices
Introduction The activity

Cryptography, the science of encrypting and To capitalise on the popularity of the Harry
deciphering messages written in secret codes, Potter series by J. K. Rowling, the entire
has played a vital role in securing information activity is framed in the context of the Harry
since ancient times. Julius Caesar employed Potter story with the aim of stimulating and
what has become known as the Caesar Shift heightening students’ interest. The activity
Cipher when encoding messages to communi- begins with the following scenario:
cate with his generals. Under this form of
encryption technique, each letter in a message Harry Potter is in deep trouble. He is being
is substituted with the letter that was a certain pursued by Lord Voldemort and is presently
number of places further down the alphabet. hiding in a secret location to escape from
Caesar used a shift of three places, and so A is being captured by him. He needs to send
replaced by D, B is replaced by E, and so on. messages to his two good friends, Ron and
In modern history, the Nazis continued to use Hermione, to tell them about his situation
the presumably highly sophisticated Engima and whereabouts. Of course, he has to send
machine to encrypt their messages when they the messages in code, just in case they are
communicated, still unaware that three Polish intercepted and cracked by Lord Voldemort
mathematicians had already cracked the along the way. So he composes his first
unbreakable codes of the Engima machine message “Please save me!” by replacing each
and had provided the Allied Forces with the letter in the message by a number according
means to gain access to their top secrets. More to the code in Table 1.

Table 1. Coding system.


recently, with millions of financial transac-
tions conducted over the Internet daily,
cryptography has become more important A B C D E F G H I J K L M N
than ever. Companies have begun to make 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
O P Q R S T U V W X Y Z ! ? .
online transactions more secure by installing

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
encryption software to prevent sensitive infor-
mation such as credit card numbers from
falling into the wrong hands.
There are several cryptographic techniques Then students are asked to translate
and many make extensive use of mathematics Harry’s plain message into code, which
to secure information. This article describes appears as follows when completed:
an activity built around one of the techniques
that illustrates an application of matrices. P L E A S E S A V E M E !
Secondary school teachers may use this activity 16 12 5 1 19 5 0 19 1 22 5 0 13 5 27
to consolidate their students’ learning of certain
concepts of matrices such as the algorithm for The activity continues with the story of the
matrix multiplication and the concept of the clever, but devious, Harry using a super hi-
multiplicative inverse of a matrix. tech LOCK to encrypt his message to make it

amt 62 (3) 2006 25


unbreakable by others, except for Ron and Hermione. which is represented by
The super hi-tech LOCK used is

in the beginning, is now encrypted and trans-


Here, students are told that the LOCK is a rectangular lated into
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 Harry is ingenious, is he not?
message in groups of three numbers as shown below: Given that modulo arithmetic is probably a
new concept to most — if not all — students,
it is advisable for teachers to illustrate suffi-
cient examples to demonstrate how a number,
not within the range of 0 to 29, is reduced
Second, he pre-multiplies each group of numbers by modulo 30. Once students are familiar with
his super hi-tech LOCK. To reinforce the students’ the procedure, they can then be asked to
learning of matrix multiplication, they are instructed to encrypt the original message, which, if
apply the second step to the five groups of numbers. correctly done, should read as shown below:
For instance, the first group,
Original P L E A S E S A V E M E !
Encrypted U Z V F R . A S U V M E J V .

This message is subsequently transmitted


yields the result: as a string of letters to Ron and Hermione. Ron
and Hermione successfully receive this string
of letters from Harry and immediately recon-
struct the five groups of numbers. They use
the following super sophisticated KEY to
Now what has happened is that the letters P, L and unlock and unscramble the message:
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. So numbers 21
and 22 can be converted directly into the codes U and
V respectively based on the coding system given in To promote thinking, students are encour-
Table 1. That is to say, the letters U and V become the aged to predict the relationship between the
corresponding encrypted codes for P and E. However, LOCK used for encoding and the KEY used for
there is a problem here in such a technique. The deciphering. This should be an easy task for
number –4 cannot be converted because none of the the students, with most of them expected to
codes in Table 1 corresponds to it. So Harry resolves point out that the LOCK and the KEY are the
this problem by reducing –4 modulo 30 to obtain 26. multiplicative inverses of each other. To
That is, further probe their understanding of some
properties of inverse matrices, students can be
led to explain how the relationship is arrived
at. When this activity was carried out with a
group of Singapore secondary school students,
In other words, many reached the conclusion by showing that
the pre-multiplication of the KEY by the LOCK
produced the identity matrix. However, when
asked whether or not it was also necessary to
check that the pre-multiplication of the LOCK

26 amt 62 (3) 2006


by the KEY also yielded the identity matrix, activity. For instance, teachers can teach students to
not many students seemed to know how to make use of the functions such as MMULT, MDETER
respond to this question. Therefore, this and MINVERSE in Microsoft Excel to perform matrix
provided the teacher with an opportunity to multiplication, as well as to find the determinant and
engage the students in a constructive class- inverse of a matrix. Such use of technology not only
room discussion to consolidate some reduces the drudgery of performing matrix multiplica-
important properties of inverses. tion manually and therefore leaves students with more
The story progresses with an illustration of time for exploration, it also adds a more challenging
how Ron and Hermione decipher Harry’s dimension to learning by enabling them to work with
encrypted message. They pre-multiply a coded concepts that are beyond the syllabus. To illustrate this
group of numbers, point, take finding the determinant and inverse of a 3
× 3 matrix as examples. These topics are not included
in the Singapore secondary mathematics syllabus, but
through the use of EXCEL, local students are able to
generate them quickly. As a result, the new LOCK and
by their super sophisticated KEY, followed by KEY that they devise are not simply restricted to only 2
reducing all the values, which fall outside the × 2 matrices. Additionally, it would seem logical to
range of 0 to 29, modulo 30: think that any arbitrary non-singular, square matrix
can be chosen to represent the LOCK, but with the help
of technology, Singapore students found that this was
not exactly the case. They discovered that the determi-
nant of the LOCK has to be 1 in order for the encryption
Not surprisingly, they obtain the result technique previously described to work.

Conclusion

which should be instantly recognised by many Secondary school students often ask their teachers
students as the representative coded numbers why it is important to learn mathematics, and thus
for the group of letters teachers are usually faced with the challenge of
explaining its importance and relevance to real life situ-
ations to convince them. However, this may not always
be an easy task. Therefore, it is hoped that this activity
on cryptography not only offers teachers with great
To verify that the original message can opportunities to either introduce or consolidate certain
indeed be unveiled in such a manner, students mathematical concepts and algorithms, but also to
can apply the process to the other coded convince their students that mathematics plays an
groups of numbers to check. Having important role in various walks of life and hence is a
completely described how the entire encryp- useful and meaningful field of study.
tion and decryption process works, students

References
are given time to communicate with each other
in encoded messages.
Subsequently, they are informed that this
secret process is very unfortunately discovered Camp, D. R. (1985). Secret codes with matrices. Mathematics Teacher, 78(9),
676–680.
and broken by the evil Lord Voldemort, and Lee, P. Y. (2005). Teaching Secondary School Mathematics: A Resource Book.
therefore, a new system has to be developed. Singapore: McGraw Hill.

So students are asked to explore and create a Singh, S. (1999). The Code Book: The Secret History of Codes and Code-
Breaking. London: Fourth Estate.
new LOCK and KEY for transmitting coded
messages. They are also given the freedom to
modify the existing coding system. Boon Liang Chua
National Institute of Education
Nanyang Technological University, Singapore
To help students in their exploration of this
blchua@nie.edu.sg
task, the use of computer or calculator tech-
nology can be integrated into this part of the

amt 62 (3) 2006 27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy