>[!info] **Trace** of a square matrix $\mathbf{A}\in F^{n \times n}$
>For square [[Matrices|matrices]], we can define the trace as the sum of its main diagonal $\text{tr}(\mathbf{A})=\sum\limits_{i=1}^{n}a_{ii},$resulting in a **linear mapping**. It can be shown that the trace is equal to the sum of a matrices [[Eigenvalue Problem|eigenvalues]] $\text{tr}(\mathbf{A})=\sum\limits_{i=1}^{n}\lambda_i.$
| Name | Property | Remarks |
| -------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ---------------------------------------- |
| Linearity | $\begin{align}\text{tr}(\mathbf{A}+\mathbf{B})&=\text{tr}(\mathbf{A})+\text{tr}(\mathbf{B}) \\ \text{tr}(c\mathbf{A})&=c \cdot \text{tr}(\mathbf{A})\end{align}$ | |
| [[Matrix Similarity\|Similarity Inequality]] | $\text{tr}(\mathbf{PAP}^{-1})=\text{tr}(\mathbf{A})$ | |
| Symmetry | $\operatorname{tr}\left(\mathbf{A}^\mathsf{T}\mathbf{B}\right)=\operatorname{tr}\left(\mathbf{A}\mathbf{B}^\mathsf{T}\right) =\operatorname{tr}\left(\mathbf{B}^\mathsf{T}\mathbf{A}\right) =\operatorname{tr}\left(\mathbf{B}\mathbf{A}^\mathsf{T}\right)$ | $\mathbf{A,B}\in F^{m\times n}$ |
| Equality of outer and inner product | $\text{tr}(\mathbf{ba}^\top)=\text{tr}(\mathbf{ab}^\top).$ | $\mathbf{a,b}\in \mathbb{R}^n$ |
| Cyclic Property | $\text{tr}(\mathbf{ABC})=\text{tr}(\mathbf{CBA})=\text{tr}(\mathbf{BAC}),$ | Product of the matrices has to be square |
| Relation to [[Norms\|Frobenius Norm]] | $\|\|\mathbf{A}\|\|_{F}^{2}=\text{tr}(\mathbf{A}^{H}\mathbf{A})$ | |
>[!brainwaves] Intuition
>Can be seen as a summary of a [[Linear Maps and Operators|linear]] [[Maps and Induced Structures - Functions, Pushforwards and Pullbacks|transformation]], especially since it is **invariant to [[Matrix Similarity|similarity]]**, which is an [[Equivalence Relation and Class|equivilance relation]] for transformations. This gives us a notion of an **[[Vector Space|inner product]] on the [[Space]] of matrices**. By transposing one matrix, we are taking inner product of all the columns of the transformation with each other and then summarize the result using the trace.
>The inner product / the trace is zero, if the matrices project vectors onto orthogonal sub-spaces, while matrices with similar transformation properties yield large traces.