BackwardSubstitute - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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) equation of the form inplace=true or false; 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|0&comma;1&comma;0&comma;0|2&comma;1&comma;0&comma;0|0&comma;0&comma;1&comma;0|2&comma;1&comma;2&comma;0|3&comma;1&comma;2&comma;0

A1020−2301−10110001−22000000

(1)

MBackwardSubstituteA

M32_t2+2_t11+_t2_t1_t22+2_t1_t1

(2)

A1..1,1..2·M

3120

(3)

B1&comma;0|0&comma;1|0&comma;1|0&comma;1&colon;

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

ForwardSubstituteB&comma;X&comma;free=x

10x1,1x1,2x2,1x2,21x1,1x2,13x1,2x2,2

(4)

C1&comma;0&comma;0|0&comma;1&comma;0|1&comma;1&comma;1&colon;

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

BackwardSubstituteC&comma;Y&comma;inplace

−1−24

(5)

Y

−1−24

(6)

See Also

Matrix