perform elementary row operations on a Matrix - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : SubOperations : LinearAlgebra/RowOperation

LinearAlgebra[RowOperation] - perform elementary row operations on a Matrix

LinearAlgebra[ColumnOperation] - perform elementary column operations on a Matrix

Calling Sequence

RowOperation(A, K, s, ip, options)

ColumnOperation(A, K, s, ip, options)

Parameters

A

-

Matrix

K

-

integer or list of two integers

s

-

(optional) algebraic expression

ip

-

(optional) BooleanOpt(inplace); specifies if output overwrites input

options

-

(optional); constructor options for the result object

Description

• 

The following elementary row (column) operations can be executed by using this function. The specific operation that is performed is determined by the parameters that are used in the calling sequence.

  

 

  

Interchange two rows (columns) in a Matrix

  

The RowOperation(A, K) (ColumnOperation(A, K)) function, where K is a list of two integers, returns a Matrix which has the same entries as A except that the rows (columns) corresponding to the integers in K are interchanged.

  

 

  

Multiply a row (column) in a Matrix by an algebraic expression

  

The RowOperation(A, K, s) (ColumnOperation(A, K, s)) function, where K is an integer, returns a Matrix which has the same entries as A except that the Kth row (column) is multiplied by s.

  

 

  

Add a multiple of one row (column) to another row (column) in a Matrix

  

The RowOperation(A, K, s) function, where K is a list of two integers i1 and i2, returns a Matrix which has the same entries as A except that row i1 is replaced by RowA,i1+sRowA,i2.

  

Similarly, ColumnOperation(A, K, s) returns a Matrix which has the same entries as A except that column i1 is replaced by ColumnA,i1+sColumnA,i2.

  

 

• 

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

  

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 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 RowOperation(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[RowOperation](..).

Examples

withLinearAlgebra:

A:=1,2,3|4,5,6|7,8,9

A:=147258369

(1)

RowOperationA,3,3

14725891827

(2)

ColumnOperationA,1,3,inplace=true

741852963

(3)

RowOperationA,1,2,2

23145852963

(4)

See Also

LinearAlgebra[Column], LinearAlgebra[Row], Matrix, type[BooleanOpt], Vector


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