Beruflich Dokumente
Kultur Dokumente
Contents
Chapter 4 Worksheets
Page 1
CONTENTS
Equations
Page 2
Chapter 4: Tutorial 1
Sec. 4.4
Entering matrices in Excel is easy - you simple put each entry of the matrix in each cell.
U Try It
A=
2
5
3
6
Enter another 2X3 matrix with upper leftmost entry starting in B13.
B=
Change the numbers in the matrices A and B. What happens to the sum?
Play with entering array formulas to get a feel for it.
Page 3 of 16
Exercises:Let F =
-1
2
-4
2
-1
3
3
0
3
1
1
2
and G =
2
7
4
-1
2
8
6
-5
3
8
3
-2
Find :
(1) -2F + 3G
(2) G - F
(3) (1/2)G
(4) (-1/3)F + (2/5)G
Page 4 of 16
Chapter 4: Tutorial 2
Multiplying Matrices
Sec. 4.4
In the previous worksheet, you learned how to enter matrices and add them. We will next
explore commands for multiplying matrices and use these commands for applications.
U Try It
A=
Multiplying Matrices
Let's next multiply the two matrices that you created above.
You know that the product AB is defined and its size is 2X2.
AB =
(1) Select the 2x2 region boxed on the right
(2) Enter the formula =mmult(b8:d9,b14:c16) and
press <CTRL><SHIFT><ENTER> , all at
the same time
This will multiply the 2X3 array in b8:d9 to the array
in b14:c16. You describe an array by the range of
cells it occupies.
Change the numbers in the matrices A and B. What happens to the product?
Play with entering array formulas to get a feel for it.
Use easy numbers
so you can check by hand to see that you're entering things correctly.
U Try It
Calculate the product BA. How big should you make your product array?
Page 5 of 16
Page 6 of 16
Chapter 4: Tutorial 3
Sec. 4.4
The features of Excel make it easy to create headings for tables etc.. This can make describing
matrix multiplication much more intuitive when it comes to applications.
An investment trust has investments in three states. Its deposits in each states are
divided among bonds, mortgages, and consumer loans. On January 1 the amount
(in millions of dollars) of money invested is each category by state is given by the matrix
State A
State B
State C
Bonds Mortgages
10
5
30
12
15
6
Consumer
loans
20
10
25
The average yields for bonds, mortgages and consumer loans are given by
0.07
0.09
0.15
Bonds
Mortgages
Consumer loans
We would like to determine the earnings of the trust from its investments
in each states.
Total for State A:
U Try It
Calculate the total for State A using the numbers as given above and the
formula =mmult(c14:e14,c20:c22).
State A- Total -->
The formula multiplies the first row of the first matrix (detailing investment allotment
for State A) with the yield for each type of investment
U Try It
Total - State B
Total - State C
Now, we could have the total for the three states in one step. Basically, we want
to fill in the 3X1 matrix
Procedure
Page 7 of 16
Total - State A
Total - State B
Total - State C
U Try It
Page 8 of 16
Chapter 4: Tutorial 4
Sec. 4.5
Calculating inverses of large matrices by hand can be tedious. However, using the
MINVERSE function in Excel, it is quite easy to calculate inverses. Usually, calculating
a matrix inverse will be one part of a larger problem.
On Line Help Topic:
Example: Suppose you have entered the following
array formulas
3x3 matrix
minverse
mmult
2
1
0
-1
2
1
0
0
1
To calculate its inverse, do the following:
Select the boxed region below, and enter the formula =minverse(b10:d12),
and press <CTRL><SHIFT><ENTER>.
Here, b10 is the cell reference of the upper leftmost entry and d12 is
the cell reference of the lower rightmost entry of the matrix above.
0.4
0.2
0
-0.2
0.4
0
U Check It
Problem:
0.2
-0.4
1
Multiply the two matrices above to see if you get the 3x3 identity
matrix
-1
0.3
0.8
-9
9
6
0.7
11
1
0.4
2
0.2
Problem: What happens when you try to find the inverse of the following?
Why?
Page 9 of 16
1
0
Problem: If the inverse of A is
Page 10 of 16
1
0
1
0
0
2
5
0
3
6
7
, find A.
Chapter 4: Tutorial 5
As you have learned in Section 4-6 of the text, system of linear equations can be written
in matrix form Ax=b. If the matrix A has an inverse, then the solution vector x=inv(A)*b.
Note that Excel can only solve systems where the matrix is invertible. In cases where
there are infinite solutions or no solutions, it will not work.
On Line Help Topic:
array formulas
Example: Solve the system of linear equations:
minverse
mmult
3x + 2y +z = 4
x + y -z = 1
-x + y +z = 0
Solution:
A=
2
1
1
1
-1
1
4
1
0
0.25
0
0.25
-0.125
0.5
-0.625
-0.375
0.5
0.125
0.875
0.5
0.375
Page 11 of 16
Sec. 4.6
U Check It:
U Try It:
How would you check that x is indeed the correct solution, using Excel?
Change the right hand side b, but leave A the same. What is the new
value for x? Did you need to recalculate the inverse of A?
Page 12 of 16
Chapter 4 : Project 1
In this project, you will use Excel's matrix capabilities to solve a problem using a system of
linear equations.
You are asked to allocate assets, percentage-wise, among bonds, CD's, a conservative mutual
fund, and an aggressive stock. Their average yields, and risk level are given below.
Investment Type
Risk level
Bonds
CD's
Mutual Fund
Aggressive stock
0.8
0
1.2
2
Average Yield
5.40%
4.80%
7.60%
9.60%
You must follow certain stipulations. You must invest 20% of your assets in CD's and bonds
combined. The total risk level must equal 1.4. You would like to receive a total yield of 8%.
How should you divide up your assets, percentage-wise, so that all these conditions are met?
Note: The risk level for each investment is weighted by the percentage allocated to it. E.g.,
if 20% of your assets is in stocks, then the risk level associated with it is (.20)*(2) = 0.4.
Similarly, the yield level for each investment is also weighted by the percentage allocated to it.
(1) What are the unknown variables associated with this problem?
(Insert more rows as necessary)
(2) Write the system of linear equations associated with this problem
(3) In the boxed area, type in the 4X4 coefficient matrix associated with this problem. In the
boxed area to its right, type in the right hand side.
Matrix
Page 13 of 16
To find the solution, select the boxed region below for the solution, and enter the
formula for multiplying the inverse matrix by the right hand side. See the worksheet
on matrix multiplication for reference.
Solution
% bonds
% CD's
% mutual funds
% aggressive stock
(5) Write a couple of sentences describing your solution. Also, convince your reader that it
meets all the conditions set forth.
(Insert more rows as necessary)
(6) Copy the coefficient matrix and the right hand side from (3). Try different values for the total
risk level - e.g. 1.6, 1.2 etc. What kind of solutions do you get? Are they realistic?
Why or why not?
Page 14 of 16
Chapter 4 : Project 2
In this project, you will use Excel's matrix handling capabilities to study an open Leontief Model.
A conglomerate has four divisions, which produce computers, office furniture, business forms,
and telephone equipment. For each $1 of output, the computer division needs $0.2 of computers,
$0.1 of office furniture, $0.075 of business forms, and $0.3 of telephone equipment. For each $1 of
output, the office furniture division requires $0.35 of computers,
$0.1 of office furniture, $0.2 of business forms, and $0.3 of telephone equipment. For each $1 of
output, the business forms division requires $0.15 of computers,
$0.3 of office furniture, $0.2 of business forms, and $0.2 of telephone equipment. For each $1 of
output, the telephone equipment division requires $0.25 of computers,
$0.2 of office furniture, $0.1 of business forms, and $0.35 of telephone equipment.
The conglomerate estimates the sales demand to be $5,000,000 for the computer division,
$2,000,000 for the office furniture division, $1,000,000 for the business forms division,
$7,000,000 for the telephone equipment division.
At what level should each division produce in order to satisfy this demand?
(1) Form the input-output matrix for this problem:
Computer Furniture
Computer
Furniture
Forms
Telephone
Forms
Telephone
(2) Form the final demand matrix D. Let the numbers in D stand for millions of dollars.
D=
(4) Form the matrix (I-A). See the worksheet on adding matrices for reference.
Page 15 of 16
I-A=
inv(I-A)=
To find the solution, select the boxed region below for the solution, and enter the
formula for multiplying the inverse matrix by the demand matrix D. See the worksheet
on matrix multiplication for reference.
Solution
X=
Page 16 of 16