Cryptology: Encode and Decode Secret Messages



Objectives

One of the applications of Matrices is in Cryptology.
One of the applications of Cryptology is the encoding and decoding of secret messages.

Students will:
(1.) Encode a secret message.
(2.) Decode the secret message.
(3.) Meet one of the learning objectives of the VCCS (Virginia Community College System) standards for:
MTH 111: Basic Technical Mathematics
(Provides a foundation in mathematics with emphasis in arithmetic, unit conversion, basic algebra, geometry and trigonometry.).

MTH 133: Mathematics for Health Professions
(Presents in context the arithmetic of fractions and decimals, the metric system and dimensional analysis, percents, ratio and proportion, linear equations, topics in statistics, topics in geometry, logarithms, topics in health professions including dosages, dilutions and IV flow rates.).

MTH 154: Quantitative Reasoning
[Solve real-life problems requiring interpretation and comparison of various representations of ratios (i.e., fractions, decimals, rates, and percentages including part to part and part to whole, per capita data, growth and decay via absolute and relative change)].

(4.) Meet the QM (Quality Matters) and USDOE (United States Department of Education) requirements for distance education as regards the provision of RSI (Regular and Substantive Interaction).
Federal Register: Distance Education and Innovation
St. John's University: New Federal Requirements for Distance Education: Regular and Substantive Interaction (RSI)
Student – Content Interaction: Very high
Student – Student Interaction: Very high (if the project is a group project)
Student – Faculty Interaction: High

Cryptology

Cryptology is the science or the study of secret messages.
It is the process of:
encoding and decoding OR
encrypting and decrypting OR
enciphering and deciphering OR
writing and cracking OR
making and breaking secret messages/codes/texts.

Cryptology consists of:
Cryptography: This is the process of enciphering/encoding secret messages.
Cryptanalysis: This is the process of deciphering/decoding secret messages.

The project is an applied project for Cryptology using Matrices.
Matrices are used to encode and decode secret messages.



Top

General Project Requirements

(1.) This is an individual project.
It may also be a group project. (Please contact me in this regard.)
If students prefer to work in groups, then no more than two students should be in the same group.
One student (1st student) will encode the secret message.
The other student (2nd student) will decode the secreat message.
Then, the 2nd student will encode a new secret message.
The 1st student will decode the secret message.

(2.) All work/steps should be shown in decoding the message.
Points will be deducted for any missing steps.
Please review the examples I did.
Did I miss any step? You should not miss any step.

(3.) (a.) A scenario or at least a sentence that includes the message is required.
Using proper grammar, write a scenario or a sentence that includes the encrypted (encoded) message.

(b.) All decrypted (decoded) messages must be good messages, and be at least two words.
Colloquial expressions; bad words; profane words; insensitive words related to race, sex, tribe, religion, national origin and gender among others will not be accepted.
If any such words appear, the student who encoded that message will not gain any point.
The student who decoded the message will not be penalized.

(4.) As a student, you have access to the Microsoft Office suite of apps.
(a.) You can download and install these apps on your laptop/desktop.
(Please contact the IT/Tech Support for assistance if you do not know.)
In that regard, the project is to be typed using Microsoft Word.

(b.) For all English terms (entire project): use Times New Roman; font size of 14; line spacing of at least 1.5
first step

(c.) For all Math terms: symbols, variables, numbers, formulas, expressions, equations and fractions among others, please use the Math Equation Editor.
(i.) Set the font to Cambria Math; font size of 14; and align accordingly.
(ii.) Insert a space after each each equation as applicable. Make a good work that is organized and spacious.

second step

third step

(d.) Include page numbers. You may include at the top of the pages or at the bottom of the pages but not both.
fourth step

(5.) Two projects are required: One 2 by 2 project and one 3 by 3 project.
All work must be shown.

(6.) Please review the examples I did.
You may not do the same examples that I did.
These are the minimum expectations.

