title: what is the different from python(numpy.linalg.pinv and scipy.linalg.pinv or scipy.linalg.lstqs) and '/' in matlab?
body: <p>I sloved a least square problem (Ax=b for A )  using pinv in numpy and (pinv , lstsq) in scipy and "/" in matlab. I got some different answers, so what is the different between them?</p>
  
  <p>problem :Ax=b for A</p>
  
  <p>method:</p>
  
  <ol>
  <li><p>pinv in numpy and scipy : A=b*pinv(x)</p></li>
  <li><p>lstsq in scipy : A.T=lstsq(x.T,b.T) , the problem has changed to (x.T*A.T=b.T)</p></li>
  <li><p>/ in matlab : A=b/x</p></li>
  </ol>
  
  <p>matlab: <a href="https://cn.mathworks.com/help/matlab/ref/mrdivide.html" rel="nofollow noreferrer">https://cn.mathworks.com/help/matlab/ref/mrdivide.html</a></p>
  
  <p>"x = B/A solves the system of linear equations xA = B for x. The matrices A and B must contain the same number of columns. If A is a rectangular m-by-n matrix with m ~= n, and B is a matrix with n columns, then x = B/A returns a least-squares solution of the system of equations xA = B. "</p>
  
  <p>scipy.linalg.lstsq:Compute least-squares solution to equation Ax = b.</p>
  
  <p>scipy.linalg.pinv:Compute the (Moore-Penrose) pseudo-inverse of a matrix.
  Calculate a generalized inverse of a matrix using a least-squares solver.</p>
  
  <p>numpy.linalg.pinv:Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all large singular values.</p>