Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

(M) Use the method in this section to produce a \(QR\) factorization of the matrix in Exercise 24.

Short Answer

Expert verified

The required factorization is, \(\left( {\begin{aligned}{{}{r}}{ - 10}&{13}&7&{ - 11}\\2&1&{ - 5}&3\\{ - 6}&3&{13}&{ - 3}\\{16}&{ - 16}&{ - 2}&5\\2&1&{ - 5}&{ - 7}\end{aligned}} \right) = \left( {\begin{aligned}{{}{r}}{\frac{1}{2}}&{\frac{1}{2}}&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{1}{{10}}}&{\frac{1}{2}}&0&{\frac{1}{{\sqrt 2 }}}\\{\frac{{ - 3}}{{10}}}&{ - \frac{1}{2}}&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{4}{5}}&0&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{1}{{10}}}&{\frac{1}{2}}&0&{\frac{1}{{\sqrt 2 }}}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}{20}&{ - 20}&{ - 10}&{10}\\0&6&{ - 8}&{ - 6}\\0&0&{6\sqrt 3 }&{ - 3\sqrt 3 }\\0&0&0&{5\sqrt 2 }\end{aligned}} \right)\).

Step by step solution

01

\(QR\) factorization of a Matrix

A matrix with order \(m \times n\) can be written as the multiplication of an upper triangular matrix \(R\) and a matrix \(Q\) which is formed by applying the Gram–Schmidt orthogonalization processto the \({\rm{col}}\left( A \right)\).

The matrix \(R\) can be found by the formula \({Q^T}A = R\).

02

Finding the matrix \(R\)

Given that, \(A = \left( {\begin{aligned}{{}{r}}{ - 10}&{13}&7&{ - 11}\\2&1&{ - 5}&3\\{ - 6}&3&{13}&{ - 3}\\{16}&{ - 16}&{ - 2}&5\\2&1&{ - 5}&{ - 7}\end{aligned}} \right)\).

Hence, enter matrix A in MATLAB.

>> A=(-10 13 7 -11; 2 1 5 3; -6 3 13 -3; 16 -16 -2 5; 2 1 -5 -7);

The required function:

function (B) = GramSchmidt_N(A)

(m,n) = size(A);

(U, jb) = rref(A);

x = length(jb);

B = zeros(m,x);

for i = 1:x

C(:,i)= A(:,(jb(i)));

end

B=C;

for i = 2:x

for j = 1:i-1

B(:,i) = B(:,i) - dot(C(:,i),B(:,j))/dot(B(:,j),B(:,j))* B(:,j)

end

end

for i=1:size(B,2)

TMP=B(:,i);

TMP=TMP./(sqrt(sum(TMP.^2)));

B(:,i)=TMP;

end

end

Find the Normalised orthogonal basis:

(B) = GramSchmidt_N(A)

\(\begin{aligned}{}B = \\\begin{aligned}{{}{r}}{ - 0.5000}&{0.5000}&{0.5774}&0\\{0.1000}&{0.5000}&0&{0.7071}\\{ - 0.3000}&{ - 0.5000}&{0.5774}&0\\{0.8000}&0&{0.5774}&0\\{0.1000}&{0.5000}&0&{ - 0.7071}\end{aligned}\end{aligned}\)

Therefore, the orthogonal matrix \(Q\) is\(Q = \left( {\begin{aligned}{{}{r}}{\frac{1}{2}}&{\frac{1}{2}}&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{1}{{10}}}&{\frac{1}{2}}&0&{\frac{1}{{\sqrt 2 }}}\\{\frac{{ - 3}}{{10}}}&{ - \frac{1}{2}}&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{4}{5}}&0&{\frac{1}{{\sqrt 3 }}}&0\\{\frac{1}{{10}}}&{\frac{1}{2}}&0&{\frac{1}{{\sqrt 2 }}}\end{aligned}} \right)\).

Find the matrix \(R\) using the following formula:

\(R = {Q^T}A\)

R=Q'*A

\(\begin{aligned}{}R = \\\begin{aligned}{{}{}}{20.0000}&{ - 20.0000}&{ - 10.0000}&{10.0000}\\0&{6.00000}&{ - 8.0000}&{ - 6.0000}\\0&0&{10.3923}&{ - 5.1962}\\0&0&0&{7.0711}\end{aligned}\end{aligned}\)

Hence, the matrix is\(R = \left( {\begin{aligned}{{}{}}{20}&{ - 20}&{ - 10}&{10}\\0&6&{ - 8}&{ - 6}\\0&0&{6\sqrt 3 }&{ - 3\sqrt 3 }\\0&0&0&{5\sqrt 2 }\end{aligned}} \right)\).

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

Compute the quantities in Exercises 1-8 using the vectors

\({\mathop{\rm u}\nolimits} = \left( {\begin{aligned}{*{20}{c}}{ - 1}\\2\end{aligned}} \right),{\rm{ }}{\mathop{\rm v}\nolimits} = \left( {\begin{aligned}{*{20}{c}}4\\6\end{aligned}} \right),{\rm{ }}{\mathop{\rm w}\nolimits} = \left( {\begin{aligned}{*{20}{c}}3\\{ - 1}\\{ - 5}\end{aligned}} \right),{\rm{ }}{\mathop{\rm x}\nolimits} = \left( {\begin{aligned}{*{20}{c}}6\\{ - 2}\\3\end{aligned}} \right)\)

5. \(\left( {\frac{{{\mathop{\rm u}\nolimits} \cdot {\mathop{\rm v}\nolimits} }}{{{\mathop{\rm v}\nolimits} \cdot {\mathop{\rm v}\nolimits} }}} \right){\mathop{\rm v}\nolimits} \)

Compute the least-squares error associated with the least square solution found in Exercise 4.

In Exercises 9-12 find (a) the orthogonal projection of b onto \({\bf{Col}}A\) and (b) a least-squares solution of \(A{\bf{x}} = {\bf{b}}\).

12. \(A = \left[ {\begin{array}{{}{}}{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{0}}&{ - {\bf{1}}}\\{\bf{0}}&{\bf{1}}&{\bf{1}}\\{ - {\bf{1}}}&{\bf{1}}&{ - {\bf{1}}}\end{array}} \right]\), \({\bf{b}} = \left( {\begin{array}{{}{}}{\bf{2}}\\{\bf{5}}\\{\bf{6}}\\{\bf{6}}\end{array}} \right)\)

Determine which pairs of vectors in Exercises 15-18 are orthogonal.

15. \({\mathop{\rm a}\nolimits} = \left( {\begin{aligned}{*{20}{c}}8\\{ - 5}\end{aligned}} \right),{\rm{ }}{\mathop{\rm b}\nolimits} = \left( {\begin{aligned}{*{20}{c}}{ - 2}\\{ - 3}\end{aligned}} \right)\)

In Exercises 1-4, find a least-sqaures solution of \(A{\bf{x}} = {\bf{b}}\) by (a) constructing a normal equations for \({\bf{\hat x}}\) and (b) solving for \({\bf{\hat x}}\).

4. \(A = \left( {\begin{aligned}{{}{}}{\bf{1}}&{\bf{3}}\\{\bf{1}}&{ - {\bf{1}}}\\{\bf{1}}&{\bf{1}}\end{aligned}} \right)\), \({\bf{b}} = \left( {\begin{aligned}{{}{}}{\bf{5}}\\{\bf{1}}\\{\bf{0}}\end{aligned}} \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