Celeb Glow
updates | April 07, 2026

Trace of vectors

$\begingroup$

Does that sound about right?

Given that x is $m\times 1$ and y is $m\times 1$ vectors, show that $ tr(\mathbf{xy'})=\mathbf{x'y}$.

Attempt: By using the property of $tr(\mathbf{A'})=tr(\mathbf{A})$,

$tr[\mathbf{xy'}]=tr[(\mathbf{xy'})']$, which is $tr[\mathbf{x'y}]$. But $\mathbf{x'y}$ is a scalar $1\times1$. Thus, $tr[\mathbf{xy'}]=\mathbf{x'y}$.

$\endgroup$

1 Answer

$\begingroup$

I don't think what you want to do works. It is true that the trace preserves the transpose of a square matrix. But $xy'$ is an $m\times m$ matrix and you are saying that the transpose is $1\times1$?

What is at play here is the fact that $\text{Tr}(AB)=\text{Tr}(BA)$ even if $A$ and $B$ are not square. Indeed, if $A$ is $m\times n$ and $B$ is $n\times m$,$$ \text{Tr}(AB)=\sum_{k=1}^m(AB)_{kk}=\sum_{k=1}^m\sum_{j=1}^nA_{kj}B_{jk} =\sum_{j=1}^m\sum_{k=1}^nB_{jk}A_{kj} =\sum_{j=1}^n(BA)_{jj}=\text{Tr}(BA). $$

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy