mneg ( m -- m' )
Matrix operations

Prev:matrix-normalize ( m -- m' )
Next:m+n ( m n -- m )


Vocabulary
math.matrices

Inputs
ma matrix


Outputs
m'a matrix


Word description
Negate (invert the sign) of every element in the matrix. The resulting matrix is called the additive inverse of the input matrix.

Notes
This word is the companion variant of mabs.
This word is intended for use with "flat" (2-dimensional) matrices.
This word assumes that elements of the input matrix are compatible with the following words:
neg ( x -- -x )


Examples
USING: math.matrices prettyprint ; { { 5 9 } { 15 -17 } } mneg .
{ { -5 -9 } { -15 17 } }


Definition