Trace
Tr(A) is only defined for a Square Matrix.
Given a square matrix A,
tr(A)=a11+a22+...+ann
Note that
tr(AB)=tr(BA)
Traces are just adding diagonals together
tr(T^)=n∑⟨n∣T^∣n⟩=n∑Tnn
Properties:
tr(A^B^)=tr(B^A^)tr(A^B^C^)=tr(B^C^A^)=tr(C^A^B^)
Note that tr(A^B^C^)=tr(A^C^B^) →
it must be cyclical permutation
tr(αA^+βB^)=αtr(A^)+βTr(B^)
Also note that if you get the traces of a 1×1 matrix, it is just
tr((a))=a