Use a singular value decomposition . Then
Each nonzero singular value contributes , while each zero one contributes zero. Thus
using the Moore-Penrose inverse.
The normal equation for a linear inverse problem is
It has a solution exactly when
When solutions exist they form
They are unique exactly when , while is always the unique solution in and the solution of minimum norm. Here is the Moore-Penrose inverse.