How did he get this outcome?

60 Views Asked by At

It's a matrix solved with least squares equations (probaly). I used some calculator but can't get his outcome. If you have a way how to get to this please explain how.

[The math on that image is: $$A = \left[\matrix{4&3&1&0&1\cr 5&2&1&0&1\cr 4&2&1&1&1\cr 3&1&0&1&1\cr 1&1&0&1&1\cr}\right], \quad\vec b = \left[\matrix{4\cr 6\cr 6\cr 3\cr 1\cr}\right]$$ "Least Squares" of $A\vec x = \vec b$ is $\vec x = \left[\matrix{1\cr -1\cr 2\cr 1\cr 1\cr}\right]$.]

Pic related: http://postimg.org/image/7ellc2pnl/

3

There are 3 best solutions below

7
On

When using the matrix as you have above, I also get $\left[\begin{array}{c}{1 \\ -1 \\ 3 \\ 1 \\ 0}\end{array}\right]$

However, when I add a bias column of $1$'s, I get closer to his displayed result: $\left[\begin{array}{c}{1 \\ -1 \\ 2 \\ 0.5 \\ 0.5}\end{array}\right]$

Again, the matrix used with extra bias column is:

$$\left[\begin{array}{ccccc|c}4 &3 &1 &0 &1 &1 \\ 5 &2 &1 &0 &1 &1 \\ 4 &2 &1 &1 &1 &1 \\ 3 &1 &0 &1 &1 &1 \\ 1 &1 &0 &1 &1 &1 \end{array}\right]$$

4
On

Least squares of $\mathrm{A} \boldsymbol{x} = \boldsymbol{b}$ is

$$(\mathrm{A}^\top\mathrm{A}) \boldsymbol{x} = \mathrm{A}^\top \boldsymbol{b}$$ $$ \boldsymbol{x} =(\mathrm{A}^\top\mathrm{A})^{-1} \mathrm{A}^\top \boldsymbol{b}$$

0
On

The least square:

$$ f(x)=||Ax-b||^2 $$

$$ x = \arg \min_{x\in\mathbb{R}}f(x) $$

The minimization is usually made by the Levenberg-Marquardt algorithm.

The result that you have is because your matrix is ill-conditioned.