Given an overdetermined real linear system $Ax = b$, with $m$ equations, $n$ variables, and some unknown elements in both $A$ and $b$. I need to know what constraints must be imposed on those unknown elements (not the variables) so that the system becomes consistent and with a single solution (the solution itself doesn't matter).
The system must thus satisfy two conditions ($A^+$ is the Moore-Penrose pseudo inverse):
- $AA^+b = b$: the system is consistent
- $A^+A = I$: there is only one solution
The question is how to derive $A^+$? The Wikipedia page on the pseudo inverse lists various methods, but only one, QR decomposition, is not iterative or rely on $A$ being full rank (or at least having a known rank). QR decomposition can be carried out analytically (by using the Gram–Schmidt process, for example), but how can I obtain $A^+$ from $Q$ and $R$? I've googled for a few hours, but the only result found was (from algopy): $A^+ = w$, where $w$ is the solution to $Rw = y$ and $y$ is the solution to $R^Ty = A^T$, but it assumes $A$ is full rank.