(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

A certain experiment produces the data \(\left( {1,1.8} \right),\left( {2,2.7} \right),\left( {3,3.4} \right),\left( {4,3.8} \right),\left( {5,3.9} \right)\). Describe the model that produces a least-squares fit of these points by a function of the form

\(y = {\beta _1}x + {\beta _2}{x^2}\)

Such a function might arise, for example, as the revenue from the sale of \(x\) units of a product, when the amount offered for sale affects the price to be set for the product.

a. Give the design matrix, the observation vector, and the unknown parameter vector.

b. Find the associated least-squares curve for the data.

Given data for a least-squares problem, \(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\), the following abbreviations are helpful:

\(\begin{aligned}{l}\sum x = \sum\nolimits_{i = 1}^n {{x_i}} ,{\rm{ }}\sum {{x^2}} = \sum\nolimits_{i = 1}^n {x_i^2} ,\\\sum y = \sum\nolimits_{i = 1}^n {{y_i}} ,{\rm{ }}\sum {xy} = \sum\nolimits_{i = 1}^n {{x_i}{y_i}} \end{aligned}\)

The normal equations for a least-squares line \(y = {\hat \beta _0} + {\hat \beta _1}x\)may be written in the form

\(\begin{aligned}{{\hat \beta }_0} + {{\hat \beta }_1}\sum x = \sum y \\{{\hat \beta }_0}\sum x + {{\hat \beta }_1}\sum {{x^2}} = \sum {xy} {\rm{ (7)}}\end{aligned}\)

16. Use a matrix inverse to solve the system of equations in (7) and thereby obtain formulas for \({\hat \beta _0}\) , and that appear in many statistics texts.

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 7–10, let\[W\]be the subspace spanned by the\[{\bf{u}}\]’s, and write y as the sum of a vector in\[W\]and a vector orthogonal to\[W\].

10.\[y = \left[ {\begin{aligned}3\\4\\5\\6\end{aligned}} \right]\],\[{{\bf{u}}_1} = \left[ {\begin{aligned}1\\1\\0\\{ - 1}\end{aligned}} \right]\],\[{{\bf{u}}_2} = \left[ {\begin{aligned}1\\0\\1\\1\end{aligned}} \right]\],\[{{\bf{u}}_3} = \left[ {\begin{aligned}0\\{ - 1}\\1\\{ - 1}\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}}\).

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