$\operatorname{Tr}A=\sum_ke_k’Ae_k, $ where $e_k$ are any orthonormal vectors.

linear algebramatricestrace

Let:

  • $n \in \mathbb{N}$
  • $A$ a matrix of size $(n,n)$
  • $e_k$ any orthonormal vector
    then :
    $$ \operatorname{Tr}A=\sum_{1 \leq k \leq n} e_k'Ae_k, $$
    The result is stated on this page and a closed result here.

My attempt :

  • Let $\mathcal{B}=(e_1 \dots e_n)$ be the initial basis (orthonormal) and $f$ the endomorphism represented by $A$ in $\mathcal{B}$.
  • $(v_1 \dots v_n)$ any orthonormal basis, there exists $P$ orthonormal : $Pe_i=v_i$
  • Let $1 \leq j \leq n$

$
\begin{align*}
f(e_j)&= \sum_{i=1}^{n} a_{i,j} \\
\langle f(e_j),(e_j)\rangle &=a_{j,j} \\
\sum_{j=1}^{n} \langle f(e_j),(e_j)\rangle &=\operatorname{Tr}A \\
\sum_{i=1}^{n} e_i' A e_i &=\operatorname{Tr}A\\
\operatorname{Tr}A&=\operatorname{Tr}(P'AP)=\sum_{i=1}^{n} e_i' P'AP e_i = \sum_{i=1}^{n} (Pe_i)'A(P e_i) = \sum_{i=1}^{n} v_i'Av_i \\
\end{align*}
$

Best Answer

You didn't really formulate a specific question, but I'm assuming you're asking for help to show the identity in question.

Let $\{e_k\}_{k=1}^n\subseteq\mathbb{R}^n$ be an orthonormal set of vectors, and let $A\in\mathbb{R}^n$. Define the matrix \begin{equation*} U = \begin{bmatrix} e_1 & e_2 & \cdots & e_n \end{bmatrix}. \end{equation*} Note that $U$ is an orthogonal matrix, i.e., $UU^\top = U^\top U = I_n$. Therefore, \begin{equation*} \text{tr}(A) = \text{tr}(AI_n) = \text{tr}(AUU^\top) = \text{tr}(U^\top A U) = \text{tr}\begin{bmatrix} e_1^\top \\ e_2^\top \\ \vdots \\ e_n^\top \end{bmatrix} A \begin{bmatrix} e_1 & e_2 & \cdots & e_n \end{bmatrix} = \text{tr}\begin{bmatrix} e_1^\top A e_1 & e_1^\top A e_2 & \cdots & e_1^\top Ae_n \\ e_2^\top Ae_1 & e_2^\top A e_2 & \cdots & e_2^\top A e_n \\ \vdots & \vdots & \ddots & \vdots \\ e_n^\top Ae_1 & e_n^\top A e_2 & \cdots & e_n^\top A e_n \end{bmatrix} = \sum_{k=1}^n e_k^\top A e_k. \end{equation*}

Related Question