0
$\begingroup$

I would like to ask, why method of least square approximation (A*x=b) gives us solution, that is equal 1/n, where n is number of unknown elements.

example: Let A = $\begin{bmatrix} 7 & 7 & 7\\ 7 & 7 & 7 \\ 7 & 7 & 7\\ 7 & 7 & 7\end{bmatrix}$ and b=$\begin{pmatrix} 7\\7 \\7\\7\end{pmatrix}$ Why are then components of vector x equal to 0.33 (1/3). I understand that this would be minimal squared distances between points and new function, but I don't know how to give proof for it (that components of vector x are equal and they are x equal to 1/(number of components)

$\endgroup$
  • $\begingroup$ # rows of A should be equal to length of b? $\endgroup$ – gimusi Mar 12 '18 at 21:39
  • $\begingroup$ of course. I'm sorry for a mistake. $\endgroup$ – Mirjan Pecenko Mar 12 '18 at 21:41
  • $\begingroup$ How have you calculated x? $\endgroup$ – gimusi Mar 12 '18 at 21:48
0
$\begingroup$

In this case $b\in col(A)$ thus the solution is trivial and all the solution $x=(a,b,c)$ with $a+b+c=1$ are valid.

$\endgroup$
  • $\begingroup$ but why is then a=b=c? Every time I input some constant matrix and same constant output. (xi=yi=k) it gives 1/n components to solution $\endgroup$ – Mirjan Pecenko Mar 12 '18 at 21:44
  • $\begingroup$ @MirjanPecenko Least square makes sense when $b\not \in col(A)$, in this case we are solving a system with infinitely many solutions and x=$(1/3,1/3,1/3)$ is one of them. $\endgroup$ – gimusi Mar 12 '18 at 21:46
0
$\begingroup$

The method of ordinary least squares will not yield the solution $x=(\frac13, \frac13, \frac13)$ as the system is under-determinate.

This solution will be obtained from the pseudo-inverse of the matrix, a more powerful tool. It selects the minimum norm solution among all those possible.

See https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse

$\endgroup$
  • $\begingroup$ gyazo.com/f42c9419f6d25a27ed16e68fb4b8b7da . So this is not true? Because I don't understand how is it possible to get step 6 (final equation) $\endgroup$ – Mirjan Pecenko Mar 12 '18 at 22:05
  • $\begingroup$ @MirjanPecenko: what is the exact dimension of your system ? You are giving incoherent information. $\endgroup$ – Yves Daoust Mar 12 '18 at 22:26
  • $\begingroup$ dimensions are : A = m x n. (m=rows, n=columns). x = m x 1 and b = m x 1. Are elements in A and b are equal (some constant) $\endgroup$ – Mirjan Pecenko Mar 12 '18 at 22:42
  • $\begingroup$ @MirjanPecenko: your system is 1 x n, not m x n. $\endgroup$ – Yves Daoust Mar 13 '18 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.