Mathematica > Mathematics and Algorithms > Matrices and Linear Algebra > Matrix-Based Minimization >

LeastSquares

LeastSquares[m, b]
finds an x which solves the linear least-squares problem for the matrix equation m.xEqualb.
  • The vector x is uniquely determined by the minimization only if Length[x]EqualMatrixRank[m].
  • The argument b can be a matrix, in which case the least-squares minimization is done independently for each column in b.
  • A Method option can also be given. Settings for arbitrary-precision numerical matrices include "Direct" and "IterativeRefinement", and for sparse arrays "Direct" and "Krylov". The default setting of Automatic switches between these methods depending on the matrix given.
New in 6
© 2008 Wolfram Research, Inc.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team