LinearAlgebra - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Solvers : LinearAlgebra/BackwardSubstitute

LinearAlgebra

  

BackwardSubstitute

  

solve A . X = B where A is in upper row echelon form

  

ForwardSubstitute

  

solve A . X = B where A is in lower row echelon form

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

BackwardSubstitute(A, B, t, ip, options)

ForwardSubstitute(A, B, t, ip, options)

Parameters

A

-

row echelon form Matrix

B

-

(optional) Matrix or Vector

t

-

(optional) equation of the form free = symbol; variable for parametrization of infinite solution sets

ip

-

(optional) BooleanOpt(inplace); specifies if output overwrites parameter B when A is square

options

-

(optional); constructor options for the transformation Matrix C

Description

• 

The BackwardSubstitute(A, B) function, where A is an upper row echelon Matrix,  returns a solution to the equation A.X=B.

  

The ForwardSubstitute(A, B) function, where A is a lower row echelon Matrix,  returns a solution to the equation A.X=B.

  

For each column b of B, this routine performs backwards (or forwards) substitution to obtain a solution x of A.x=b. These solution Vectors form a Matrix (or, singly, a Vector) solution which is returned. If no such solution Vector x exists for any column b (e.g., both A is not upper (or lower) triangular and the substitution is inconsistent), then an error is returned.

  

If the substitution does not result in a unique solution, then the infinite family of possible solutions will be parametrized as follows:

  

*  If B is a Vector, then the solution is parametrized by t[1], t[2], etc, as needed.

  

*  If B is a Matrix, then the jth column of the solution Matrix is parametrized by t[1,j], t[2,j], etc, as needed.

  

If the parameter t is not provided, then an unassigned name _t<#> is generated.  For example, if _t0, _t1.._t<i> are all assigned, but _t<i+1> is not assigned, then _t<i+1> is the generated name.

  

If B is not included in the calling sequence, A is assumed to be an augmented Matrix.

• 

The inplace option (ip) determines where the result is returned.  If given as inplace=true and A is a square Matrix, the result overwrites the second argument B. If given as inplace=false, or if this option is not included in the calling sequence, the result is returned in a new Matrix or Vector.

  

The condition inplace=true can be abbreviated to inplace.

  

The inplace option must be used with caution since, if the operation fails, the original Matrix argument may be corrupted.

• 

The constructor options provide additional information (readonly, shape, storage, order,datatype, and attributes) to the Matrix or Vector constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).

• 

The inplace and constructor options are mutually exclusive.

• 

This function is part of the LinearAlgebra package, and so it can be used in the form BackwardSubstitute(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[BackwardSubstitute](..).

Examples

withLinearAlgebra&colon;

A1&comma;0&comma;0&comma;0&verbar;0&comma;1&comma;0&comma;0&verbar;2&comma;1&comma;0&comma;0&verbar;0&comma;0&comma;1&comma;0&verbar;2&comma;1&comma;2&comma;0&verbar;3&comma;1&comma;2&comma;0

A:=102023011011000122000000

(1)

MBackwardSubstituteA

M:=32_t2&plus;2_t11&plus;_t2_t1_t22&plus;2_t1_t1

(2)

A1..1&comma;1..2&period;M

3120

(3)

B1&comma;0&verbar;0&comma;1&verbar;0&comma;1&verbar;0&comma;1&colon;

X1&comma;1&verbar;0&comma;3&colon;

ForwardSubstituteB&comma;X&comma;free&equals;&apos;x&apos;

10x1&comma;1x1&comma;2x2&comma;1x2&comma;21x1&comma;1x2&comma;13x1&comma;2x2&comma;2

(4)

C1&comma;0&comma;0&verbar;0&comma;1&comma;0&verbar;1&comma;1&comma;1&colon;

Y3&comma;2&comma;4&colon;

BackwardSubstituteC&comma;Y&comma;inplace

124

(5)

Y

124

(6)

See Also

Matrix

type[BooleanOpt]

 


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