tr {lazy.symbolic} | R Documentation |
trace of the input matrix
Description
trace of the input matrix
Usage
tr(A)
Arguments
A |
Input square matrix or scalar |
Details
Can be used with a character matrix.
Value
trace of A
Examples
tr(demomat(2,2))
# Semi Symbolic Partitioned Matrix: Super Matrix with SMdim attributes
A=demomat(c(2,3),c(2,3),root="a")
Printb(A)
tr(A)
# Fully Symbolic Partitioned Matrix: No SMdim attribute but
# fullsymb attribute
Ap=demomat(2,2,root="A", fullsymb=1)
Printb(Ap)
tr(Ap)
[Package lazy.symbolic version 1.0.0.20250316 ]