Linear Algebra

MA 237 Chapter 3 Homework Solutions

Richard Hitt

Homework Exercises

Here are the four On Line exercises from section 3.4 in the text translated in Mathematica.

Exercise 1

Let A be the matrix from exercise 2a on page 177.  Use  LinearSolve to solve the system A.X=B where

[Graphics:Images/chapter3sol_gr_1.gif]
[Graphics:Images/chapter3sol_gr_2.gif]
Solution
[Graphics:Images/chapter3sol_gr_3.gif]
[Graphics:Images/chapter3sol_gr_4.gif]
[Graphics:Images/chapter3sol_gr_5.gif]
[Graphics:Images/chapter3sol_gr_6.gif]

If you want to check the solution, you can do

[Graphics:Images/chapter3sol_gr_7.gif]
[Graphics:Images/chapter3sol_gr_8.gif]

Exercise 2

Read the exercise in the text on page 182 and solve it in Mathematica.

[Graphics:Images/chapter3sol_gr_9.gif]
[Graphics:Images/chapter3sol_gr_10.gif]
[Graphics:Images/chapter3sol_gr_11.gif]
[Graphics:Images/chapter3sol_gr_12.gif]
[Graphics:Images/chapter3sol_gr_13.gif]
[Graphics:Images/chapter3sol_gr_14.gif]

So the first component has the largest error.  To see why, note that the Errorvector can be obtained algebraically by

[Graphics:Images/chapter3sol_gr_15.gif]
[Graphics:Images/chapter3sol_gr_16.gif]

So if we look at the inverse of A

[Graphics:Images/chapter3sol_gr_17.gif]
[Graphics:Images/chapter3sol_gr_18.gif]

and B2-B

[Graphics:Images/chapter3sol_gr_19.gif]
[Graphics:Images/chapter3sol_gr_20.gif]

we see that the only entries in Inverse[A] the affect the outcome of the multiplication are those in the second column.  Since the largest of those is in the first row, the first component in the result is changed the most.

[Graphics:Images/chapter3sol_gr_21.gif]
[Graphics:Images/chapter3sol_gr_22.gif]

In order to see how accurately the values of B must be measured to ensure that the computed values of X are all within 0.001 of the correct values, we can view the problem geometrically.  Look at the cube centered at the origin with edge lengths that extend plus or minus 0.001 units from 0.

[Graphics:Images/chapter3sol_gr_23.gif]

[Graphics:Images/chapter3sol_gr_24.gif]

[Graphics:Images/chapter3sol_gr_25.gif]

We want to know what shape in 3-space lands on this cube under the matrix transformation Inverse[A].  We can find that shape simply by applying A to the vertices of this cube.

[Graphics:Images/chapter3sol_gr_26.gif]

[Graphics:Images/chapter3sol_gr_27.gif]

[Graphics:Images/chapter3sol_gr_28.gif]

This shape represents all the points in 3-space for the B2 vector that get mapped under Inverse[A] to a vector with all coordinates within 0.001 of 0.  So we can just look at

[Graphics:Images/chapter3sol_gr_29.gif]
[Graphics:Images/chapter3sol_gr_30.gif]

to see that the measured values of the components of B must be accurate to within 0.002 in the first coordinate, 0.006 in the second, and 0.011 in the third.

Exercise 3

Again, read the problem and solve in Mathematica.  Be sure to enter the matrix using fractions rather than decimals to maintain the exactness in the calculations.

Solution
[Graphics:Images/chapter3sol_gr_31.gif]
[Graphics:Images/chapter3sol_gr_32.gif]
[Graphics:Images/chapter3sol_gr_33.gif]
[Graphics:Images/chapter3sol_gr_34.gif]
[Graphics:Images/chapter3sol_gr_35.gif]
[Graphics:Images/chapter3sol_gr_36.gif]

We can obtain solutions with either LinearSolve or using Inverse[A]

[Graphics:Images/chapter3sol_gr_37.gif]
[Graphics:Images/chapter3sol_gr_38.gif]
[Graphics:Images/chapter3sol_gr_39.gif]
[Graphics:Images/chapter3sol_gr_40.gif]
[Graphics:Images/chapter3sol_gr_41.gif]
[Graphics:Images/chapter3sol_gr_42.gif]

