3 Aplication of Matrice Operations (Larson)
3 Aplication of Matrice Operations (Larson)
3 Aplication of Matrice Operations (Larson)
STOCHASTIC MATRICES
Many types of applications involve a finite set of states 再S1, S2 , . . . , Sn冎 of a given
population. For instance, residents of a city may live downtown or in the suburbs.
Voters may vote Democrat, Republican, or Independent. Soft drink consumers may buy
Coca-Cola, Pepsi Cola, or another brand.
The probability that a member of a population will change from the jth state to the
ith state is represented by a number pij , where 0 ⱕ pij ⱕ 1. A probability of pij ⫽ 0
means that the member is certain not to change from the jth state to the ith state,
whereas a probability of pij ⫽ 1 means that the member is certain to change from the
jth state to the ith state.
From
S1 S2 . . . Sn
冤 冥
p11 p12 p1n S1 . . .
p21 p22 p2n S2 . . .
P⫽ . . . .. To
. . . .
. . . . . .
pn1 pn2 pnn Sn
冤 冥
1 1 1
冤 冥
1 0 0 2 3 4
1 3
a. 0 1 0 b. 4 0 4
0 0 1 1 2
4 3 0
冤 冥
1 1 1
冤 冥
0.1 0.2 0.3 2 4 4
1 2
c. 0.2 0.3 0.4 d. 3 0 3
0.3 0.4 0.5 1 3
4 4 0
2.5 Applications of Matrix Operations 85
Two competing companies offer satellite television service to a city with 100,000
households. Figure 2.1 shows the changes in satellite subscriptions each year.
Company A now has 15,000 subscribers and Company B has 20,000 subscribers. How
many subscribers will each company have in one year?
70% 80%
15% 5%
10% 15%
No Satellite
Television
70%
Figure 2.1
SOLUTION
The matrix representing the given transition probabilities is
From
A B None
冤 冥
0.70 0.15 0.15 A
P ⫽ 0.20 0.80 0.15 B To
0.10 0.05 0.70 None
and the state matrix representing the current populations in the three states is
冤 冥
15,000 A
X ⫽ 20,000 . B
65,000 None
To find the state matrix representing the populations in the three states in one year,
multiply P by X to obtain
冤 冥冤 冥
0.70 0.15 0.15 15,000
PX ⫽ 0.20 0.80 0.15 20,000
0.10 0.05 0.70 65,000
冤 冥
23,250
⫽ 28,750 .
48,000
In one year, Company A will have 23,250 subscribers and Company B will have
28,750 subscribers.
One appeal of the matrix solution in Example 2 is that once you have created
the model, it becomes relatively easy to find the state matrices representing future
years by repeatedly multiplying by the matrix P. Example 3 demonstrates this
process.
86 Chapter 2 Matrices
Assuming the matrix of transition probabilities from Example 2 remains the same year
after year, find the number of subscribers each satellite television company will have after
(a) 3 years, (b) 5 years, and (c) 10 years. Round each answer to the nearest whole number.
SOLUTION
a. From Example 2, you know that the numbers of subscribers after 1 year are
冤 冥
23,250 A
PX ⫽ 28,750 . B After 1 year
48,000 None
Because the matrix of transition probabilities is the same from the first year to the
third year, the numbers of subscribers after 3 years are
冤 冥
30,283 A
P 3X ⬇ 39,042 . B After 3 years
30,675 None
After 3 years, Company A will have 30,283 subscribers and Company B will have
39,042 subscribers.
b. The numbers of subscribers after 5 years are
冤 冥
32,411 A
P 5X ⬇ 43,812 . B After 5 years
23,777 None
After 5 years, Company A will have 32,411 subscribers and Company B will have
43,812 subscribers.
c. The numbers of subscribers after 10 years are
冤 冥
33,287 A
P 10 X ⬇ 47,147 . B After 10 years
19,566 None
After 10 years, Company A will have 33,287 subscribers and Company B will have
47,147 subscribers.
冤 冥
33,333 A
X ⫽ 47,619 . B Steady state
19,048 None
Check to see that PX ⫽ X, as follows.
冤 冥冤 冥
0.70 0.15 0.15 33,333
PX ⫽ 0.20 0.80 0.15 47,619
0.10 0.05 0.70 19,048
冤 冥
33,333
⬇ 47,619 ⫽ X
19,048
2.5 Applications of Matrix Operations 87
CRYPTOGRAPHY
A cryptogram is a message written according to a secret code (the Greek word kryptos
means “hidden”). The following describes a method of using matrix multiplication to
encode and decode messages.
To begin, assign a number to each letter in the alphabet (with 0 assigned to a blank
space), as follows.
0 ⫽ __ 14 ⫽ N
1⫽A 15 ⫽ O
2⫽B 16 ⫽ P
3⫽C 17 ⫽ Q
4⫽D 18 ⫽ R
5⫽E 19 ⫽ S
6⫽F 20 ⫽ T
7⫽G 21 ⫽ U
8⫽H 22 ⫽ V
9⫽I 23 ⫽ W
10 ⫽ J 24 ⫽ X
11 ⫽ K 25 ⫽ Y
12 ⫽ L 26 ⫽ Z
13 ⫽ M
Then convert the message to numbers and partition it into uncoded row matrices, each
having n entries, as demonstrated in Example 4.
Write the uncoded row matrices of size 1 ⫻ 3 for the message MEET ME MONDAY.
SOLUTION
Partitioning the message (including blank spaces, but ignoring punctuation) into groups
of three produces the following uncoded row matrices.
[13 5 5] [20 0 13] [5 0 13] [15 14 4] [1 25 0]
M E E T __ M E __ M O N D A Y __
Note the use of a blank space to fill out the last uncoded row matrix.
Encoding a Message
冤 冥
1 2
A ⫽ ⫺1 1 3
1 ⫺1 ⫺4
to encode the message MEET ME MONDAY.
SOLUTION
Obtain the coded row matrices by multiplying each of the uncoded row matrices found
in Example 4 by the matrix A, as follows.
Uncoded Encoding Coded Row
Row Matrix Matrix A Matrix
⫺2
冤 冥
1 2
关13 5 5兴 ⫺1 1 3 ⫽ 关13 ⫺26 21兴
1 ⫺1 ⫺4
⫺2
冤 冥
1 2
关20 0 13兴 ⫺1 1 3 ⫽ 关33 ⫺53 ⫺12兴
1 ⫺1 ⫺4
⫺2
冤 冥
1 2
关5 0 13兴 ⫺1 1 3 ⫽ 关18 ⫺23 ⫺42兴
1 ⫺1 ⫺4
⫺2
冤 冥
1 2
关15 14 4兴 ⫺1 1 3 ⫽ 关5 ⫺20 56兴
1 ⫺1 ⫺4
⫺2
冤 冥
1 2
关1 25 0兴 ⫺1 1 3 ⫽ 关⫺24 23 77兴
1 ⫺1 ⫺4
The sequence of coded row matrices is
关13 ⫺26 21兴 关33 ⫺53 ⫺12兴 关18 ⫺23 ⫺42兴 关5 ⫺20 56兴 关⫺24 23 77兴.
Finally, removing the matrix notation produces the following cryptogram.
13 ⫺26 21 33 ⫺53 ⫺12 18 ⫺23 ⫺42 5 ⫺20 56 ⫺24 23 77
For those who do not know the encoding matrix A, decoding the cryptogram
found in Example 5 is difficult. But for an authorized receiver who knows the
encoding matrix A, decoding is relatively simple. The receiver just needs to multiply
the coded row matrices by A⫺1 to retrieve the uncoded row matrices. In other
words, if
X ⫽ 关x 1 x 2 . . . x n 兴
is an uncoded 1 ⫻ n matrix, then Y ⫽ XA is the corresponding encoded matrix.
The receiver of the encoded matrix can decode Y by multiplying on the right by A⫺1
to obtain
YA⫺1 ⫽ 共XA兲A⫺1 ⫽ X.
Example 6 demonstrates this procedure.
2.5 Applications of Matrix Operations 89
Decoding a Message
冤 冥
1 2
A ⫽ ⫺1 1 3
Simulation
Explore this concept further with 1 ⫺1 ⫺4
an electronic simulation available to decode the cryptogram
at www.cengagebrain.com.
13 ⫺26 21 33 ⫺53 ⫺12 18 ⫺23 ⫺42 5 ⫺20 56 ⫺24 23 77.
SOLUTION
Begin by using Gauss-Jordan elimination to find A⫺1.
关A I兴 关I A⫺1兴
冤 冥 冤 冥
1 ⫺2 2 1 0 0 1 0 0 ⫺1 ⫺10 ⫺8
⫺1 1 3 0 1 0 0 1 0 ⫺1 ⫺6 ⫺5
1 ⫺1 ⫺4 0 0 1 0 0 1 0 ⫺1 ⫺1
Now, to decode the message, partition the message into groups of three to form the
coded row matrices
关13 ⫺26 21兴 关33 ⫺53 ⫺12兴 关18 ⫺23 ⫺42兴 关5 ⫺20 56兴 关⫺24 23 77兴.
To obtain the decoded row matrices, multiply each coded row matrix by A⫺1
(on the right).
Coded Row Decoding Decoded
Matrix Matrix A⫺1 Row Matrix
⫺1 ⫺10 ⫺8
关13 ⫺26
冤
21兴 ⫺1 ⫺6
0 ⫺1
冥
⫺5 ⫽ 关13
⫺1
5 5兴
⫺1 ⫺10 ⫺8
关33 ⫺53 ⫺12兴 ⫺1 ⫺6
0 ⫺1
冤 ⫺1
冥
⫺5 ⫽ 关20 0 13兴
⫺1 ⫺10 ⫺8
0 ⫺1 ⫺1
冤
关18 ⫺23 ⫺42兴 ⫺1 ⫺6 ⫺5 ⫽ 关5
冥 0 13兴
⫺1 ⫺10 ⫺8
关5 ⫺20
冤
56兴 ⫺1 ⫺6
0 ⫺1
冥
⫺5 ⫽ 关15
⫺1
14 4兴
⫺1 ⫺10 ⫺8
关⫺24 23
冤
77兴 ⫺1 ⫺6
0 ⫺1
⫺5 ⫽ 关1
⫺1
冥 25 0兴
I1 I2 . . . In
d11 d12 . . . d1n I1
.
.
.
.
冤
d21 d22 . . . d2n I2
D⫽ .
. . . . .
dn1 dn2
.
. ..
dnn In
. 冥 Supplier (Input)
To understand how to use this matrix, consider d12 ⫽ 0.4. This means that
for Industry 2 to produce one unit of its product, it must use 0.4 unit of Industry 1’s
product. If d33 ⫽ 0.2, then Industry 3 needs 0.2 unit of its own product to produce one
unit. For this model to work, the values of dij must satisfy 0 ⱕ dij ⱕ 1 and the sum of
the entries in any column must be less than or equal to 1.
E W C
冤 冥
0.5 0.1 0.2 E
0.25 0.6 0.15 W Supplier (Input)
0.25 0 0.5 C
The row entries show the amounts each industry supplies to the others, and to itself,
for that industry to produce one unit of output. For instance, the electricity industry
supplies 0.5 unit to itself, 0.1 unit to water, and 0.2 unit to coal.
To develop the Leontief input-output model further, let the total output of the ith
industry be denoted by x i. If the economic system is closed (meaning that it sells its
products only to industries within the system, as in the example above), then the total
output of the ith industry is given by the linear equation
x i ⫽ di1x 1 ⫹ di2 x 2 ⫹ . . . ⫹ din x n. Closed system
2.5 Applications of Matrix Operations 91
On the other hand, if the industries within the system sell products to nonproducing
groups (such as governments or charitable organizations) outside the system, then the
system is open and the total output of the ith industry is given by
x i ⫽ di1x 1 ⫹ di2 x 2 ⫹ . . . ⫹ din x n ⫹ ei Open system
where ei represents the external demand for the ith industry’s product. The following
system of n linear equations represents the collection of total outputs for an open system.
x 1 ⫽ d11x 1 ⫹ d12 x 2 ⫹ . . . ⫹ d1n x n ⫹ e1
x 2 ⫽ d21x 1 ⫹ d22 x 2 ⫹ . . . ⫹ d2nx n ⫹ e2
.
.
.
x n ⫽ dn1x 1 ⫹ dn2 x 2 ⫹ . . . ⫹ dnn x n ⫹ en
The matrix form of this system is X ⫽ DX ⫹ E, where X is the output matrix and E is
the external demand matrix.
A B C
冤 冥
0.1 0.43 0 A
D ⫽ 0.15 0 0.37 B Supplier (Input)
0.23 0.03 0.02 C
Find the output matrix X when the external demands are
冤 冥
20,000 A
E ⫽ 30,000 . B
25,000 C
Round each matrix entry to the nearest whole number.
SOLUTION
Letting I be the identity matrix, write the equation X ⫽ DX ⫹ E as IX ⫺ DX ⫽ E,
which means that 共I ⫺ D兲X ⫽ E. Using the matrix D above produces
冤 冥
0.9 ⫺0.43 0
I ⫺ D ⫽ ⫺0.15 1 ⫺0.37 .
REMARK ⫺0.23 ⫺0.03 0.98
The economic systems
Finally, applying Gauss-Jordan elimination to the system of linear equations represented
described in Examples 7 and 8
are, of course, simple ones.
by 共I ⫺ D兲X ⫽ E produces
冤 冥 冤 冥
In the real world, an economic 0.9 ⫺0.43 0 20,000 1 0 0 46,616
system would include many ⫺0.15 1 ⫺0.37 30,000 0 1 0 51,058 .
industries or industrial groups.
A detailed analysis using
⫺0.23 ⫺0.03 0.98 25,000 0 0 1 38,014
the Leontief input-output So, the output matrix is
model could easily require
冤 冥
an input-output matrix greater 46,616 A
than 100 ⫻ 100 in size. Clearly, X ⫽ 51,058 . B
this type of analysis would 38,014 C
require the aid of a computer.
To produce the given external demands, the outputs of the three industries must be
46,616 units for industry A, 51,058 units for industry B, and 38,014 units for industry C.
92 Chapter 2 Matrices
Determine a line that appears to best fit the points 共1, 1兲, 共2, 2兲, 共3, 4兲, 共4, 4兲, and 共5, 6兲.
SOLUTION
Plot the points, as shown in Figure 2.2. It appears that a good choice would be the line
whose slope is 1 and whose y-intercept is 0.5. The equation of this line is
y ⫽ 0.5 ⫹ x.
An examination of the line in Figure 2.2 reveals that you can improve the fit
by rotating the line counterclockwise slightly, as shown in Figure 2.3. It seems clear
that this line, whose equation is y ⫽ 1.2x, fits the given points better than the
original line.
y y
3 3
y = 0.5 + x y = 0.5 + x
2 (2, 2) 2 (2, 2)
y 1 (1, 1) 1 (1, 1)
6 Model 1 (5, 6) x x
1 2 3 4 5 6 1 2 3 4 5 6
5 Figure 2.2 Figure 2.3
4 (3, 4) (4, 4) One way of measuring how well a function y ⫽ f (x) fits a set of points
3 共x 1, y1兲, 共x 2, y2兲, . . . , 共x n, yn兲
y = 0.5 + x
2 (2, 2) is to compute the differences between the values from the function f 共x i 兲 and the actual
1 (1, 1) values yi. These values are shown in Figure 2.4. By squaring the differences and
summing the results, you obtain a measure of error called the sum of squared error.
x
1 2 3 4 5 6
The table shows the sums of squared errors for the two linear models.
y
Model 1: f 冇x冈 ⴝ 0.5 ⴙ x Model 2: f 冇x冈 ⴝ 1.2x
6 Model 2 (5, 6)
xi yi f 冇xi冈 [ yi ⴚ f 冇xi 冈]
2 xi yi f 冇xi冈 [ yi ⴚ f 冇xi 冈]2
5
3
2 2 2.5 共⫺0.5兲2 2 2 2.4 共⫺0.4兲2
y = 1.2x
2 (2, 2) 3 4 3.5 共⫹0.5兲2 3 4 3.6 共⫹0.4兲2
1 (1, 1) 4 4 4.5 共⫺0.5兲2 4 4 4.8 共⫺0.8兲2
x 5 6 5.5 共⫹0.5兲2 5 6 6.0 共0.0兲2
1 2 3 4 5 6
Sum 1.25 Sum 1.00
Figure 2.4
2.5 Applications of Matrix Operations 93
The sums of squared errors confirm that the second model fits the given points better
than the first model.
Of all possible linear models for a given set of points, the model that has the best
fit is defined to be the one that minimizes the sum of squared error. This model is called
the least squares regression line, and the procedure for finding it is called the method
of least squares.
To find the least squares regression line for a set of points, begin by forming the
system of linear equations
y1 ⫽ f 共x 1兲 ⫹ 关 y1 ⫺ f 共x 1兲兴
y2 ⫽ f 共x 2 兲 ⫹ 关 y2 ⫺ f 共x 2 兲兴
.
.
.
yn ⫽ f 共x n 兲 ⫹ 关 yn ⫺ f 共x n 兲兴
where the right-hand term,
关 yi ⫺ f 共x i 兲兴
of each equation is the error in the approximation of yi by f 共x i 兲. Then write this
error as
ei ⫽ yi ⫺ f 共x i 兲
and write the system of equations in the form
y1 ⫽ 共a0 ⫹ a1x 1兲 ⫹ e1
y2 ⫽ 共a0 ⫹ a1x 2 兲 ⫹ e2
.
.
.
yn ⫽ 共a0 ⫹ a1x n兲 ⫹ en.
Now, if you define Y, X, A, and E as
冤冥 冤 冥 冤冥
y1 1 x1 e1
y
冤 冥
1. x. 2 a e
Y ⫽ .2 , X⫽ . . , A⫽ 0 , E ⫽ .2
. . . a1 .
. .
yn 1 xn en
then the n linear equations may be replaced by the matrix equation
Y ⫽ XA ⫹ E.
Note that the matrix X has a column of 1’s (corresponding to a0) and a column
containing the x i’s. This matrix equation can be used to determine the coefficients of
the least squares regression line, as follows.
94 Chapter 2 Matrices
Example 10 demonstrates the use of this procedure to find the least squares
regression line for the set of points from Example 9.
Find the least squares regression line for the points 共1, 1兲, 共2, 2兲, 共3, 4兲, 共4, 4兲,
and 共5, 6兲.
SOLUTION
The matrices X and Y are
冤 冥 冤冥
1 1 1
1 2 2
X⫽ 1 3 and Y⫽ 4 .
1 4 4
1 5 6
This means that
冤 冥
1 1
1 2
X TX ⫽ 冤11 1
2
1
3
1
4
1
5 冥 1 3 ⫽ 冤155 冥
15
55
1 4
1 5
and
冤冥
1
2
冤1 冥 冤63冥.
1 1 1 1 1 17
X TY ⫽ 4 ⫽
2 3 4 5
y 4
6 (5, 6) 6
冤 冥
0 1 0
冤 冥
2 2
5 ⫺5 neither brand. During any month, a Brand A user has
1. 3 7 2. 0 0 1
a 20% probability of switching to Brand B and a
5 5 1 0 0
5% probability of not using either brand. A Brand B
冤 冥 冤 冥
0.3 0.1 0.8 0.3 0.16 0.25 user has a 15% probability of switching to Brand A and
3. 0.5 0.2 0.1 4. 0.3 0.6 0.25 a 10% probability of not using either brand. A nonuser
0.2 0.7 0.1 0.3 0.16 0.5 has a 10% probability of purchasing Brand A and a 15%
probability of purchasing Brand B. How many people
5. Purchase of a Product The market research will be in each group (a) in 1 month, (b) in 2 months,
department at a manufacturing plant determines that and (c) in 3 months?
20% of the people who purchase the plant’s product 10. For the matrix of transition probabilities
during any month will not purchase it the next month.
冤 冥
0.6 0.1 0.1
On the other hand, 30% of the people who do not
purchase the product during any month will purchase P ⫽ 0.2 0.7 0.1
it the next month. In a population of 1000 people, 0.2 0.2 0.8
100 people purchased the product this month. How find P 2X and P 3X for the state matrix
many will purchase the product (a) next month and
冤 冥
100
(b) in 2 months?
X ⫽ 100 .
6. Spread of a Virus A medical researcher is studying 800
the spread of a virus in a population of 1000 laboratory
mice. During any week, there is an 80% probability that Then find the steady state matrix for P.
an infected mouse will overcome the virus, and during Encoding a Message In Exercises 11–14, write the
the same week there is a 10% probability that a uncoded row matrices of the indicated size for the given
noninfected mouse will become infected. One hundred message. Then encode the message using the matrix A.
mice are currently infected with the virus. How many
will be infected (a) next week and (b) in 2 weeks? 11. Message: SELL CONSOLIDATED
7. Smokers and Nonsmokers A population of 10,000 Row Matrix Size: 1 ⫻ 3
1 ⫺1
冤 冥
is grouped as follows: 5000 nonsmokers, 2500 smokers 0
of one pack or less per day, and 2500 smokers of more Encoding Matrix: A ⫽ 1 0 ⫺1
than one pack per day. During any month, there is ⫺6 2 3
a 5% probability that a nonsmoker will begin smoking
12. Message: PLEASE SEND MONEY
a pack or less per day, and a 2% probability that
a nonsmoker will begin smoking more than a pack per Row Matrix Size: 1 ⫻ 3
冤 冥
day. For smokers who smoke a pack or less per day, there 4 2 1
is a 10% probability of quitting and a 10% probability of Encoding Matrix: A ⫽ ⫺3 ⫺3 ⫺1
increasing to more than a pack per day. For smokers 3 2 1
who smoke more than a pack per day, there is a
13. Message: COME HOME SOON
5% probability of quitting and a 10% probability of
dropping to a pack or less per day. How many people Row Matrix Size: 1 ⫻ 2
冤3 冥
will be in each group (a) in 1 month and (b) in 2 months? 1 2
Encoding Matrix: A ⫽
8. Television Watching A college dormitory houses 5
200 students. Those who watch an hour or more of 14. Message: HELP IS COMING
television on any day always watch for less than an hour
Row Matrix Size: 1 ⫻ 4
the next day. One-fourth of those who watch television
⫺2 ⫺1 ⫺1
冤 冥
for less than an hour one day will watch an hour or more 3
the next day. Half of the students watched television for ⫺1 1 1 1
Encoding Matrix: A ⫽
an hour or more today. How many will watch television ⫺1 ⫺1 1 2
for an hour or more (a) tomorrow, (b) in 2 days, and 3 1 ⫺2 ⫺4
(c) in 30 days?
96 Chapter 2 Matrices
Decoding a Message In Exercises 15 – 18, use A ⴚ1 to (a) You know that 关45 ⫺35兴 A⫺1 ⫽ 关10 15兴 and
decode the cryptogram. 关38 ⫺30兴 A⫺1 ⫽ 关8 14兴. Write and solve two
systems of equations to find w, x, y, and z.
冤3 冥
1 2
15. A ⫽ ,
5 (b) Decode the message.
11 21 64 112 25 50 29 53 23 46 40 75 55 92 23. Industrial System A system composed of two
industries, coal and steel, has the following input
冤3 冥
2 3
16. A ⫽ , requirements.
4
(a) To produce $1.00 worth of output, the coal industry
85 120 6 8 10 15 84 117 42 56 90 125 60 80 requires $0.10 of its own product and $0.80 of steel.
30 45 19 26
(b) To produce $1.00 worth of output, the steel industry
冤 冥
1 2 2 requires $0.10 of its own product and $0.20 of coal.
17. A ⫽ 3 7 9 , Find D, the input-output matrix for this system. Then
⫺1 ⫺4 ⫺7 solve for the output matrix X in the equation
13 19 10 ⫺1 ⫺33 ⫺77 3 ⫺2 ⫺14 4 1 ⫺9 ⫺5 X ⫽ DX ⫹ E, where E is the external demand matrix
⫺25 ⫺47 4 1 ⫺9
冤20,000冥.
10,000
E⫽
⫺4
冤 冥
3 2
18. A ⫽ 0 2 1 , 24. Industrial System An industrial system has two
4 ⫺5 3 industries with the following input requirements.
112 ⫺140 83 19 ⫺25 13 72 ⫺76 61 95 ⫺118 71 (a) To produce $1.00 worth of output, Industry A
20 21 38 35 ⫺23 36 42 ⫺48 32 requires $0.30 of its own product and $0.40 of
Industry B’s product.
19. Decoding a Message The following cryptogram
(b) To produce $1.00 worth of output, Industry B
was encoded with a 2 ⫻ 2 matrix.
requires $0.20 of its own product and $0.40 of
8 21 ⫺15 ⫺10 ⫺13 ⫺13 5 10 5 25 5 19 ⫺1 6 Industry A’s product.
20 40 ⫺18 ⫺18 1 16 Find D, the input-output matrix for this system. Then
The last word of the message is __RON. What is the solve for the output matrix X in the equation
message? X ⫽ DX ⫹ E, where E is the external demand matrix
冤20,000冥.
20. Decoding a Message The following cryptogram 10,000
was encoded with a 2 ⫻ 2 matrix. E⫽
5 2 25 11 ⫺2 ⫺7 ⫺15 ⫺15 32 14 ⫺8 ⫺13 38 25. Solving for the Output Matrix A small community
19 ⫺19 ⫺19 37 16 includes a farmer, a baker, and a grocer and has the
The last word of the message is __SUE. What is the following input-output matrix D and external demand
message? matrix E.
21. Decoding a Message Use a software program or Farmer Baker Grocer
a graphing utility with matrix capabilities to decode
冤 冥 冤 冥
0.4 0.5 0.5 Farmer 1000
the cryptogram. D ⫽ 0.3 0.0 0.3 Baker and E ⫽ 1000
冤 冥
1 0 2 0.2 0.2 0.0 Grocer 1000
A ⫽ 2 ⫺1 1
Solve for the output matrix X in the equation
0 1 2 X ⫽ DX ⫹ E.
38 ⫺14 29 56 ⫺15 62 17 3 38 18 20 76 18 ⫺5 26. Solving for the Output Matrix An industrial system
21 29 ⫺7 32 32 9 77 36 ⫺8 48 33 ⫺5 51 41 with three industries has the following input-output
3 79 12 1 26 58 ⫺22 49 63 ⫺19 69 28 8 67 31 matrix D and external demand matrix E.
⫺11 27 41 ⫺18 28
冤 冥 冤 冥
0.2 0.4 0.4 5000
22. Decoding a Message A code breaker intercepted
D ⫽ 0.4 0.2 0.2 and E ⫽ 2000
the following encoded message.
0.0 0.2 0.2 8000
45 ⫺35 38 ⫺30 18 ⫺18 35 ⫺30 81 ⫺60 42
Solve for the output matrix X in the equation
⫺28 75 ⫺55 2 ⫺2 22 ⫺21 15 ⫺10
X ⫽ DX ⫹ E.
Let the inverse of the encoding matrix be
A⫺1 ⫽ 冤wy x
z
. 冥
2.5 Exercises 97
Least Squares Regression Analysis In Exercises 41. Motor Vehicle Registration The table shows the
27–30, (a) sketch the line that appears to be the best fit numbers y of motor vehicle registrations (in millions) in
for the given points, (b) find the least squares regression the United States from 2004 through 2008. (Source:
line, and (c) calculate the sum of squared error. U.S. Federal Highway Administration)
27. y 28. y
4
Year 2004 2005 2006 2007 2008
4
(2, 3) 3
(3, 2) Number, y 237.2 241.2 244.2 247.3 248.2
3
2
(−1, 1)
2 (1, 1) (a) Find the least squares regression line for the data.
x
(− 2, 0)
1
(0, 1) (− 3, 0) −1 1 2 3 Let t represent the year, with t ⫽ 4 corresponding
x to 2004.
−2 −1 1 2 −2
(b) Use the linear regression capabilities of a graphing
29. y 30. y utility to find a linear model for the data. Let t
4
(0, 4) 4 (5, 2) represent the year, with t ⫽ 4 corresponding to 2004.
3 (4, 2) (6, 2) 42. Wildlife A wildlife management team studied the
3 (3, 1)
(1, 3) 2 reproduction rates of deer in three tracts of a wildlife
2 (1, 0)
1 (4, 1) preserve. The team recorded the number of females x
1 x in each tract and the percent of females y in each tract
(1, 1) (2, 0) 5 6
−1 that had offspring the following year. The table shows
x (2, 0) (3, 0)
−1 1 2 3 −2 the results.
Finding the Least Squares Regression Line In Number, x 100 120 140
Exercises 31–38, find the least squares regression line.
Percent, y 75 68 55
31. 共0, 0兲, 共1, 1兲, 共2, 4兲 32. 共1, 0兲, 共3, 3兲, 共5, 6兲
33. 共⫺2, 0兲, 共⫺1, 1兲, 共0, 1兲, 共1, 2兲 (a) Find the least squares regression line for the data.
34. 共⫺4, ⫺1兲, 共⫺2, 0兲, 共2, 4兲, 共4, 5兲 (b) Use a graphing utility to graph the model and the
35. 共⫺5, 1兲, 共1, 3兲, 共2, 3兲, 共2, 5兲 data in the same viewing window.
36. 共⫺3, 4兲, 共⫺1, 2兲, 共1, 1兲, 共3, 0兲 (c) Use the model to create a table of estimated values for
37. 共⫺5, 10兲, 共⫺1, 8兲, 共3, 6兲, 共7, 4兲, 共5, 5兲 y. Compare the estimated values with the actual data.
38. 共0, 6兲, 共4, 3兲, 共5, 0兲, 共8, ⫺4兲, 共10, ⫺5兲 (d) Use the model to estimate the percent of females
that had offspring when there were 170 females.
39. Demand A fuel refiner wants to know the demand for (e) Use the model to estimate the number of females
a grade of gasoline as a function of price. The table shows when 40% of the females had offspring.
the daily sales y (in gallons) for three different prices. 43. Use your school’s library, the Internet, or some other
reference source to derive the matrix form for linear
Price, x $3.00 $3.25 $3.50 regression given at the top of page 94.
Demand, y 4500 3750 3300
44. Explain each of the following.
(a) Find the least squares regression line for the data. (a) How to write and use a stochastic matrix
(b) Estimate the demand when the price is $3.40. (b) How to use matrix multiplication to encode and
40. Demand A hardware retailer wants to know the decode messages
demand for a rechargeable power drill as a function (c) How to use a Leontief input-output model to
of price. The table shows the monthly sales y for four analyze an economic system
different prices.
(d) How to use matrices to find the least squares
regression line for a set of data
Price, x $25 $30 $35 $40
Demand, y 82 75 67 55
45. Proof Prove that the product of two 2 ⫻ 2 stochastic
matrices is stochastic.
(a) Find the least squares regression line for the data. 46. Proof Let P be a 2 ⫻ 2 stochastic matrix. Prove that
(b) Estimate the demand when the price is $32.95. there exists a 2 ⫻ 1 state matrix X with nonnegative
entries such that PX ⫽ X.