The matrix language does not support missing values.
-@node Matrix Expressions
-@subsection Matrix Expressions
+@node Matrix Operators
+@subsection Matrix Operators
Many matrix commands use expressions. A matrix expression may use the
following operators, listed in descending order of operator
Each of these operators is described in more detail below.
@node Matrix Construction Operator
-@subsubsection The Matrix Construction Operator @t{@{@}}
+@subsubsection Matrix Construction Operator @t{@{@}}
Use the @t{@{}@t{@}} operator to construct matrices. Within
the curly braces, commas separate elements within a row and semicolons
The final example above uses the transposition function @code{T}.
@node Matrix Sequence Operator
-@subsubsection The Integer Sequence Operator @samp{:}
+@subsubsection Integer Sequence Operator @samp{:}
The syntax @code{@var{first}:@var{last}:@var{step}} yields a row
vector of consecutive integers from @var{first} to @var{last} counting
@end multitable
@node Matrix Index Operator
-@subsubsection The Index Operator @code{()}
+@subsubsection Index Operator @code{()}
The result of the submatrix or indexing operator, written
@code{@var{m}(@var{rindex}, @var{cindex})}, contains the rows of
@item @t{@{11; 12; 13; 14@}(0)} @tab @result{} @tab (error)
@end multitable
-@node Matrix Unary Arithmetic Operators
-@subsubsection Unary Arithmetic Operators
+@node Matrix Unary Operators
+@subsubsection Unary Operators
-The unary @samp{-} operator inverts the sign of each element in its
-argument. The unary @samp{+} operator has no effect:
+The unary operators take a single operand of any dimensions and
+operate on each of its elements independently. The unary operators
+are:
+
+@table @code
+@item -
+Inverts the sign of each element.
+
+@item +
+No change.
+
+@item NOT
+Logical inversion: each positive value becomes 0 and each zero or
+negative value becomes 1.
+@end table
+
+Examples:
@multitable @columnfractions .4 .05 .4
@item @t{-@{1, -2; 3, -4@}} @tab @result{} @tab @t{@{-1, 2; -3, 4@}}
@item @t{+@{1, -2; 3, -4@}} @tab @result{} @tab @t{@{1, -2; 3, -4@}}
+@item @t{NOT @{1, 0; -1, 1@}} @tab @result{} @tab @t{@{0, 1; 1, 0@}}
@end multitable
-@node Matrix Elementwise Operators
-@subsubsection Elementwise Operators
+@node Matrix Elementwise Binary Operators
+@subsubsection Elementwise Binary Operators
-The elementwise operators require their operands to be matrices with
-the same dimensions. Alternatively, if one operand is a scalar, then
-its value is treated as if it were duplicated to the dimensions of the
-other operand. The result is a matrix of the same size as the
+The elementwise binary operators require their operands to be matrices
+with the same dimensions. Alternatively, if one operand is a scalar,
+then its value is treated as if it were duplicated to the dimensions
+of the other operand. The result is a matrix of the same size as the
operands, in which each element is the result of the applying the
operator to the corresponding elements of the operands.
-The elementwise operators are listed below.
+The elementwise binary operators are listed below.
@itemize @bullet
@item
nonpositive operands as false. They yield 0 for false and 1 for true:
@table @code
-@item NOT
-True if its single operand is false.
-
@item AND
True if both operands are true.
@end itemize
@node Matrix Multiplication Operator
-@subsubsection The Matrix Multiplication Operator @samp{*}
+@subsubsection Matrix Multiplication Operator @samp{*}
If @code{A} is an @math{@var{m}@times{}@var{n}} matrix and @code{B} is
an @math{@var{n}@times{}@var{p}} matrix, then @code{A*B} is the
@end multitable
@node Matrix Exponentiation Operator
-@subsubsection The Matrix Exponentiation Operator @code{**}
+@subsubsection Matrix Exponentiation Operator @code{**}
The result of @code{A**B} is defined as follows when @code{A} is a
square matrix and @code{B} is an integer scalar: