39. Trace

The trace of a square matrix 𝐴 is the sum of its main diagonal entries:

tr(𝐴)=𝑖=1𝑛𝑎𝑖𝑖
Example
𝐴=[271035468]tr(𝐴)=2+(3)+8=7

39.1. Properties

39.2. Trace as inner product

For matrices, the Frobenius inner product is defined via the trace:

𝐴,𝐵𝐹=tr(𝐴𝑇𝐵)=𝑖,𝑗𝐴𝑖𝑗𝐵𝑖𝑗

It induces the Frobenius norm 𝐴𝐹=tr(𝐴𝑇𝐴).

39.3. Where it shows up