(7.) Mr. C (SamDom For Peace) wants you to do this real-world project very well.
Hence, he highly recommends that you submit a draft so he can give you feedback.
Please do not submit any draft if the due date is one week or less.
When you submit your draft, I shall review and provide feedback.
When everything is fine (after you make changes as applicable based on my feedback), please submit your work in the appropriate area in the Canvas course.
Only projects submitted in the Canvas course are graded.
Draft projects are not graded. In other words, projects submitted via email and/or in the Projects: Drafts page are not graded because they are drafts. They are only for feedback and should be submitted at least one week prior to the due date.
If it is past one week before the project is due, please do not submit it as a draft to me. Just do it very well according to the requirements and submit it in the appropriate area (Assignments page: Cryptology Project) in the Canvas course.
Submitting drafts is highly recommended. If your professor gives you an opportunity to submit a draft, please use that opportunity.
Submitting drafts is not required. It is highly recommended because I want to give you the opportunity to do your project very well and make an excellent grade in it.

(8.) All work must be turned in by the final due date to receive credit.
It is highly recommended that you turn in your draft by the first due date. Then, review my feedback and make corrections as necessary before turning in your final submission by the final due date.
I would not wait till the due dates: the sooner you turn it in, the better.

Specific Project Requirements

(1.) The encoding matrix must be invertible.
This means that it must have an inverse.
This means that it must be a square matrix.
Each student should use a different encoding matrix.

(2.) The elements of the encoding matrix should be positive integers only.
Zeros, Negative integers, Fractions, and Decimals will not be used.

(3.) The elements of the encoded message must be positive integers only.
Zeros, Negative integers, Fractions, and Decimals will not be used.

(4.) The elements of the decoding matrix must be integers only.
Fractions and Decimals will not be used.

(5.) The elements of the decoded message must be non-negative integers only.
Negative integers, Fractions, and Decimals will not be used.



Top

Example Guide (2 × 2 Matrices)

Some examples of 2 × 2 encoding matrices that you can use are:

$ \begin{bmatrix} 5 & 3 \\[3ex] 2 & 1 \end{bmatrix} $ $ \begin{bmatrix} 7 & 4 \\[3ex] 2 & 1 \end{bmatrix} $ $ \begin{bmatrix} 3 & 4 \\[3ex] 1 & 1 \end{bmatrix} $ $ \begin{bmatrix} 1 & 1 \\[3ex] 2 & 3 \end{bmatrix} $ $ \begin{bmatrix} 3 & 4 \\[3ex] 2 & 3 \end{bmatrix} $ $ \begin{bmatrix} 1 & 2 \\[3ex] 2 & 3 \end{bmatrix} $

Please verify that they meet the requirements.


Given: a scenario between Mom and Sam
Mom: Sam my son, what did you learn in church today?
Sam: Mom, the priest said something very important.
He told us to always ..............................
124 48 47 16 55 22 80 29 20 8
and his message is encoded with the encoding matrix
5 2 3 1

If you were the Mom, and your son wrote this to you, what would you do? ☺ ☺ ☺

To: decode the message
The Cipher Key is:

$A$ $B$ $C$ $D$ $E$ $F$
$1$ $2$ $3$ $4$ $5$ $6$
$G$ $H$ $I$ $J$ $K$ $L$
$7$ $8$ $9$ $10$ $11$ $12$
$M$ $N$ $O$ $P$ $Q$ $R$
$13$ $14$ $15$ $16$ $17$ $18$
$S$ $T$ $U$ $V$ $W$ $X$
$19$ $20$ $21$ $22$ $23$ $24$
$Y$ $Z$ $ $ $?$ $!$ $.$
$25$ $26$ $27, 0$ $28$ $29$ $30, 0$

1st Step:
Because this question deals with $2 * 2$ matrix, write the encoding matrix in a $2 * 2$ matrix form
5 2 3 1
Write the elements per column (not per row)
Encoding Matrix, A

$ A = \begin{bmatrix} 5 & 3 \\[3ex] 2 & 1 \end{bmatrix} $


2nd Step:
Because this question deals with $2 * 2$ matrix, write the encoded message in matrix form such that the number of rows is $2$
Ask students why they have to do it that way?
124 48 47 16 55 22 80 29 20 8
Encoded Message, B
Write the elements per column (not per row)

$ B = \begin{bmatrix} 124 & 47 & 55 & 80 & 20 \\[3ex] 48 & 16 & 22 & 29 & 8 \end{bmatrix} $


3rd Step:
Determine the Decoding Matrix: $A^{-1}$
We shall use both methods: The Formula Method and the Row Reduction Method.
You may use any one you wish.

