Chapter 2: Operations with Matrices
- §1. Matrix Addition
- §2. Scalar Multiplication
- §3. Matrix Multiplication
- §4. Transpose
- §5. Hermitian Adjoint
- §6. Trace
- §7. Determinants
- §8. Inverses
- §9. Bra-Ket Notation
Trace
The trace of a matrix is just the sum of all of its diagonal elements. In terms of components, $$\mathrm{tr}(A)=\sum_i A_{ii}.$$ For example, if $$A=\left(\begin{array}{ccc} 1&2&3\\ 4&5&6\\ 7&8&9\\ \end{array}\right) $$ then $$\mathrm{tr}(A)=1+5+9=15.$$
Try it for yourself by computing $$\mathrm{tr}\left(\begin{array}{ccc} 1&34&5\\ 23&5&98\\ 132&7&9\\ \end{array} \right).$$