Row Operations in the Student[LinearAlgebra] Package

 Calling Sequence AddRow(A, i, j, s) MultiplyRow(A, i, s) SwapRow(A, i, j)

Parameters

 A - Matrix i, j - integers; row selection s - algebraic; multiplier

Description

 • The AddRow(A, i, j, s) command replaces row i of A with row i + s * row j.  This command can also be called as AddRows(A, i, j, s).
 • The MultiplyRow(A, i, s) command replaces row i of A with s * row i.
 • The SwapRow(A, i, j) command interchanges rows i and j of A.  This command can also be called as SwapRows(A, i, j).

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{LinearAlgebra}\right]\right):$
 > $A≔⟨⟨1,3,7⟩|⟨4,5,6⟩⟩$
 ${A}{≔}\left[\begin{array}{cc}{1}& {4}\\ {3}& {5}\\ {7}& {6}\end{array}\right]$ (1)
 > $B≔\mathrm{AddRow}\left(A,2,1,-3\right)$
 ${B}{≔}\left[\begin{array}{cc}{1}& {4}\\ {0}& {-7}\\ {7}& {6}\end{array}\right]$ (2)
 > $\mathrm{SwapRow}\left(B,1,3\right)$
 $\left[\begin{array}{cc}{7}& {6}\\ {0}& {-7}\\ {1}& {4}\end{array}\right]$ (3)
 > $\mathrm{MultiplyRow}\left(A,2,x\right)$
 $\left[\begin{array}{cc}{1}& {4}\\ {3}{}{x}& {5}{}{x}\\ {7}& {6}\end{array}\right]$ (4)