$ \underline{Formula\:\: Method} \\[3ex] A^{-1} = \dfrac{adj\: A}{\det\: A} \\[5ex] For\:\: A = \begin{bmatrix} a & b \\[3ex] c & d \end{bmatrix} = \begin{bmatrix} 5 & 3 \\[3ex] 2 & 1 \end{bmatrix} \\[5ex] a = 5 \\[3ex] b = 3 \\[3ex] c = 2 \\[3ex] d = 1 \\[3ex] adj\: A = \begin{bmatrix} d & -b \\[3ex] -c & a \end{bmatrix} \\[5ex] -b = -1 * 3 = -3 \\[3ex] -c = -1 * 2 = -2 \\[3ex] \therefore adj\: A = \begin{bmatrix} 1 & -3 \\[3ex] -2 & 5 \end{bmatrix} \\[3ex] $

$ det\: A = ad - cb \\[3ex] = 5(1) - 2(3) \\[3ex] = 5 - 6 \\[3ex] = -1 \\[3ex] $

$ A^{-1} = \dfrac{adj\: A}{\det\: A} = \begin{bmatrix} \dfrac{1}{-1} & \dfrac{-3}{-1} \\[5ex] \dfrac{-2}{-1} & \dfrac{5}{-1} \end{bmatrix} \\[10ex] A^{-1} = \begin{bmatrix} -1 & 3 \\[3ex] 2 & -5 \end{bmatrix} \\[7ex] \underline{Row\:\: Reduction\:\: Method} \\[3ex] A \ \ | \ \ I = I \ \ | \ \ A^{-1} \\[3ex] \left[ \begin{array}{cc|cc} 5 & 3 & 1 & 0 \\[3ex] 2 & 1 & 0 & 1 \end{array} \right] \underrightarrow{-2R_1 + 5R_2} \left[ \begin{array}{cc|cc} 5 & 3 & 1 & 0 \\[3ex] 0 & -1 & -2 & 5 \end{array} \right] \\[3ex] $

$ \underrightarrow{3R_2 + R_1} \left[ \begin{array}{cc|cc} 5 & 0 & -5 & 15 \\[3ex] 0 & -1 & -2 & 5 \end{array} \right] \begin{matrix} \underrightarrow{R_1 \div 5} \\ \underrightarrow{-R_2} \end{matrix} \left[ \begin{array}{cc|cc} 1 & 0 & -1 & 3 \\[3ex] 0 & 1 & 2 & -5 \end{array} \right] \\[3ex] $

$ A^{-1} = \begin{bmatrix} -1 & 3 \\[3ex] 2 & -5 \end{bmatrix} $


4th Step:
Determine the Decoded Message
Decoded Message = $A^{-1} * B$

Ask students if the matrices are conformable for multiplication

Order of Matrix $A^{-1} = 2 * 2$
Order of Matrix $B = 2 * 5$
Number of columns of $A^{-1}, (2)$ = Number of rows of $B, (2)$
The matrices can multiply.
Order of Product, $A^{-1}B$ = Number of rows of $A^{-1}$ by Number of columns of $B$
Order of $A^{-1}B = 2 * 5$

$ \begin{bmatrix} -1 & 3 \\[3ex] 2 & -5 \end{bmatrix} * \begin{bmatrix} 124 & 47 & 55 & 80 & 20 \\[3ex] 48 & 16 & 22 & 29 & 8 \end{bmatrix} \\[3ex] $

$ -1 * 124 + 3 * 48 = -124 + 144 = 20 \\[3ex] -1 * 47 + 3 * 16 = -47 + 48 = 1 \\[3ex] -1 * 55 + 3 * 22 = -55 + 66 = 11 \\[3ex] -1 * 80 + 3 * 29 = -80 + 87 = 7 \\[3ex] -1 * 20 + 3 * 8 = -20 + 24 = 4 \\[5ex] 2 * 124 + (-5) * 48 = 248 - 240 = 8 \\[3ex] 2 * 47 + (-5) * 16 = 94 - 80 = 14 \\[3ex] 2 * 55 + (-5) * 22 = 110 - 110 = 0 \\[3ex] 2 * 80 + (-5) * 29 = 160 - 145 = 15 \\[3ex] 2 * 20 + (-5) * 8 = 40 - 40 = 0 \\[3ex] $

$ A^{-1} * B = \begin{bmatrix} 20 & 1 & 11 & 7 & 4 \\[3ex] 8 & 14 & 0 & 15 & 0 \end{bmatrix} $


