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)\)

Short Answer

Expert verified

(a) The orthogonal projection of b onto Col A is \(\left[ {\begin{array}{{}{}}5\\2\\3\\6\end{array}} \right]\).

(b) The least-square solution is \(\left[ {\begin{array}{{}{}}{\frac{1}{3}}\\{\frac{{14}}{3}}\\{ - \frac{5}{3}}\end{array}} \right]\).

Step by step solution

01

Find the orthogonal projection of \({\bf{\hat b}}\)

The orthogonal projection of b onto \({\rm{Col}}A\) is:

\(\begin{aligned}{}{\bf{\hat b}} &= {\rm{pro}}{{\rm{j}}_{{\rm{col}}A}}{\bf{b}}\\ &= \frac{{{\bf{b}} \cdot {{\bf{v}}_1}}}{{{{\bf{v}}_1} \cdot {{\bf{v}}_1}}}{{\bf{v}}_1} + \frac{{{\bf{b}} \cdot {{\bf{v}}_2}}}{{{{\bf{v}}_2} \cdot {{\bf{v}}_2}}}{{\bf{v}}_2} + \frac{{{\bf{b}} \cdot {{\bf{v}}_3}}}{{{{\bf{v}}_3} \cdot {{\bf{v}}_3}}}{{\bf{v}}_3}\\ &= \frac{{\left( {\begin{aligned}{{}{}}2&5&6&6\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1\\1\\0\\{ - 1}\end{aligned}} \right)}}{{\left( {\begin{aligned}{{}{}}1&1&0&{ - 1}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1\\1\\0\\{ - 1}\end{aligned}} \right)}}{{\bf{v}}_1} + \frac{{\left( {\begin{aligned}{{}{}}2&5&6&6\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1\\0\\1\\1\end{aligned}} \right)}}{{\left( {\begin{aligned}{{}{}}1&0&1&1\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1\\0\\1\\1\end{aligned}} \right)}}{{\bf{v}}_2} + \frac{{\left( {\begin{aligned}{{}{}}2&5&6&6\end{aligned}} \right)\left( {\begin{aligned}{{}{}}0\\{ - 1}\\1\\{ - 1}\end{aligned}} \right)}}{{\left( {\begin{aligned}{{}{}}0&{ - 1}&1&{ - 1}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}0\\{ - 1}\\1\\{ - 1}\end{aligned}} \right)}}{{\bf{v}}_3}\end{aligned}\)

Solve further,

\(\begin{aligned}{}{\bf{\hat b}} &= \frac{1}{3}\left( {\begin{aligned}{{}{}}1\\1\\0\\{ - 1}\end{aligned}} \right) + \frac{{14}}{3}\left( {\begin{aligned}{{}{}}1\\0\\1\\1\end{aligned}} \right) + \frac{{\left( { - 5} \right)}}{3}\left( {\begin{aligned}{{}{}}0\\{ - 1}\\1\\{ - 1}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{}{}}5\\2\\3\\6\end{aligned}} \right)\end{aligned}\)

The orthogonal projection of b onto ColA is \(\left( {\begin{aligned}{{}{}}5\\2\\3\\6\end{aligned}} \right)\).

02

Find the normal equation 

Find the product \({A^T}A\).

\(\begin{aligned}{}{A^T}A &= \left( {\begin{aligned}{{}{}}1&1&0&{ - 1}\\1&0&1&1\\0&{ - 1}&1&{ - 1}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1&1&0\\1&0&{ - 1}\\0&1&1\\{ - 1}&1&{ - 1}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{}{}}3&0&0\\0&3&0\\0&0&3\end{aligned}} \right)\end{aligned}\)

Find the product \({A^T}{\bf{b}}\).

\(\begin{aligned}{}{A^T}{\bf{b}} &= \left( {\begin{aligned}{{}{}}1&1&0&{ - 1}\\1&0&1&1\\0&{ - 1}&1&{ - 1}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}2\\5\\6\\6\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{}{}}1\\{14}\\{ - 5}\end{aligned}} \right)\end{aligned}\)

The normal equation can be written as:

\(\begin{aligned}{}\left( {{A^T}A} \right){\bf{x}} &= {A^T}{\bf{b}}\\\left( {\begin{aligned}{{}{}}3&0&0\\0&3&0\\0&0&3\end{aligned}} \right)\left( {\begin{aligned}{{}{}}{{x_1}}\\{{x_2}}\\{{x_3}}\end{aligned}} \right) &= \left( {\begin{aligned}{{}{}}1\\{14}\\{ - 5}\end{aligned}} \right)\end{aligned}\)

03

Find the least square solution

The least-square solution can be calculated as follows:

\(\begin{aligned}{}{\bf{\hat x}} &= {\left( {{A^T}A} \right)^{ - 1}}{A^T}{\bf{b}}\\& = {\left( {\begin{aligned}{{}{}}3&0&0\\0&3&0\\0&0&3\end{aligned}} \right)^{ - 1}}\left( {\begin{aligned}{{}{}}1\\{14}\\{ - 5}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{}{}}{\frac{1}{3}}&0&0\\0&{\frac{1}{3}}&0\\0&0&{\frac{1}{3}}\end{aligned}} \right)\left( {\begin{aligned}{{}{}}1\\{14}\\{ - 5}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{}{}}{\frac{1}{3}}\\{\frac{{14}}{3}}\\{ - \frac{5}{3}}\end{aligned}} \right)\end{aligned}\)

Thus, the least square solution is \(\left( {\begin{aligned}{{}{}}{\frac{1}{3}}\\{\frac{{14}}{3}}\\{ - \frac{5}{3}}\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)\)

8. \(\left\| {\mathop{\rm x}\nolimits} \right\|\)

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} \)

A simple curve that often makes a good model for the variable costs of a company, a function of the sales level \(x\), has the form \(y = {\beta _1}x + {\beta _2}{x^2} + {\beta _3}{x^3}\). There is no constant term because fixed costs are not included.

a. Give the design matrix and the parameter vector for the linear model that leads to a least-squares fit of the equation above, with data \(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\).

b. Find the least-squares curve of the form above to fit the data \(\left( {4,1.58} \right),\left( {6,2.08} \right),\left( {8,2.5} \right),\left( {10,2.8} \right),\left( {12,3.1} \right),\left( {14,3.4} \right),\left( {16,3.8} \right)\) and \(\left( {18,4.32} \right)\), with values in thousands. If possible, produce a graph that shows the data points and the graph of the cubic approximation.

Let \(X\) be the design matrix in Example 2 corresponding to a least-square fit of parabola to data \(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\). Suppose \({x_1}\), \({x_2}\) and \({x_3}\) are distinct. Explain why there is only one parabola that best, in a least-square sense. (See Exercise 5.)

In Exercises 11 and 12, find the closest point to\[{\bf{y}}\]in the subspace\[W\]spanned by\[{{\bf{v}}_1}\], and\[{{\bf{v}}_2}\].

11.\[y = \left[ {\begin{aligned}3\\1\\5\\1\end{aligned}} \right]\],\[{{\bf{v}}_1} = \left[ {\begin{aligned}3\\1\\{ - 1}\\1\end{aligned}} \right]\],\[{{\bf{v}}_2} = \left[ {\begin{aligned}1\\{ - 1}\\1\\{ - 1}\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