What limitations are applied to a 2 by 2 encoding matrix Suc
What limitations are applied to a 2 by 2 encoding matrix? (Such as...the determinant of an encoding matrix must equal 1).
Solution
ENCODING
Step 1 Choose a message. example: MATH ROCKS
Step 2 Replace the letters with numbers using A = 1, B = 2, C = 3, etc. A space in between words is assigned 0. MATH ROCKS would become:
13 01 20 08 00 18 15 03 11 19
Step 3 Place the numbers in a “2 x c” matrix, since there are 10 coded letters, you use a 2 x 5 matrix:
[13 20 00 15 11]
[01 08 18 03 19]
Step 4 Make up a 2 x 2 matrix to use as the encoding matrix. Make sure your matrix does NOT have a determinant of zero (why?). I’ll use this matrix, which has a determinant of 10:
[ 4 -1]
[ 2 2]
Step 5 Multiply the numbered message by the encoding matrix, the result is a code!
[4 -1] [13 20 00 15 11] [51 72 -18 57 25]
[2 2] [01 08 18 03 19] equals [28 56 36 36 60]
The string of digits 5172-1857252856363660 can be sent to someone and decoded.
DECODING
Step 1 Place the string of digits, two at a time, in a 2 x c matrix.
Step 2 Multiply the ENCODED message by the INVERSE OF THE CODING MATRIX to obtain the DECODED message.
In our example, we would multiply the encoded matrix by:
[ 0.2 0.1]
[ -0.2 0.4 ]
to obtain the original set of numbers that represent the phrase: MATH ROCKS
