linalg(deprecated)

 form linear combinations of matrix rows
 form linear combinations of matrix columns

 Calling Sequence addrow(A, r1, r2, m) addcol(A, c1, c2, m)

Parameters

 A - matrix r1, r2, c1, c2 - integers; row (column) indices m - a scalar expression

Description

 • Important: The linalg package has been deprecated. Use the superseding command, LinearAlgebra[MatrixAdd], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The call addrow(A, r1, r2, m) returns a copy of the matrix A in which row r2 is replaced by $m\mathrm{row}\left(A,\mathrm{r1}\right)+\mathrm{row}\left(A,\mathrm{r2}\right)$. Similarly addcol(A, c1, c2, m) returns a copy of the matrix A in which column c2 is replaced by $m\mathrm{col}\left(A,\mathrm{c1}\right)+\mathrm{col}\left(A,\mathrm{c2}\right)$.
 These functions are part of the linalg package, and so can be used in the form addrow(..) only after performing the command with(linalg) or with(linalg,addrow).  These functions can always be accessed in the long form linalg[addrow](..).

Examples

Important: The linalg package has been deprecated. Use the superseding command, LinearAlgebra[MatrixAdd], instead.

The linalg package has been deprecated. Use the superseding packages, LinearAlgebra and VectorCalculus, instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $a≔\mathrm{array}\left(1..3,1..3,\left[\left[1,2,3\right],\left[2,3,4\right],\left[3,4,5\right]\right]\right)$
 ${a}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {2}& {3}& {4}\\ {3}& {4}& {5}\end{array}\right]$ (1)
 > $\mathrm{addrow}\left(a,1,2,10\right)$
 $\left[\begin{array}{ccc}{1}& {2}& {3}\\ {12}& {23}& {34}\\ {3}& {4}& {5}\end{array}\right]$ (2)
 > $\mathrm{addcol}\left(a,1,2,-x\right)$
 $\left[\begin{array}{ccc}{1}& {-}{x}{+}{2}& {3}\\ {2}& {-}{2}{}{x}{+}{3}& {4}\\ {3}& {-}{3}{}{x}{+}{4}& {5}\end{array}\right]$ (3)