Algosim documentation: RowScale

RowScale

Returns a matrix with one of its rows scaled.

Syntax

Description

If A is a matrix, i a valid row index in A, and k a real number, then RowScale(A, i, k) returns A with its ith row multiplied by k.

This is an elementary row operation.

Examples

A ≔ ❨❨5, 1, 2, 3, 4❩, ❨4, 0, 2, 1, 7❩, ❨6, 3, 0, 4, 7❩, ❨4, 5, 2, 3, 9❩, ❨4, 0, 1, 2, 5❩❩
⎛5  1  2  3  4⎞
⎜4  0  2  1  7⎟
⎜6  3  0  4  7⎟
⎜4  5  2  3  9⎟
⎝4  0  1  2  5⎠
RowScale(A, 2, −1)
⎛ 5   1   2   3   4⎞
⎜−4   0  −2  −1  −7⎟
⎜ 6   3   0   4   7⎟
⎜ 4   5   2   3   9⎟
⎝ 4   0   1   2   5⎠

See also