
\subsection{Traces}

The trace of a matrix is the sum of its diagonal components.

\(Tr(M)=\sum_i^nm_{ii}\)

The trace of a matrix is equal to the sum of its eigenvectors.

Traces can be shown as the sum of inner products.

\(Tr(M)=\sum_i^ne_iMe^i\)


\subsection{Properties of traces}

Traces commute

\(Tr(AB)=Tr(BA)\)

Traces of \(1\times 1\) matrices are equal to their component.

\(Tr(M)=m_{11}\)

\subsection{Trace trick}

If we want to manipulate the scalar:

\(v^TMv\)

We can use properties of the trace.

\(v^TMv=Tr(v^TMv)\)

\(v^TMv=Tr([v^T][Mv])\)

\(v^TMv=Tr([Mv][v^T])\)

\(v^TMv=Tr(Mvv^T)\)

