I saw this insightful discussion on Slack (Made some editing for clarity):
The
\
(Operator) should produce the minimum norm solution if many exist, and that’s what it does.
I am not sure
\
will always yield the minimum norm vector. At least it doesn’t on MATLAB. Which usesQR
for basic solution for non square matrices.
@ Andreas Noack:
[In Julia]
/
will give a minimum norm solution for rectangular problems but not square problems (which is indeed a bit odd).
When the problem is underdetermined, MATLAB produces a basic solution (i.e. with zeros) whereas Julia chooses the minimum norm solution. The latter but not the former is built into some LAPACK routines. However, it’s quite easy to build a basic solution from a pivoted QR.
@ Dominique:
Also,
\
only returns the min-norm solution if A is dense. If A is sparse (and rectangular),\
returns a basic solution, i.e., one with many zeros.
If anyone else had more info to add, please do.