We can calculate the percent error of X compared to X2.

[Graphics:Images/chapter3sol_gr_43.gif]
[Graphics:Images/chapter3sol_gr_44.gif]
[Graphics:Images/chapter3sol_gr_45.gif]

Note that the largest percent error occurs in the first entry while the largest numerical error occurs in the second entry.  If we look at Inverse[A] we can see why the errors are so large.

[Graphics:Images/chapter3sol_gr_46.gif]
[Graphics:Images/chapter3sol_gr_47.gif]

The entries in Inverse[A] are large numbers, so any deviation in the B2 vector gets commensurately magnified.  That effect is compounded by the fact that the errors in measurement on B2 are oppositely signed on the second entry exploiting the sign changes along the three rows of Inverse[A].

In order to see how accurately the values of B must be measured to ensure that the computed values of X are all within 0.001 of the correct values, we can view the problem geometrically.  Look at the cube centered at the origin with edge lengths that extend plus or minus 0.001 units from 0.

[Graphics:Images/chapter3sol_gr_48.gif]

[Graphics:Images/chapter3sol_gr_49.gif]

[Graphics:Images/chapter3sol_gr_50.gif]

We want to know what shape in 3-space lands on this cube under the matrix transformation Inverse[A].  We can find that shape simply by applying A to the vertices of this cube.

[Graphics:Images/chapter3sol_gr_51.gif]

[Graphics:Images/chapter3sol_gr_52.gif]

[Graphics:Images/chapter3sol_gr_53.gif]

This shape represents all the points in 3-space for the B2 vector that get mapped under Inverse[A] to a vector with all coordinates within 0.001 of 0.  So we can just look at

[Graphics:Images/chapter3sol_gr_54.gif]
[Graphics:Images/chapter3sol_gr_55.gif]

to see that the measured values of the components of B must be accurate to within 0.0018 in the first coordinate, 0.00108 in the second, and 0.00078 in the third.

Exercise 4

In this problem, you may find it useful to measure the magnitude of a vector (also called the norm).  You can build a function for doing this.

[Graphics:Images/chapter3sol_gr_56.gif]

Now you can work the problem.

Solution part (a)

From Exercise 2, we have

[Graphics:Images/chapter3sol_gr_57.gif]
[Graphics:Images/chapter3sol_gr_58.gif]
[Graphics:Images/chapter3sol_gr_59.gif]
[Graphics:Images/chapter3sol_gr_60.gif]
[Graphics:Images/chapter3sol_gr_61.gif]
[Graphics:Images/chapter3sol_gr_62.gif]
[Graphics:Images/chapter3sol_gr_63.gif]
[Graphics:Images/chapter3sol_gr_64.gif]
[Graphics:Images/chapter3sol_gr_65.gif]
[Graphics:Images/chapter3sol_gr_66.gif]
[Graphics:Images/chapter3sol_gr_67.gif]
[Graphics:Images/chapter3sol_gr_68.gif]

This shows that the percent error got magnified between the measured values of B and the computed values of X.  We would like this number to be small if we want to maintain the accuracy of the B measurement.

Solution to part (b)

From exercise 3, we have

[Graphics:Images/chapter3sol_gr_69.gif]
[Graphics:Images/chapter3sol_gr_70.gif]
[Graphics:Images/chapter3sol_gr_71.gif]
[Graphics:Images/chapter3sol_gr_72.gif]
[Graphics:Images/chapter3sol_gr_73.gif]
[Graphics:Images/chapter3sol_gr_74.gif]
[Graphics:Images/chapter3sol_gr_75.gif]
[Graphics:Images/chapter3sol_gr_76.gif]
[Graphics:Images/chapter3sol_gr_77.gif]
[Graphics:Images/chapter3sol_gr_78.gif]
Solution to part (c)

The conditioning number of a square matrix A can be defined as

[Graphics:Images/chapter3sol_gr_79.gif]

For the matrix in exercise 2, we have

[Graphics:Images/chapter3sol_gr_80.gif]
[Graphics:Images/chapter3sol_gr_81.gif]

From exercise 3, we have

[Graphics:Images/chapter3sol_gr_82.gif]
[Graphics:Images/chapter3sol_gr_83.gif]


Converted by Mathematica      November 7, 2001