Exercises 42–44 show how to use the condition number of a matrix Ato estimate the accuracy of a computed solution of \(Ax = b\). If the entries of Aand b are accurate to about rsignificant digits and if the condition number of Ais approximately \({\bf{1}}{{\bf{0}}^k}\) (with ka positive integer), then the computed solution of \(Ax = b\) should usually be accurate to at least \(r - k\) significant digits.

42. Find the condition number of the matrix A in Exercise 9. Construct a random vector x in \({\mathbb{R}^{\bf{4}}}\) and compute \({\bf{b}} = A{\bf{x}}\). Then use your matrix program to compute the solution \({{\bf{x}}_{\bf{1}}}\) of \(Ax = b\). To how many digits do x and \({{\bf{x}}_{\bf{1}}}\) agree? Find out the number of digits your matrix program stores accurately, and report how many digits of accuracy are lost when \({{\bf{x}}_{\bf{1}}}\) is

used in place of the exact solution x.

Short Answer

Expert verified

The solution has approximately 12 decimal places, and the calculated answer

(\({{\bf{x}}_1}\)) is accurate.

Step by step solution

01

Obtain the condition number of matrix A

Consider matrix A as shown below:

\(A = \left[ {\begin{array}{*{20}{c}}4&0&{ - 3}&{ - 7}\\{ - 6}&9&9&9\\7&{ - 5}&{10}&{19}\\{ - 1}&2&4&{ - 1}\end{array}} \right]\)

Obtain thecondition numberof matrix A using the MATLAB command shown below:

\[\begin{array}{l} > > {\rm{ A }} = {\rm{ }}\left[ {{\rm{4 0 }} - {\rm{3 }} - {\rm{7; }} - {\rm{6 9 9 9; 7 }} - {\rm{5 10 19; }} - {\rm{1 2 4 }} - {\rm{1}}} \right];\\ > > {\rm{ C}} = {\rm{cond}}\left( {\rm{A}} \right)\end{array}\]

It gives the output 23683.

Thus, thecondition number of matrix A is 23683.

By comparing with thecondition number of A, that is \({10^k}\), the condition number is approximately \({10^4}\).

02

Obtain the solution by using the MATLAB command

It is found that x and\({{\bf{x}}_1}\)agree to at least 12 or 13significant digits if it run multiple experiments with MATLAB, which properly captures 16 digits.

Obtain a random matrix by using the MATLAB command shown below:

\( > > {\bf{x}} = {\rm{rand}}\left( {4,1} \right)\)

\({\bf{x}} = \left[ {\begin{array}{*{20}{c}}{0.9501}\\{0.2131}\\{0.6068}\\{0.4860}\end{array}} \right]\)

Now, compute\({\bf{b}} = A{\bf{x}}\)by using the MATLAB command shown below:

\(\begin{array}{l} > > {\rm{ }}A{\rm{ }} = {\rm{ }}\left[ {{\rm{4 0 }} - {\rm{3 }} - {\rm{7; }} - {\rm{6 9 9 9; 7 }} - {\rm{5 10 19; }} - {\rm{1 2 4 }} - {\rm{1}}} \right]{\rm{;}}\\ > > x = \left[ {0.9501{\rm{; 0}}{\rm{.2131; 0}}{\rm{.6068; 0}}{\rm{.4860}}} \right]{\rm{;}}\\ > > b = A*x\end{array}\)

The output is \({\bf{b}} = A{\bf{x}} = \left[ {\begin{array}{*{20}{c}}{ - 3.8493}\\{5.5795}\\{20.7973}\\{.8467}\end{array}} \right]\).

03

Obtain the MATLAB solution

Compute\({{\bf{x}}_1}\)of\(A{\bf{x}} = {\bf{b}}\)by using the MATLAB command shown below:

\(\begin{array}{l} > > {\rm{ }}A{\rm{ }} = {\rm{ }}\left[ {{\rm{4 0 }} - {\rm{3 }} - {\rm{7; }} - {\rm{6 9 9 9; 7 }} - {\rm{5 10 19; }} - {\rm{1 2 4 }} - {\rm{1}}} \right]{\rm{;}}\\ > > b = \left[ { - {\rm{3}}{\rm{.8493; 5}}{\rm{.5795; 20}}{\rm{.7973; 0}}{\rm{.8467}}} \right]{\rm{;}}\\ > > {x_1} = A\backslash b\end{array}\)

The output is\({{\bf{x}}_1} = \left[ {\begin{array}{*{20}{c}}{.9501}\\{.2311}\\{.6068}\\{.4860}\end{array}} \right]\).

Obtain the difference between x and\({{\bf{x}}_1}\).

\({\bf{x}} - {{\bf{x}}_1} = \left[ {\begin{array}{*{20}{c}}{.0171}\\{.4858}\\{ - .2360}\\{.2456}\end{array}} \right] \times {10^{ - 12}}\)

Thus, the solution has approximately 12 decimal places, and the calculated answer (\({{\bf{x}}_1}\)) is accurate.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that if the columns of Bare linearly dependent, then so are the columns of AB.

In exercise 5 and 6, compute the product \(AB\) in two ways: (a) by the definition, where \(A{b_{\bf{1}}}\) and \(A{b_{\bf{2}}}\) are computed separately, and (b) by the row-column rule for computing \(AB\).

\(A = \left( {\begin{aligned}{*{20}{c}}{ - {\bf{1}}}&{\bf{2}}\\{\bf{5}}&{\bf{4}}\\{\bf{2}}&{ - {\bf{3}}}\end{aligned}} \right)\), \(B = \left( {\begin{aligned}{*{20}{c}}{\bf{3}}&{ - {\bf{2}}}\\{ - {\bf{2}}}&{\bf{1}}\end{aligned}} \right)\)

In Exercises 1–9, assume that the matrices are partitioned conformably for block multiplication. Compute the products shown in Exercises 1–4.

4. \[\left[ {\begin{array}{*{20}{c}}I&0\\{ - X}&I\end{array}} \right]\left[ {\begin{array}{*{20}{c}}A&B\\C&D\end{array}} \right]\]

2. Find the inverse of the matrix \(\left( {\begin{aligned}{*{20}{c}}{\bf{3}}&{\bf{2}}\\{\bf{7}}&{\bf{4}}\end{aligned}} \right)\).

In Exercises 1–9, assume that the matrices are partitioned conformably for block multiplication. In Exercises 5–8, find formulas for X, Y, and Zin terms of A, B, and C, and justify your calculations. In some cases, you may need to make assumptions about the size of a matrix in order to produce a formula. [Hint:Compute the product on the left, and set it equal to the right side.]

5. \[\left[ {\begin{array}{*{20}{c}}A&B\\C&{\bf{0}}\end{array}} \right]\left[ {\begin{array}{*{20}{c}}I&{\bf{0}}\\X&Y\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}{\bf{0}}&I\\Z&{\bf{0}}\end{array}} \right]\]

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free