|
SOLUTIONS
|
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Linear Systems
>
LinearSolve
BUILT-IN MATHEMATICA SYMBOL
LinearSolve
LinearSolve[m, b]
finds an x that solves the matrix equation
.
LinearSolve[m]
generates a LinearSolveFunction[...] 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 LinearSolveFunction[...] 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[m, b, Modulus->n] takes the matrix equation to be modulo n. »
- LinearSolve[m, b, ZeroTest->test] evaluates
to determine whether matrix elements are zero. The default setting is ZeroTest->Automatic. - A Method option can also be given. Settings for exact and symbolic matrices include
,
, and
. Settings for approximate numerical matrices include
, and for sparse arrays
and
. The default setting of Automatic switches among these methods depending on the matrix given.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
| In[1]:= |
| Out[1]= |
With no right-hand side, a LinearSolveFunction is returned:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= |
New in 1 | Last modified in 5
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