5th Step:
Determine the Message using the Cipher Key

Decoded Message: 20 8 1 14 11 0 7 15 4 0
Message:                 T H A N K   G O D .

The Priest's basic message is THANK GOD.


Given: a secret message, THANK GOD.
To Encode: the secret message using a $2 * 2$ encoding matrix

1st Step:
Write the decoded message using the Cipher Key
Convert the characters to digits using the Cipher Key.
Message:                 T H A N K   G O D .
Decoded Message: 20 8 1 14 11 0 7 15 4 0
You may use 27 for the space, and $30$ for the period if you wish.


2nd Step:
Because this question deals with $2 * 2$ matrix, write the decoded message in matrix form such that the number of rows is $2$
Ask students why they have to do it that way?
Make sure the number of digits is divisible by $2$ (an even number).
20 8 1 14 11 0 7 15 4 0
It has $10$ digits. Divide it by $2$.
$10$ digits divided by $2$ rows gives $5$ digits in each row.
Write the elements per column (not per row)
Decoded Message

$ \begin{bmatrix} 20 & 1 & 11 & 7 & 4 \\[3ex] 8 & 14 & 0 & 15 & 0 \end{bmatrix} $


3rd Step:
Find an encoding matrix
(1.) that has only positive integers. The elements of the encoding matrix has no zeros, negative integers, fractions and/or decimals.
(2.) that is invertible. The encoding matrix has an inverse.
(3.) such that the elements of the inverse of that matrix has only integers.
The inverse of the encoding matrix is the decoding matrix.
The elements of the decoding matrix should be only integers.
The elements of the decoding matrix should not have fractions or decimals.
You may use the calculators on the Matrix Algebra website, Microsoft Excel Spreadsheet, or Google Spreadsheet to find a suitable encoding matrix.
Encoding Matrix: 5 2 3 1


4th Step:
Because this question deals with $2 * 2$ matrix, write the encoding matrix as a $2 * 2$ matrix
Encoding Matrix: 5 2 3 1
Write the elements per column (not per row)
Encoding Matrix

$ \begin{bmatrix} 5 & 3 \\[3ex] 2 & 1 \end{bmatrix} $


5th Step:
Encoded Message = Encoding Matrix * Decoded Message
Let us make sure they can multiply.
Order of Encoding Matrix = $2 * 2$
Order of Decoded Message = $2 * 5$
Number of columns of Encoding Matrix = Number of rows of Decoded Message
The matrices can multiply.
Order of Product = Number of rows of Encoding Matrix by Number of columns of Decoded Message
Order of Product = $2 * 5$

$ \begin{bmatrix} 5 & 3 \\[3ex] 2 & 1 \end{bmatrix} * \begin{bmatrix} 20 & 1 & 11 & 7 & 4 \\[3ex] 8 & 14 & 0 & 15 & 0 \end{bmatrix} \\[3ex] $

$ 5(20) + 3(8) = 100 + 24 = 124 \\[3ex] 5(1) + 3(14) = 5 + 42 = 47 \\[3ex] 5(11) + 3(0) = 55 + 0 = 55 \\[3ex] 5(7) + 3(15) = 35 + 45 = 80 \\[3ex] 5(4) + 3(0) = 20 + 0 = 20 \\[5ex] 2(20) + 1(8) = 40 + 8 = 48 \\[3ex] 2(1) + 1(14) = 2 + 14 = 16 \\[3ex] 2(11) + 1(0) = 22 + 0 = 22 \\[3ex] 2(7) + 1(15) = 14 + 15 = 29 \\[3ex] 2(4) + 1(0) = 8 + 0 = 8 \\[5ex] Encoded \:\; Message = \begin{bmatrix} 124 & 47 & 55 & 80 & 20 \\[3ex] 48 & 16 & 22 & 29 & 8 \end{bmatrix} \\[3ex] $
Release and write the elements per column (not per row)
Encoded Message = 124 48 47 16 55 22 80 29 20 8



Top

Example Guide (3 × 3 Matrices)

Some examples of 3 × 3 encoding matrices that you can use are:

