ColumnOperation - Maple Help

LinearAlgebra

 RowOperation
 perform elementary row operations on a Matrix
 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) equation of the form inplace=true or false; 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 $\mathrm{Row}\left(A,\mathrm{i1}\right)+s\mathrm{Row}\left(A,\mathrm{i2}\right)$.
 Similarly, ColumnOperation(A, K, s) returns a Matrix which has the same entries as A except that column i1 is replaced by $\mathrm{Column}\left(A,\mathrm{i1}\right)+s\mathrm{Column}\left(A,\mathrm{i2}\right)$.
 • 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

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔⟨⟨1,2,3⟩|⟨4,5,6⟩|⟨7,8,9⟩⟩$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {4}& {7}\\ {2}& {5}& {8}\\ {3}& {6}& {9}\end{array}\right]$ (1)
 > $\mathrm{RowOperation}\left(A,3,3\right)$
 $\left[\begin{array}{ccc}{1}& {4}& {7}\\ {2}& {5}& {8}\\ {9}& {18}& {27}\end{array}\right]$ (2)
 > $\mathrm{ColumnOperation}\left(A,\left[1,3\right],\mathrm{inplace}=\mathrm{true}\right)$
 $\left[\begin{array}{ccc}{7}& {4}& {1}\\ {8}& {5}& {2}\\ {9}& {6}& {3}\end{array}\right]$ (3)
 > $\mathrm{RowOperation}\left(A,\left[1,-2\right],2\right)$
 $\left[\begin{array}{ccc}{23}& {14}& {5}\\ {8}& {5}& {2}\\ {9}& {6}& {3}\end{array}\right]$ (4)