Find non unique solutions to pseudo inverse least square estimation

63 Views Asked by At

For the equation $Ax = B$, I can use the pseudo inverse of $A * B$ to get the best estimate for $x$.

Now $A$ is not full rank and there's linearly dependent columns, so when performing $\operatorname{pinv}(A) * B$, some of the $x$ values may not be unique.

For example, consider that

    a = 
       1   2   0   0   0   0
       2   4   0   0   0   0
       0   0   1   0   0   1
       0   0   0   1   0   0
       0   0   0   0   1   0

    b =
       1
       3
       3
       4
       5

Now if we calculate x by taking pinv of a
x = pinv(a) * b

    x =
       0.2800
       0.5600
       1.5000
       4.0000
       5.0000
       1.5000

But we know that the 1,2,3, and 6th values of $x$ have no unique answers. How do we identify which values of $x$ are not unique? Preferably using SVD because we use SVD to perform the pseudo inverse anyways and it would save calculation steps for us.

1

There are 1 best solutions below

0
On

$ \def\c#1{\color{red}{#1}} \def\m#1{\left[\begin{array}{r}#1\end{array}\right]} $The nullspace projector of $A$ is $$\eqalign{ P \;=\; \big(I-A^+A\big) \;=\; \frac{1}{10}\m{ 8 & -4 & 0 & \;\c{0} & \;\c{0} & 0 \\ -4 & 2 & 0 & \c{0} & \c{0} & 0 \\ 0 & 0 & 5 & \c{0} & \c{0} & -5 \\ 0 & 0 & 0 & \c{0} & \c{0} & 0 \\ 0 & 0 & 0 & \c{0} & \c{0} & 0 \\ 0 & 0 & -5 & \c{0} & \c{0} & 5 } \\ }$$ The general solution of the equation includes contributions from the nullspace $$x = A^+b + Py$$ where $y$ is an arbitrary vector. Since the $4^{th}$ and $5^{th}$ columns of $P$ are zero, the nullspace won't alter those components of the solution.