TRACE

Purpose:

Calculates the trace of an array, the sum of the diagonal elements.

Syntax:

TRACE(a)

a

-

Optional. An array or series, defaults to the current Window.

Returns:

A real, the diagonal sum.

Example:

W1: {{1, 2, 3},

     {4, 5, 6}, 

     {7, 8, 9}} 

 

trace(w1) returns 15.

Remarks:

TRACE defaults to the current series if no input is supplied.

See Also:

DIAG

SUM