Sie sind auf Seite 1von 16

CONTENTS

Contents

Chapter 4 Worksheets

Click on the corresponding button on left

Entering and Adding Matrices


Multiplying Matrices
Applications of Matrix Multiplication
Matrix Inverses in Excel
Solving Matrix Equations in Excel
Application of Linear System of Equations
An Open Leontief Model

Page 1

CONTENTS

Equations

Page 2

Chapter 4: Tutorial 1

Entering and Adding Matrices

Sec. 4.4

Entering matrices in Excel is easy - you simple put each entry of the matrix in each cell.
U Try It
A=

Enter a 2X3 matrix with upper leftmost entry starting in B7.


1
4

2
5

3
6

Enter another 2X3 matrix with upper leftmost entry starting in B13.
B=

Adding two matrices:


Let's next add the next two matrices you created above. From class, you know that the
sum of two 2X3 matrices will be another 2X3 matrix.
A+B=
(1) Select the 2x3 region boxed on the right
(2) Enter the formula =b7:d8+b13:d14 and
press <CTRL><SHIFT><ENTER> , all at
the same time
This will add the 2X3 array in b7:d8 to the array
in b13:d14. You describe an array by the range of
cells it occupies.

On Line Help Topic:


array formulas

You must hit <CTRL><SHIFT><ENTER>


to enter the array formula. Remember it as follows:
Instead of hitting <ENTER> as you would normally do
with a regular formula, hit <CTRL><SHIFT><ENTER>
U Try It

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.

Example: Next, let's compute 2A-3B.


2A-3B=
(1) Select the 2x3 region boxed on the right
(2) Enter the formula =2*(b7:d8)-3*(b13:d14)
and press <CTRL><SHIFT><ENTER> , all at the same time.

Page 3 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

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

Also, try out your textbook exercises for adding matrices.

Page 4 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

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

Enter a 2X3 matrix with upper leftmost entry starting in B8.

A=

Enter a 3X2 matrix with upper leftmost entry starting in B14.


B=

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.

On Line Help Topic:


array formulas
mmult

You must hit <CTRL><SHIFT><ENTER>


to enter the array formula. Remember it as follows:
Instead of hitting <ENTER> as you would normally do
with a regular formula, hit <CTRL><SHIFT><ENTER>
U Try It

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

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Try some of your homework exercises on the worksheet!

Page 6 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Chapter 4: Tutorial 3

Applications of Matrix Multiplication

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:

(amt. in bonds)*(bond yield) + (amt. in mort)*(mort. yield)


+ (amt. in loans)*(loans yield)
which is (10)(.07) + (5)(.09) + (20)(.15)

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

Do the same as above for States B and C.

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

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Total - State A
Total - State B
Total - State C

U Try It

(1) Select d45:d47


(2) enter the
formula = mmult(c14:e16,c20:c22)
(3) Press <CTRL><SHIFT><ENTER>
all at the same time

So this amounts to multiplying the first matrix by the second one.


Change the numbers in the matrices above. How do the results change? Check by
hand so that you understand how this application works.

Try other examples and homework problems using matrix multiplication.


Make descriptive headings for your tables and justify your calculations.

Page 8 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Chapter 4: Tutorial 4

Matrix Inverses in Excel

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

Compute the inverse of


0.2
1
4
1

-1
0.3
0.8
-9

9
6
0.7
11

1
0.4
2
0.2

Problem: Try #'s 47-49 and #51-54 in Sec. 4.5.

Problem: What happens when you try to find the inverse of the following?
Why?

Page 9 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

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.

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Chapter 4: Tutorial 5

Solving Matrix Equations in Excel

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:

The matrix A associated with this system of equations is:


3
1
-1

A=

2
1
1

1
-1
1

The right hand side vector b is:


b=

4
1
0

The solution is given by multiplying the inverse of A by b. Let us first


calculate the inverse of A:
inv(A) =

0.25
0
0.25

-0.125
0.5
-0.625

-0.375
0.5
0.125

(The method to do this is described in the previous tutorial.)


To get x, we use the MMULT function to multiply inv(A) by b:
x=

0.875
0.5
0.375

Page 11 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

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?

Problems: Try #'s 39-42 in Sec. 4-6.

Page 12 of 16

Also use Excel to check problems done by hand.

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Chapter 4 : Project 1

Application of Linear Systems of Equations

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

On Line Help Topic:


array formulas
mmult
minverse

(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

Right hand side

(c) 1998 Prentice Hall, Upper Saddle River, NJ

(4) Solve the system of equations by using matrix inverses.


Select the boxed region below, and enter the formula =minverse(corner1:corner2),
and press <CTRL><SHIFT><ENTER>.
Here, corner1 is the cell reference of the upper leftmost entry and corner2 is
the cell reference of the lower rightmost entry of the matrix above.
Matrix inverse

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

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Chapter 4 : Project 2

An Open Leontief Model

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

On Line Help Topic:


array formulas
mmult
minverse

(2) Form the final demand matrix D. Let the numbers in D stand for millions of dollars.

D=

(3) Form the 4X4 identity matrix I:

(4) Form the matrix (I-A). See the worksheet on adding matrices for reference.

Page 15 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

I-A=

(5) Find the matrix inverse of I-A:


Select the boxed region below, and enter the formula =minverse(corner1:corner2),
and press <CTRL><SHIFT><ENTER>.
Here, corner1 is the cell reference of the upper leftmost entry and corner2 is
the cell reference of the lower rightmost entry of the matrix above.

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=

(6) Write a couple of sentences interpreting your solution.


(7) Suppose that the telephone equipment division needs $0.3 of office furniture instead. How
does this affect the solution? You can copy the entire worksheet to another worksheet, and
the solution will be automatically recalculated if you change just the one entry.

Page 16 of 16

(c) 1998 Prentice Hall, Upper Saddle River, NJ

Das könnte Ihnen auch gefallen