powered by
This function returns the trace of a given square numeric matrix.
matrix.trace(x)
A numeric value which is the sum of the values on the diagonal.
a matrix
Frederick Novomestky fnovomes@poly.edu
Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.
A <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE ) matrix.trace( A )
Run the code above in your browser using DataLab