<< Chapter < Page Chapter >> Page >

Now suppose we wanted to use a 3 × 3 size 12{3 times 3} {} matrix to encode a message, then instead of dividing the letters into groups of two, we would divide them into groups of three.

Using the matrix B = 1 1 1 1 0 1 2 1 1 size 12{B= left [ matrix { 1 {} # 1 {} # - 1 {} ##1 {} # 0 {} # 1 {} ## 2 {} # 1 {} # 1{}} right ]} {} , encode the message: ATTACK NOW!

We divide the letters of the message into groups of three.

ATT ACK –NO W––

Note that since the single letter "W" was left over on the end, we added two spaces to make it into a triplet.

Now we assign the numbers their corresponding letters from the table, and convert each triplet of numbers into 3 × 1 size 12{3 times 1} {} matrices. We get

A T T = 1 20 20 size 12{ left [ matrix { A {} ##T {} ## T} right ]= left [ matrix {1 {} ## "20" {} ##"20" } right ]} {} A C K = 1 3 11 size 12{ left [ matrix { A {} ##C {} ## K} right ]= left [ matrix {1 {} ## 3 {} ##"11" } right ]} {} _ N O = 27 14 15 size 12{ left [ matrix {_ {} ## N {} ##O } right ]= left [ matrix { "27" {} ##"14" {} ## "15"} right ]} {} W _ _ = 23 27 27 size 12{ left [ matrix { W {} ##_ {} ## _} right ]= left [ matrix {"23" {} ## "27" {} ##"27" } right ]} {}

So far we have,

1 20 20 1 3 11 27 14 15 23 27 27 size 12{ left [ matrix { 1 {} ##"20" {} ## "20"} right ] left [ matrix {1 {} ## 3 {} ##"11" } right ]left [ matrix { "27" {} ##"14" {} ## "15"} right ] left [ matrix {"23" {} ## "27" {} ##"27" } right ]} {}

We multiply, on the left, each matrix of our message by the matrix B. For example,

1 1 1 1 0 1 2 1 1 1 20 20 = 1 21 42 size 12{ left [ matrix { 1 {} # 1 {} # - 1 {} ##1 {} # 0 {} # 1 {} ## 2 {} # 1 {} # 1{}} right ] left [ matrix {1 {} ## "20" {} ##"20" } right ]= left [ matrix { 1 {} ##"21" {} ## "42"} right ]} {}

By multiplying each of the matrices in ( III ) by the matrix B, we get the desired coded message as follows:

1 21 42 7 12 16 26 42 83 23 50 100 size 12{ left [ matrix { 1 {} ##"21" {} ## "42"} right ] left [ matrix {- 7 {} ## "12" {} ##"16" } right ]left [ matrix { "26" {} ##"42" {} ## "83"} right ] left [ matrix {"23" {} ## "50" {} ##"100" } right ]} {}

If we need to decode this message, we simply multiply the coded message by B 1 size 12{B rSup { size 8{ - 1} } } {} , and associate the numbers with the corresponding letters of the alphabet.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Decode the following message that was encoded using matrix B = 1 1 1 1 0 1 2 1 1 size 12{B= left [ matrix { 1 {} # 1 {} # - 1 {} ##1 {} # 0 {} # 1 {} ## 2 {} # 1 {} # 1{}} right ]} {} .

11 20 43 25 10 41 22 14 14 size 12{ left [ matrix { "11" {} ##"20" {} ## "43"} right ] left [ matrix {"25" {} ## "10" {} ##"41" } right ]left [ matrix { "22" {} ##"14" {} ## "14"} right ]} {}

Since this message was encoded by multiplying by the matrix B. We first determine inverse of B.

B 1 = 1 2 1 1 3 2 1 1 1 size 12{B rSup { size 8{ - 1} } = left [ matrix { 1 {} # 2 {} # - 1 {} ##- 1 {} # - 3 {} # 2 {} ## - 1 {} # - 1 {} # 1{}} right ]} {}

To decode the message, we multiply each matrix, on the left, by B 1 size 12{B rSup { size 8{ - 1} } } {} . For example,

1 2 1 1 3 2 1 1 1 11 20 43 = 8 15 12 size 12{ left [ matrix { 1 {} # 2 {} # - 1 {} ##- 1 {} # - 3 {} # 2 {} ## - 1 {} # - 1 {} # 1{}} right ] left [ matrix {"11" {} ## "20" {} ##"43" } right ]= left [ matrix { 8 {} ##"15" {} ## "12"} right ]} {}

By multiplying each of the matrices in ( IV ) by the matrix B 1 size 12{B rSup { size 8{ - 1} } } {} , we get the following.

8 15 12 4 27 6 9 18 5 size 12{ left [ matrix { 8 {} ##"15" {} ## "12"} right ] left [ matrix {4 {} ## "27" {} ##6 } right ]left [ matrix { 9 {} ##"18" {} ## 5} right ]} {}

Finally, by associating the numbers with their corresponding letters, we obtain the following.

H O L D F I R E size 12{ left [ matrix { H {} ##O {} ## L} right ] left [ matrix {D {} ## _ {} ##F } right ]left [ matrix { I {} ##R {} ## E} right ]} {}

And the message reads: HOLD FIRE.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

We summarize.

    To encode a message

  1. Divide the letters of the message into groups of two or three.
  2. Convert each group into a string of numbers by assigning a number to each letter of the message. Remember to assign letters to blank spaces.
  3. Convert each group of numbers into column matrices.
  4. Convert these column matrices into a new set of column matrices by multiplying them with a compatible square matrix of your choice that has an inverse. This new set of numbers or matrices represents the coded message.

    To decode a message

  1. Take the string of coded numbers and multiply it by the inverse of the matrix that was used to encode the message.
  2. Associate the numbers with their corresponding letters.
Got questions? Get instant answers now!

Applications – leontief models

In the 1930's, Wassily Leontief used matrices to model economic systems. His models, often referred to as the input-output models, divide the economy into sectors where each sector produces goods and services not only for itself but also for other sectors. These sectors are dependent on each other and the total input always equals the total output. In 1973, he won the Nobel Prize in Economics for his work in this field. In this section we look at both the closed and the open models that he developed.

The closed model

As an example of the closed model, we look at a very simple economy, where there are only three sectors: food, shelter, and clothing.

We assume that in a village there is a farmer, carpenter, and a tailor, who provide the three essential goods: food, shelter, and clothing. Suppose the farmer himself consumes 40% of the food he produces, and gives 40% to the carpenter, and 20% to the tailor. Thirty percent of the carpenter's production is consumed by himself, 40% by the farmer, and 30% by the carpenter. Fifty percent of the tailor's production is used by himself, 30% by the farmer, and 20% by the tailor. Write the matrix that describes this closed model.

The table below describes the above information.

The proportion produced by the farmer The propotion produced by the carpenter The proportion produced by the tailor
The proportion used by the farmer .40 .40 .30
The proportion used by the carpenter .40 .30 .20
The proportion used by the tailor .20 .30 .50

In a matrix form it can be written as follows.

A = . 40 . 40 . 30 . 40 . 30 . 20 . 20 . 30 . 50 size 12{A= left [ matrix { "." "40" {} # "." "40" {} # "." "30" {} ##"." "40" {} # "." "30" {} # "." "20" {} ## "." "20" {} # "." "30" {} # "." "50"{}} right ]} {}

This matrix is called the input-output matrix . It is important that we read the matrix correctly. For example the entry A 23 size 12{A rSub { size 8{"23"} } } {} , the entry in row 2 and column 3, represents the following.

A 23 = 20 % size 12{A rSub { size 8{"23"} } ="20"%} {} of the tailor's production is used by the carpenter.

A 33 = 50 % size 12{A rSub { size 8{"33"} } ="50"%} {} of the tailor's production is used by the tailor.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied finite mathematics. OpenStax CNX. Jul 16, 2011 Download for free at http://cnx.org/content/col10613/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied finite mathematics' conversation and receive update notifications?

Ask