compute the solutions of A x = b - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Generic Subpackage : LinearAlgebra/Generic/LinearSolve

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

withLinearAlgebra[Generic]:

Q`0`,Q`1`,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`:=0,1,`+`,`-`,`*`,`/`,`=`

Q0,Q1,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`:=0,1,`+`,`-`,`*`,`/`,`=`

(1)

A,b:=Matrix1,2,3,1,0,1,0,1,2,1,2,1

A,b:=123101012,121

(2)

x,B:=LinearSolveQA,b

x,B:=12232,

(3)

x,d:=LinearSolveQA,b,output=solution,dimension

x,d:=12232,0

(4)

MatrixVectorMultiplyQA,x=b

121=121

(5)

A2,1..3:=A1,1..3+A3,1..3:

b2:=b1+b3:

A,b

123135012,121

(6)

x,B:=LinearSolveQA,b

x,B:=110,121

(7)

x:=x+tB1

x:=t12t+1t

(8)

x,d:=LinearSolveQA,b,output=solution,dimension,free=t

x,d:=1+t112t1t1,1

(9)

A.x=b

121=121

(10)

See Also

LinearAlgebra[Generic], LinearAlgebra[LinearSolve]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam