# Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
BUILT-IN WOLFRAM LANGUAGE SYMBOL

# LinearSolve

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

LinearSolve[m]
generates a that can be applied repeatedly to different b.

## Details and OptionsDetails and Options

• LinearSolve works on both numerical and symbolic matrices, as well as SparseArray objects.
• The argument b can be either a vector or a matrix. »
• The matrix m can be square or rectangular. »
• LinearSolve[m] and provide an efficient way to solve the same approximate numerical linear system many times.
• LinearSolve[m,b] is equivalent to LinearSolve[m][b].
• For underdetermined systems, LinearSolve will return one of the possible solutions; Solve will return a general solution. »
• LinearSolve has the following options and settings:
•  Method Automatic method to use Modulus 0 whether to solve modulo n ZeroTest Automatic test to determine when expressions are zero
• The ZeroTest option only applies to exact and symbolic matrices.
• With , the method is automatically selected depending upon input.
• Explicit Method settings for exact and symbolic matrices include:
•  "CofactorExpansion" Laplace cofactor expansion "DivisionFreeRowReduction" Bareiss method of division-free row reduction "OneStepRowReduction" standard row reduction
• Explicit Method settings for approximate numeric matrices include:
•  "Banded" banded matrix solver "Cholesky" Cholesky method for positive definite Hermitian matrices "Krylov" iterative Krylov sparse solver "Multifrontal" direct sparse LU decomposition

## ExamplesExamplesopen allclose all

### Basic Examples  (2)Basic Examples  (2)

 In[1]:=
 Out[1]=

With no righthand side, a LinearSolveFunction is returned:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=