This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Lists and Matrices / Matrix Operations /


FilledSmallSquare LinearSolve[m, b] finds an x which solves the matrix equation m.x==b.

FilledSmallSquare LinearSolve[m] generates a LinearSolveFunction[... ] which can be applied repeatedly to different b.

FilledSmallSquare LinearSolve works on both numerical and symbolic matrices, as well as SparseArray objects.

FilledSmallSquare The argument b can be either a vector or a matrix.

FilledSmallSquare The matrix m can be square or rectangular.

FilledSmallSquare LinearSolve[m] and LinearSolveFunction[... ] provide an efficient way to solve the same approximate numerical linear system many times.

FilledSmallSquare LinearSolve[m, b] is equivalent to LinearSolve[m][b].

FilledSmallSquare For underdetermined systems, LinearSolve will return one of the possible solutions; Solve will return a general solution.

FilledSmallSquare LinearSolve[m, b, Modulus -> n] takes the matrix equation to be modulo n.

FilledSmallSquare LinearSolve[m, b, ZeroTest -> test] evaluates test[ m[[i, j]] ] to determine whether matrix elements are zero. The default setting is ZeroTest -> (# == 0 &).

FilledSmallSquare A Method option can also be given. Settings for exact and symbolic matrices include "CofactorExpansion", "DivisionFreeRowReduction" and "OneStepRowReduction". Settings for approximate numerical matrices include "Cholesky", and for sparse arrays "Multifrontal" and "Krylov". The default setting of Automatic switches between these methods depending on the matrix given.

FilledSmallSquare See Section 3.7.8.

FilledSmallSquare Implementation Notes: see Section A.9.4, Section A.9.4 and Section A.9.4.

FilledSmallSquare See also: Inverse, PseudoInverse, Solve, NullSpace, CoefficientArrays, CholeskyDecomposition.

FilledSmallSquare New in Version 1; modified in 5.0.

Further Examples