Back to Linear Algebra
trace
Sum of diagonal elements
Syntax
t = trace(A)
Description
Returns the sum of the elements on the main diagonal of a matrix.
Parameters
| Name | Description |
|---|---|
| A | Input matrix |
Returns
Scalar trace value