$ \begin{bmatrix} 1 & 1 & 1 \\[3ex] 2 & 1 & 2 \\[3ex] 2 & 3 & 1 \end{bmatrix} $ $ \begin{bmatrix} 3 & 1 & 2 \\[3ex] 1 & 1 & 3 \\[3ex] 3 & 2 & 5 \end{bmatrix} $ $ \begin{bmatrix} 1 & 2 & 2 \\[3ex] 1 & 1 & 3 \\[3ex] 2 & 2 & 5 \end{bmatrix} $ $ \begin{bmatrix} 1 & 2 & 2 \\[3ex] 1 & 1 & 1 \\[3ex] 2 & 2 & 1 \end{bmatrix} $ $ \begin{bmatrix} 1 & 2 & 1 \\[3ex] 1 & 2 & 5 \\[3ex] 1 & 3 & 2 \end{bmatrix} $

Please verify that they meet the requirements.


Given: Please complete this sentence.
If you ....................................., the world will be a good place to live.
The "blank" is this encoded message:
49 83 91 25 50 30 33 41 91 28 51 52 17 26 40 33 48 84
encoded with the encoding matrix
1 2 2 1 1 3 1 2 1

To: decode the message
The Cipher Key is:

$A$ $B$ $C$ $D$ $E$ $F$
$1$ $2$ $3$ $4$ $5$ $6$
$G$ $H$ $I$ $J$ $K$ $L$
$7$ $8$ $9$ $10$ $11$ $12$
$M$ $N$ $O$ $P$ $Q$ $R$
$13$ $14$ $15$ $16$ $17$ $18$
$S$ $T$ $U$ $V$ $W$ $X$
$19$ $20$ $21$ $22$ $23$ $24$
$Y$ $Z$ $ $ $?$ $!$ $.$
$25$ $26$ $27, 0$ $28$ $29$ $30, 0$

1st Step:
Because this question deals with $3 * 3$ matrix, write the encoding matrix in a $3 * 3$ matrix form
1 2 2 1 1 3 1 2 1
Write the elements per column (not per row)
Encoding Matrix, A

$ A = \begin{bmatrix} 1 & 1 & 1 \\[3ex] 2 & 1 & 2 \\[3ex] 2 & 3 & 1 \end{bmatrix} $


2nd Step:
Because this question deals with $3 * 3$ matrix, write the encoded message in matrix form such that the number of rows is $3$
Ask students why they have to do it that way?
49 83 91 25 50 30 33 41 91 28 51 52 17 26 40 33 48 84
Encoded Message, B
Write the elements per column (not per row)

$ B = \begin{bmatrix} 49 & 25 & 33 & 28 & 17 & 33 \\[3ex] 83 & 50 & 41 & 51 & 26 & 48 \\[3ex] 91 & 30 & 91 & 52 & 40 & 84 \end{bmatrix} $


3rd Step:
Determine the Decoding Matrix, $A^{-1}$
We shall use both methods: The Formula Method and the Row Reduction Method.
You may use any one you wish.

$ \underline{Formula\:\: Method} \\[3ex] A^{-1} = \dfrac{adj\: A}{\det\: A} \\[5ex] For\:\: A = \begin{bmatrix} a & b & c \\[3ex] d & e & f \\[3ex] g & h & i \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\[3ex] 2 & 1 & 2 \\[3ex] 2 & 3 & 1 \end{bmatrix} \\[5ex] a = 1 \\[3ex] b = 1 \\[3ex] c = 1 \\[3ex] d = 2 \\[3ex] e = 1 \\[3ex] f = 2 \\[3ex] g = 2 \\[3ex] h = 3 \\[3ex] i = 1 \\[3ex] $

$ adj\: A = \begin{bmatrix} ei - hf & hc - bi & bf - ec \\[3ex] gf - di & ai - gc & dc - af \\[3ex] dh - ge & gb - ah & ae - db \end{bmatrix} \\[10ex] ei - hf = 1(1) - 3(2) = 1 - 6 = -5 \\[3ex] hc - bi = 3(1) - 1(1) = 3 - 1 = 2 \\[3ex] bf - ec = 1(2) - 1(1) = 2 - 1 = 1 \\[3ex] gf - di = 2(2) - 2(1) = 4 - 2 = 2 \\[3ex] ai - gc = 1(1) - 2(1) = 1 - 2 = -1 \\[3ex] dc - af = 2(1) - 1(2) = 2 - 2 = 0 \\[3ex] dh - ge = 2(3) - 2(1) = 6 - 2 = 4 \\[3ex] gb - ah = 2(1) - 1(3) = 2 - 3 = -1 \\[3ex] ae - db = 1(1) - 2(1) = 1 - 2 = -1 \\[5ex] \therefore adj\: A = \begin{bmatrix} -5 & 2 & 1 \\[3ex] 2 & -1 & 0 \\[3ex] 4 & -1 & -1 \end{bmatrix} \\[3ex] $

