R/mat.R
tr.Rd
Calculates and returns the trace of a square matrix.
tr(x)
A matrix that is square e.g. \(N \times N\)
matrix
A matrix with circles imprinted within its dimensions.
James Balamuta
# I_2 matrix tr(diag(2)) #> [1] 2