Matrix<T>.Trace Method

Gets the sum of the diagonal elements of this matrix.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public virtual T Trace()

Return Value

T
The sum of the diagonal elements of this Matrix<T>.

Remarks

The sum of the diagonal elements of a matrix is called the trace of the matrix.

See Also