Unary Operations. Those that operate on a single dataset and take no arguments (e.g. ABS, which takes the absolute value of every cell in the matrix);

Binary Operations. Those that perform algebraic and arithmetic operations require two or more datasets (e.g. ADD, which adds corresponding cells of two or more matrices);

Inner Products. Those that perform arithmetic operations on various dimensions (i.e. rows, columns, matrices) of a single dataset (e.g. TOTAL, which sums values of a matrix broken out by row, column, level or combinations of these).

When you choose

The difference in the two kinds of commands is reflected in their syntax.

Functions have this basic syntax:

In the documentation to follow, an item enclosed in angle brackets denotes a name or other input to be provided by the user. Hence, <output

An example of valid syntax for a function is this:

In the example,

Most functions will have a single argument consisting of the name of an input matrix. Others will have two or more arguments, again consisting of the names of datasets. For instance, the syntax for the

An example would be:

A few functions take other kinds of arguments. For example, to generate an identity matrix with 5 rows and columns, you would type:

The syntax for procedures differs from functions in that there is no output matrix:

An example is:

Another example is:

This requests a singular value decomposition of the matrix

One useful fact to remember is that whenever the syntax for a function or procedure calls for the name of a matrix, a function may be substituted instead. For example, the command

requests that the inverse of the transpose of a matrix

A less error-prone alternative would be the following series:

Unary Functions

Binary Functions

Inner Products

Procedures