Skip to main content

TRACE

Returns the trace of a square matrix (sum of diagonal elements).

Aliases: TR

CategoryMatrix
SyntaxTRACE(matrix)

Parameters

ParameterRequiredDescription
matrixRequiredA square matrix.

Example

TRACE([1, 2; 3, 4])

Auto-generated from the EngCanvas function registry.