Solve Least Squares Problem for Matrix A and B | Homework Equations

chuy52506
Messages
77
Reaction score
0

Homework Statement


Let
A=
|2 -1 -1|
|-1 2 -1|
|-1 -1 2|
and
B=
|1|
|2|
|3|


Homework Equations



Find the x in which minimizes ||Ax-b||2


The Attempt at a Solution


I tried to solve it by using this formula (A**A)-1A**b=x but i get the inverse of A*A equal 0
 
Physics news on Phys.org
Greetings! Right, since A does not have linearly independent columns, A^TA is not invertible. Call B = A^TA and \vec{y} = A^T\vec{b} and try using row reduction to solve the matrix equation B\vec{x} = \vec{y} for \vec{x}.
 
When i try to solve it i get the last row in rref of B=A*A to be a row of 0's equal to 3=/
Is there any other way to solve this??
 
I got that

B = A^TA = \[ \left[ \begin{array}{ccc}<br /> 6 &amp; -3 &amp; -3 \\<br /> -3 &amp; 6 &amp; -3 \\<br /> -3 &amp; -3 &amp; 6 \end{array} \right]\]

and

\vec{y} = A^T\vec{b} = \[ \left[ \begin{array}{c}-3 \\<br /> 0 \\3 \end{array} \right]\].

Is this what you got? Then we can row reduce

[ B\ \vec{y} ] = \[ \left[ \begin{array}{cccc}<br /> 6 &amp; -3 &amp; -3 &amp; -3 \\<br /> -3 &amp; 6 &amp; -3 &amp; 0 \\<br /> -3 &amp; -3 &amp; 6 &amp; 3 \end{array} \right]\]

In fact, reducing this shows that there is a free variable, meaning that there is a whole line worth of solutions that give the best approximation.
 
thanks!
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top