$ det\: A = aei + bgf + cdh - ahf - bdi - cge \\[3ex] aei = 1 * 1 * 1 = 1 \\[3ex] bgf = 1 * 2 * 2 = 4 \\[3ex] cdh = 1 * 2 * 3 = 6 \\[3ex] ahf = 1 * 3 * 2 = 6 \\[3ex] bdi = 1 * 2 * 1 = 2 \\[3ex] cge = 1 * 2 * 1 = 2 \\[5ex] \therefore det\: A = 1 + 4 + 6 - 6 - 2 - 2 = 1 \\[3ex] $

$ A^{-1} = \dfrac{adj\: A}{\det\: A} = \begin{bmatrix} \dfrac{-5}{1} & \dfrac{2}{1} & \dfrac{1}{1} \\[5ex] \dfrac{2}{1} & \dfrac{-1}{1} & \dfrac{0}{1} \\[5ex] \dfrac{4}{1} & \dfrac{-1}{1} & \dfrac{-1}{1} \end{bmatrix} \\[16ex] \therefore A^{-1} = \begin{bmatrix} -5 & 2 & 1 \\[3ex] 2 & -1 & 0 \\[3ex] 4 & -1 & -1 \end{bmatrix} \\[10ex] \underline{Row\:\: Reduction\:\: Method} \\[3ex] A \ \ | \ \ I = I \ \ | \ \ A^{-1} \\[3ex] \left[ \begin{array}{ccc|ccc} 1 & 1 & 1 & 1 & 0 & 0 \\[3ex] 2 & 1 & 2 & 0 & 1 & 0 \\[3ex] 2 & 3 & 1 & 0 & 0 & 1 \end{array} \right] \begin{matrix} \underrightarrow{-2R_1 + R_2} \\ \underrightarrow{-2R_1 + R_3} \end{matrix} \left[ \begin{array}{ccc|ccc} 1 & 1 & 1 & 1 & 0 & 0 \\[3ex] 0 & -1 & 0 & -2 & 1 & 0 \\[3ex] 0 & 1 & -1 & -2 & 0 & 1 \end{array} \right] \\[5ex] \begin{matrix} \underrightarrow{R_2 + R_1} \\ \underrightarrow{R_2 + R_3} \end{matrix} \left[ \begin{array}{ccc|ccc} 1 & 0 & 1 & -1 & 1 & 0 \\[3ex] 0 & -1 & 0 & -2 & 1 & 0 \\[3ex] 0 & 0 & -1 & -4 & 1 & 1 \end{array} \right] \underrightarrow{R_3 + R_1} \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & -5 & 2 & 1 \\[3ex] 0 & -1 & 0 & -2 & 1 & 0 \\[3ex] 0 & 0 & -1 & -4 & 1 & 1 \end{array} \right] \\[3ex] \begin{matrix} \underrightarrow{-R_2} \\ \underrightarrow{-R_3} \end{matrix} \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & -5 & 2 & 1 \\[3ex] 0 & 1 & 0 & 2 & -1 & 0 \\[3ex] 0 & 0 & 1 & 4 & -1 & -1 \end{array} \right] \\[3ex] $

$ A^{-1} = \begin{bmatrix} -5 & 2 & 1 \\[3ex] 2 & -1 & 0 \\[3ex] 4 & -1 & -1 \end{bmatrix} $


4th Step:
Determine the Decoded Message
Decoded Message = $A^{-1} * B$

Ask students if the matrices are conformable for multiplication

Order of Matrix $A^{-1} = 3 * 3$
Order of Matrix $B = 3 * 6$
Number of columns of $A^{-1}, (3)$ = Number of rows of $B, (3)$
The matrices can multiply.
Order of Product, $A^{-1}B$ = Number of rows of $A^{-1}$ by Number of columns of $B$
Order of $A^{-1}B = 3 * 6$

