azay
- 18
- 0
Hi,
I am trying to learn some numerical algebra. Now I don't understand the following.
I'm finding the solution to the Linear Least Squares problem min||A\lambda-y||_{2}, which turns out to be (1,1). I did this by doing a QR factorization using Givens rotations.
with:
<br /> A=<br /> \[ \left( \begin{array}{ccc}<br /> 1 & 1\\<br /> 1 & 1.0001\\<br /> 1 & 1.0001\end{array} \right)\]
and
<br /> y=<br /> \[ \left( \begin{array}{ccc}<br /> 2\\<br /> 0.0001\\<br /> 4.0001\end{array} \right)\]<br />
Now, I have a Octave (matlab clone) program that does the same calculation. As the condition number of the matrix A is very large (4.2429e+004) (found by applying Octave's cond() function on A), I expect the solution to be at least not exact. Yet the Octave program gives the exact solution (1,1), at least, as far as I can see (6 digit accuracy I think), that is. Can someone explain this?
Also, should one consider the condition number of the matrix A when considering the condition of the Linear Least Squares problem, or the condition number of the Matrix A|y?
(The condition number of the latter is even bigger so my first question holds in any case).
Thank you :)
I am trying to learn some numerical algebra. Now I don't understand the following.
I'm finding the solution to the Linear Least Squares problem min||A\lambda-y||_{2}, which turns out to be (1,1). I did this by doing a QR factorization using Givens rotations.
with:
<br /> A=<br /> \[ \left( \begin{array}{ccc}<br /> 1 & 1\\<br /> 1 & 1.0001\\<br /> 1 & 1.0001\end{array} \right)\]
and
<br /> y=<br /> \[ \left( \begin{array}{ccc}<br /> 2\\<br /> 0.0001\\<br /> 4.0001\end{array} \right)\]<br />
Now, I have a Octave (matlab clone) program that does the same calculation. As the condition number of the matrix A is very large (4.2429e+004) (found by applying Octave's cond() function on A), I expect the solution to be at least not exact. Yet the Octave program gives the exact solution (1,1), at least, as far as I can see (6 digit accuracy I think), that is. Can someone explain this?
Also, should one consider the condition number of the matrix A when considering the condition of the Linear Least Squares problem, or the condition number of the Matrix A|y?
(The condition number of the latter is even bigger so my first question holds in any case).
Thank you :)