Applications of Matrices 8.5 Applications of Matrices Copyright © Cengage Learning. All rights reserved.
Cryptography
Objectives Use matrices to encode and decode messages. MATRIX
Cryptography A cryptogram is a message written according to a secret code. (The Greek word kryptos means “hidden.”) Matrix multiplication can be used to encode and decode messages.
Cryptography To begin, you need to assign a number to each letter in the alphabet (with 0 assigned to a blank space), as follows. 0 = _ 9 = I 18 = R 1 = A 10 = J 19 = S 2 = B 11 = K 20 = T 3 = C 12 = L 21 = U 4 = D 13 = M 22 = V 5 = E 14 = N 23 = W 6 = F 15 = O 24 = X 7 = G 16 = P 25 = Y 8 = H 17 = Q 26 = Z
Cryptography Then the message is converted to numbers and partitioned into uncoded row matrices, each having n entries, as demonstrated in Example 6.
Example 6 – Forming Uncoded Row Matrices Write the uncoded row matrices of order m x n for the message (n depends on the dimensions of your key, m is as many full rows are needed to write the complete message). a) For this example, we’ll be using a 3 x 3 key, so code the letters into groups of 3… MEET ME MONDAY.
Cryptography 0 = _ 9 = I 18 = R 1 = A 10 = J 19 = S 2 = B 11 = K 20 = T 3 = C 12 = L 21 = U 4 = D 13 = M 22 = V 5 = E 14 = N 23 = W 6 = F 15 = O 24 = X 7 = G 16 = P 25 = Y 8 = H 17 = Q 26 = Z
Cryptography To encode a message, choose an n x n invertible matrix as a key. b) Use write a coded message representing MEET ME MONDAY
Cryptography To decode a message, use the encoded matrix and multiply by the inverse of the key. c) Check your decoding from the previous slide using the key above and convert back to a phrase using the standard 0 – 26 letter correlation.
8.5 Example – Worked Solutions
Example 6 – Forming Uncoded Row Matrices a) Write the uncoded row matrices of order 1 x 3 for the message MEET ME MONDAY. Solution: Partitioning the message (including blank spaces, but ignoring punctuation) into groups of three produces the following uncoded row matrices. [13 5 5] [20 0 13] [5 0 13] [15 14 4] [1 25 0] Note that a blank space is used to fill out the last uncoded row matrix. M E E T M E M O N D A Y
Cryptography b) To encode a message, choose an n x n invertible matrix such as Given an encoding matrix (key), multiply the uncoded row matrix by A to obtain coded row matrices. Here is an example. Uncoded Matrix x Key Matrix [A] = Coded Matrix 13 5 5 20 0 13 5 0 13 15 14 4 1 25 0 ∙ 1 2 2 −1 1 3 1 −1 −4 = 13 −26 21 33 −53 −12 18 −23 −42 5 −20 56 −24 23 77 Solution:
Cryptography To decode a message, use the encoded matrix and multiply by the inverse of the key. c) Check your decoding from the previous slide using the key above and convert back to a phrase using the standard 0 – 26 letter correlation. Coded Matrix x Inverse Key Matrix [A]-1 = Uncoded Matrix 13 −26 21 33 −53 −12 18 −23 −42 5 −20 56 −24 23 77 ∙ −1 −10 −8 −1 −6 −5 0 −1 −1 = 13 5 5 20 0 13 5 0 13 15 14 4 1 25 0 Solution: