Solution
Given:
A = [ 1 0 1 2 − 1 1 0 1 2 ] A=\begin{bmatrix}1&0&1\\2&-1&1\\0&1&2\end{bmatrix} A = 1 2 0 0 − 1 1 1 1 2
Message: KEEP IT UP .
Using A → 1 , … , Z → 26 A\to 1,\dots,Z\to 26 A → 1 , … , Z → 26 and space as 27 27 27 :
K = 11 , E = 5 , E = 5 , P = 16 , space = 27 , I = 9 , T = 20 , space = 27 , U = 21 , P = 16 K=11,\ E=5,\ E=5,\ P=16,\ \text{space}=27,\ I=9,\ T=20,\ \text{space}=27,\ U=21,\ P=16 K = 11 , E = 5 , E = 5 , P = 16 , space = 27 , I = 9 , T = 20 , space = 27 , U = 21 , P = 16
Arrange the message into blocks of 3 (column vectors). If needed, pad with space 27 27 27 :
P = [ 11 16 20 16 5 27 27 27 5 9 21 27 ] P=
\begin{bmatrix}
11&16&20&16\\
5&27&27&27\\
5&9&21&27
\end{bmatrix} P = 11 5 5 16 27 9 20 27 21 16 27 27
Encode by:
C = A P C=AP C = A P
Compute:
C = [ 1 0 1 2 − 1 1 0 1 2 ] [ 11 16 20 16 5 27 27 27 5 9 21 27 ] = [ 16 25 41 43 22 14 34 32 15 45 69 81 ] C=
\begin{bmatrix}1&0&1\\2&-1&1\\0&1&2\end{bmatrix}
\begin{bmatrix}
11&16&20&16\\
5&27&27&27\\
5&9&21&27
\end{bmatrix}
=
\begin{bmatrix}
16&25&41&43\\
22&14&34&32\\
15&45&69&81
\end{bmatrix} C = 1 2 0 0 − 1 1 1 1 2 11 5 5 16 27 9 20 27 21 16 27 27 = 16 22 15 25 14 45 41 34 69 43 32 81
Encoded message = [ 16 25 41 43 22 14 34 32 15 45 69 81 ] \boxed{\text{Encoded message }=\begin{bmatrix}16&25&41&43\\22&14&34&32\\15&45&69&81\end{bmatrix}} Encoded message = 16 22 15 25 14 45 41 34 69 43 32 81