$ \begin{bmatrix} -5 & 2 & 1 \\[3ex] 2 & -1 & 0 \\[3ex] 4 & -1 & -1 \end{bmatrix} * \begin{bmatrix} 49 & 25 & 33 & 28 & 17 & 33 \\[3ex] 83 & 50 & 41 & 51 & 26 & 48 \\[3ex] 91 & 30 & 91 & 52 & 40 & 84 \end{bmatrix}\\[3ex] $

$ -5 * 49 + 2 * 83 + 1 * 91 = -245 + 166 + 91 = 12 \\[3ex] -5 * 25 + 2 * 50 + 1 * 30 = -125 + 100 + 30 = 5 \\[3ex] -5 * 33 + 2 * 41 + 1 * 91 = -165 + 82 + 91 = 8 \\[3ex] -5 * 28 + 2 * 51 + 1 * 52 = -140 + 102 + 52 = 14 \\[3ex] -5 * 17 + 2 * 26 + 1 * 40 = -85 + 52 + 40 = 7 \\[3ex] -5 * 33 + 2 * 48 + 1 * 84 = -165 + 96 + 84 = 15 \\[5ex] 2 * 49 + (-1) * 83 + 0 * 91 = 98 - 83 + 0 = 15 \\[3ex] 2 * 25 + (-1) * 50 + 0 * 30 = 50 - 50 + 0 = 0 \\[3ex] 2 * 33 + (-1) * 41 + 0 * 91 = 66 - 41 + 0 = 25 \\[3ex] 2 * 28 + (-1) * 51 + 0 * 52 = 56 - 51 + 0 = 5 \\[3ex] 2 * 17 + (-1) * 26 + 0 * 40 = 34 - 26 + 0 = 8 \\[3ex] 2 * 33 + (-1) * 48 + 0 * 84 = 66 - 48 + 0 = 18 \\[5ex] 4 * 49 + (-1) * 83 + (-1) * 91 = 196 - 83 - 91 = 22 \\[3ex] 4 * 25 + (-1) * 50 + (-1) * 30 = 100 - 50 - 30 = 20 \\[3ex] 4 * 33 + (-1) * 41 + (-1) * 91 = 132 - 41 - 91 = 0 \\[3ex] 4 * 28 + (-1) * 51 + (-1) * 52 = 112 - 51 - 52 = 9 \\[3ex] 4 * 17 + (-1) * 26 + (-1) * 40 = 68 - 26 - 40 = 2 \\[3ex] 4 * 33 + (-1) * 48 + (-1) * 84 = 132 - 48 - 84 = 0 \\[5ex] A^{-1} * B = \begin{bmatrix} 12 & 5 & 8 & 14 & 7 & 15 \\[3ex] 15 & 0 & 25 & 5 & 8 & 18 \\[3ex] 22 & 20 & 0 & 9 & 2 & 0 \end{bmatrix} $


5th Step:
Determine the Message using the Cipher Key

Decoded Message: 12 15 22 5 0 20 8 25 0 14 5 9 7 8 2 15 18 0
Message:               L O V E   T H Y   N E I G H B O R .

The message is LOVE THY NEIGHBOR.


Given: a secret message, LOVE THY NEIGHBOR.
To Encode: the secret message using a $3 * 3$ encoding matrix

1st Step:
Write the decoded message using the Cipher Key
Convert the characters to digits using the Cipher Key.
Message:              L O V E   T H Y   N E I G H B O R .
Decoded Message: 12 15 22 5 0 20 8 25 0 14 5 9 7 8 2 15 18 0
You may use $27$ for the space, and $30$ for the period if you wish.


2nd Step:
Because this question deals with $3 * 3$ matrix, write the decoded message in matrix form such that the number of rows is $3$
Ask students why they have to do it that way?
Make sure the number of digits is divisible by $3$.
12 15 22 5 0 20 8 25 0 14 5 9 7 8 2 15 18 0

It has 18 digits. Divide it by 3.
18 digits divided by 3 rows gives 6 digits in each row.
Write the elements per column (not per row)

Decoded Message

$ \begin{bmatrix} 12 & 5 & 8 & 14 & 7 & 15 \\[3ex] 15 & 0 & 25 & 5 & 8 & 18 \\[3ex] 22 & 20 & 0 & 9 & 2 & 0 \end{bmatrix} $


