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 161: PreCalculus I
(Presents topics in power, polynomial, rational, exponential, and logarithmic functions, and systems of equations and inequalities.)

MTH 165: Finite Math
(Presents topics in systems of equations, matrices, linear programming, mathematics of finance, counting theory, probability, and Markov Chains.)

MTH 167: PreCalculus with Trigonometry
(Presents topics in power, polynomial, rational, exponential, and logarithmic functions, systems of equations, trigonometry, and trigonometric applications, including Law of Sines and Cosines, and an introduction to conics.)

MTH 266: Linear Algebra
(Covers matrices, vector spaces, determinants, solutions of systems of linear equations, basis and dimension, eigenvalues, and eigenvectors.)

(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 student or a group (no more than two students) project.

(A.) For an individual project:
(a.) The student will encode a secret message using a 2 by 2 matrix.
(b.) The student will decode the secret message.
(c.) The student will encode a secret message using a 3 by 3 matrix.
(d.) The student will decode the secret message.

(B.) For a group project:
(a.) Only two students may be in a group.
(b.) The 1st student will encode a secret message using a 2 by 2 matrix.
(c.) The 2nd student will decode the secret message.
(d.) The 2nd student will encode a secret message using a 3 by 3 matrix.
(e.) The 1st student will decode the secret message.

(2.) (a.) A scenario or at least a sentence that includes the secret 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.

(3.) All work/steps must 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.

(4.) As a student, you have free access to Microsoft Office suite of apps.
(a.) Please download the desktop apps of Microsoft Office on your desktop/laptop (Windows and/or Mac only).
Do not use a chromebook.
Do not use a tablet/iPad.
Do not use a smartphone.
Do not use the web app/sharepoint access of Microsoft Office.
(Please contact the IT/Tech Support for assistance if you do not know how to download the desktop app.)
In that regard, the project is to be typed using the desktop version/app of Microsoft Office Word only.

(b.) The file name for the Microsoft Office Word project should be saved as: firstNamelastNameproject
Use only hyphens between your first name and your last name; and between your last name and the word, project.
No spaces.

(c.) For all English terms/work: use Times New Roman; font size of 14; line spacing of 1.5.
Further, please make sure you have appropriate spacing between each heading and/or section as applicable.
Your work should be well-formatted and visually appealing.

first step

(d.) For all Math terms/work: symbols, variables, numbers, formulas, expressions, equations and fractions among others, the Math Equation Editor is required.
(i.) The font is set to Cambria Math by default (set it to that font if it is not); font size of 14, and align accordingly (preferably left-aligned).
(ii.) To ensure appropriate spacing between your Math work, use a line spacing of 2.0.
Alternatively, you may use line spacing of 1.5 but insert a space after each equation as applicable.
Your work should be well-formatted, organized, well-spaced (not compact), and visually appealing.

second step

third step

(e.) 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.
Draft projects are not graded because they are drafts. They are only for feedback.
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.

Please turn in your draft in the Discussions page → Projects: Drafts forum in the Canvas course (if you would like your colleagues to read my comments and avoid any mistakes that you made).
You may also send it to me via email (if you do not want your colleagues to see my comments and learn from the comments).
I shall review and provide feedback.
Then, review my feedback and make changes as necessary.
Keep working with me until I give you the green light to turn in your actual project. This must be done before the final due date to turn in the actual project.

When everything is fine (after you make changes as applicable based on my feedback), please submit your work in the appropriate area: Assignments page → Project in the Canvas course.
Only the projects submitted in the appropriate place in the Canvas course are graded.

(8.) All work must be turned in by the final due date to receive credit.
Please note the due dates listed in the course syllabus for the submission of the draft and the actual project. In the course syllabus, we have the:
(a.) Initial due date for the Project Draft: Please turn in your draft.

(b.) Initial due date for the Project: If your draft is not ready for submission, keep working with me. Make changes based on my feedback and keep working with me.
If you prefer not to turn in a draft, please review all the resources provided for you and do your project well and submit.


(c.) Final due date for the Project Draft: This is necessary if you want a written feedback for your draft.
After this date, written feedback would not be provided for your draft. However, verbal feedback would still be provided during Office Hours/Student Engagement Hours/Live Sessions.

(d.) Final due date for the Project: All work must be turned in by this date to receive credit.
After this date, no work may be accepted.

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 are not acceptable.

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

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

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



Required Information.
The use of a table is optional.
Name(s): Your name(s)
Date: The date
Instructor: Samuel Chukwuemeka
Project: Matrix Application in Cryptology
Objectives:
(1.) Encrypt/Encode/Encipher (use any one term) a secret message using a 2 × 2 matrix.
(2.) Decrypt/Decode/Decipher (use any one term) the secret message encrypted/encoded with a 2 × 2 matrix.
(3.) Encrypt/Encode/Encipher (use any one term) a secret message using a 3 × 3 matrix.
(4.) Decrypt/Decode/Decipher (use any one term) the secret message encrypted/encoded with a 3 × 3 matrix.
Scenario/Story for the 2 by 2 encoded secret message:
(For Group Project: Task Done By: Name of 1st Student)
Decoding the secret message encoded with 2 by 2 matrix:
(For Group Project: Task Done By: Name of 2nd Student)
Scenario/Story for the 3 by 3 encoded secret message:
(For Group Project: Task Done By: Name of 2nd Student)
Decoding the secret message encoded with 3 by 3 matrix:
(For Group Project: Task Done By: Name of 1st Student)
References: Cite your source(s) accordingly.
Indicate the type of citation format.


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 Samuel and his Mother.
Mom: Samuel my son, what did you learn in church today?
Samuel: 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} \\[16ex] \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} \\[16ex] \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

Students Projects

First Sample: Alexandra: Matrix Application in Cryptology


The teacher should guide each student to the successful completion of the project.
Let students know you are willing to help.


Top

References

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



Top