Linear Solve - Maple Help

LinearAlgebra[Generic]

 LinearSolve
 compute the solutions of A x = b

 Calling Sequence LinearSolve[F](A,b) LinearSolve[F](A,b,options)

Parameters

 F - the domain of computation, a field A - rectangular Matrix over values in F b - Vector or Matrix of values in F options - options for controlling the behavior of LinearSolve

Description

 • The (indexed) parameter F, which specifies the domain of computation, a field, must be a Maple table/module which has the following values/exports:
 F[0]: a constant for the zero of the ring F
 F[1]: a constant for the (multiplicative) identity of F
 F[+]: a procedure for adding elements of F (nary)
 F[-]: a procedure for negating and subtracting elements of F (unary and binary)
 F[*]: a procedure for multiplying two elements of F (commutative)
 F[/]: a procedure for dividing two elements of F
 F[=]: a boolean procedure for testing if two elements in F are equal
 • If the linear system A x = b is consistent, LinearSolve[F](A,b) returns (v,B) where v is Vector and B = [b1,b2,...,] is a list of Vectors. The solutions of the system are the Vectors { x + a1 b1 + a2 b2 + ... } for a1, a2, ... in F. Thus v is a particular solution, and B is a basis for the solutions of A x = 0. If the dimension of the solution space is 0 then B will be the empty list.
 • If the optional argument output=[...] is present, it specifies what values are returned, and in what order. The keywords in the output options may be any of solution, basis, or dimension, in any order. The default output format corresponds to output=[solution,basis] meaning a particular solution and a basis for the solutions of A x = b is output. If output=[solution] is specified, the output is a single Vector of solutions in terms of parameters. The parameter names may be specified by the optional argument free=t described below. By default, the names _t[1], _t[2], ... are used.
 • If free=t is specified, where t is a symbol or list of names, the solution(s) are returned as a single Vector of values parameterized by t[1], t[2], ..., t[d]. Note, this option is only available when the output=[solution] option is also specified.

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\left[\mathrm{Generic}\right]\right):$
 > $Q\left[\mathrm{0}\right],Q\left[\mathrm{1}\right],Q\left[\mathrm{+}\right],Q\left[\mathrm{-}\right],Q\left[\mathrm{*}\right],Q\left[\mathrm{/}\right],Q\left[\mathrm{=}\right]≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{/},\mathrm{=}$
 ${{Q}}_{{0}}{,}{{Q}}_{{1}}{,}{{Q}}_{{\mathrm{+}}}{,}{{Q}}_{{\mathrm{-}}}{,}{{Q}}_{{\mathrm{*}}}{,}{{Q}}_{{\mathrm{/}}}{,}{{Q}}_{{\mathrm{=}}}{≔}{0}{,}{1}{,}{\mathrm{+}}{,}{\mathrm{-}}{,}{\mathrm{*}}{,}{\mathrm{/}}{,}{\mathrm{=}}$ (1)
 > $A,b≔\mathrm{Matrix}\left(\left[\left[1,2,3\right],\left[1,0,1\right],\left[0,1,2\right]\right]\right),⟨1,2,1⟩$
 ${A}{,}{b}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {1}& {0}& {1}\\ {0}& {1}& {2}\end{array}\right]{,}\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]$ (2)
 > $x,B≔\mathrm{LinearSolve}\left[Q\right]\left(A,b\right)$
 ${x}{,}{B}{≔}\left[\begin{array}{c}\frac{{1}}{{2}}\\ {-2}\\ \frac{{3}}{{2}}\end{array}\right]{,}\left[\right]$ (3)
 > $x,d≔\mathrm{LinearSolve}\left[Q\right]\left(A,b,\mathrm{output}=\left[\mathrm{solution},\mathrm{dimension}\right]\right)$
 ${x}{,}{d}{≔}\left[\begin{array}{c}\frac{{1}}{{2}}\\ {-2}\\ \frac{{3}}{{2}}\end{array}\right]{,}{0}$ (4)
 > $\mathrm{MatrixVectorMultiply}\left[Q\right]\left(A,x\right)=b$
 $\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]{=}\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]$ (5)
 > $A\left[2,1..3\right]≔A\left[1,1..3\right]+A\left[3,1..3\right]:$
 > $b\left[2\right]≔b\left[1\right]+b\left[3\right]:$
 > $A,b$
 $\left[\begin{array}{ccc}{1}& {2}& {3}\\ {1}& {3}& {5}\\ {0}& {1}& {2}\end{array}\right]{,}\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]$ (6)
 > $x,B≔\mathrm{LinearSolve}\left[Q\right]\left(A,b\right)$
 ${x}{,}{B}{≔}\left[\begin{array}{c}{-1}\\ {1}\\ {0}\end{array}\right]{,}\left[\left[\begin{array}{c}{1}\\ {-2}\\ {1}\end{array}\right]\right]$ (7)
 > $x≔x+tB\left[1\right]$
 ${x}{≔}\left[\begin{array}{c}{t}{-}{1}\\ {-}{2}{}{t}{+}{1}\\ {t}\end{array}\right]$ (8)
 > $x,d≔\mathrm{LinearSolve}\left[Q\right]\left(A,b,\mathrm{output}=\left[\mathrm{solution},\mathrm{dimension}\right],\mathrm{free}=t\right)$
 ${x}{,}{d}{≔}\left[\begin{array}{c}{-}{1}{+}{{t}}_{{1}}\\ {1}{-}{2}{}{{t}}_{{1}}\\ {{t}}_{{1}}\end{array}\right]{,}{1}$ (9)
 > $A·x=b$
 $\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]{=}\left[\begin{array}{c}{1}\\ {2}\\ {1}\end{array}\right]$ (10)