3rd Step:
Find an encoding matrix:
(1.) that has only positive integers. The elements of the encoding matrix has no zeros, negative integers, fractions and/or decimals.
(2.) that is invertible. The encoding matrix has an inverse.
(3.) such that the elements of the inverse of that matrix has only integers.
The inverse of the encoding matrix is the decoding matrix.
The elements of the decoding matrix should be only integers.
The elements of the decoding matrix should not have fractions or decimals.
You may use the calculators on the Matrix Algebra website, Microsoft Excel Spreadsheet, or Google Spreadsheet to find a suitable encoding matrix.
Encoding Matrix: 1 2 2 1 1 3 1 2 1


4th Step:
Because this question deals with $3 * 3$ matrix, write the encoding matrix as a $3 * 3$ matrix
Encoding Matrix: 1 2 2 1 1 3 1 2 1
Write the elements per column (not per row)
Encoding Matrix

$ \begin{bmatrix} 1 & 1 & 1 \\[3ex] 2 & 1 & 2 \\[3ex] 2 & 3 & 1 \end{bmatrix} $


5th Step:
Write the Encoded Message
Encoded Message = Encoding Matrix * Decoded Message
Let us make sure they can multiply.
Order of Encoding Matrix = $3 * 3$
Order of Decoded Message = $3 * 6$
Number of columns of Encoding Matrix = Number of rows of Decoded Message
The matrices can multiply.
Order of Product = Number of rows of Encoding Matrix by Number of columns of Decoded Message
Order of Product = $3 * 6$

$ \begin{bmatrix} 1 & 1 & 1 \\[3ex] 2 & 1 & 2 \\[3ex] 2 & 3 & 1 \end{bmatrix} * \begin{bmatrix} 12 & 5 & 8 & 14 & 7 & 15 \\[3ex] 15 & 0 & 25 & 5 & 8 & 18 \\[3ex] 22 & 20 & 0 & 9 & 2 & 0 \end{bmatrix} \\[3ex] $

$ 1(12) + 1(15) + 1(22) = 12 + 15 + 22 = 49 \\[3ex] 1(5) + 1(0) + 1(20) = 5 + 0 + 20 = 25 \\[3ex] 1(8) + 1(25) + 1(0) = 8 + 25 + 0 = 33 \\[3ex] 1(14) + 1(5) + 1(9) = 14 + 5 + 9 = 28 \\[3ex] 1(7) + 1(8) + 1(2) = 7 + 8 + 2 = 17 \\[3ex] 1(15) + 1(18) + 1(0) = 15 + 18 + 0 = 33 \\[5ex] 2(12) + 1(15) + 2(22) = 24 + 15 + 44 = 83 \\[3ex] 2(5) + 1(0) + 2(20) = 10 + 0 + 40 = 50 \\[3ex] 2(8) + 1(25) + 2(0) = 16 + 25 + 0 = 41 \\[3ex] 2(14) + 1(5) + 2(9) = 28 + 5 + 18 = 51 \\[3ex] 2(7) + 1(8) + 2(2) = 14 + 8 + 4 = 26 \\[3ex] 2(15) + 1(18) + 2(0) = 30 + 18 + 0 = 48 \\[5ex] 2(12) + 3(15) + 1(22) = 24 + 45 + 22 = 91 \\[3ex] 2(5) + 3(0) + 1(20) = 10 + 0 + 20 = 30 \\[3ex] 2(8) + 3(25) + 1(0) = 16 + 75 + 0 = 91 \\[3ex] 2(14) + 3(5) + 1(9) = 28 + 15 + 9 = 52 \\[3ex] 2(7) + 3(8) + 1(2) = 14 + 24 + 2 = 40 \\[3ex] 2(15) + 3(18) + 1(0) = 30 + 54 + 0 = 84 \\[3ex] $

$ Encoded \:\; Message = \begin{bmatrix} 49 & 25 & 33 & 28 & 17 & 33 \\[3ex] 83 & 50 & 41 & 51 & 26 & 48 \\[3ex] 91 & 30 & 91 & 52 & 40 & 84 \end{bmatrix} \\[3ex] $

Release and write the elements per column (not per row)
Encoded Message = 49 83 91 25 50 30 33 41 91 28 51 52 17 26 40 33 48 84



Top

References

Chukwuemeka, S.D (2016, April 30). Samuel Chukwuemeka Tutorials - Math, Science, and Technology. Retrieved from https://precalculus.appspot.com/



Top