[Math] Trace Eigenvalue Relation

convex optimizationlinear algebra

I am reading Boyd's Convex Optimization text, and I am looking at a relation between the trace and the eigenvalue of a matrix. It is on page 92, example 3.23, line 7.

The matrix $Y$ (apparently) has only one eigenvector $v$, $v^T v = 1$, and it (apparently) has only one eigenvalue $\lambda$. Also, $Y$ is not positive semidefinite, nor is it positive definite.

$$ tr(Y v v^T) = \lambda$$

Why is this so? I know the trace is equal to the sum of the eigenvalues.

Thanks.

Best Answer

Note that $Yv = \lambda v$, so you are trying to compute the trace of $\lambda vv^T$.

Let $$v = \left(\begin{array}{c}a_1\\a_2\\\vdots\\a_n\end{array}\right).$$ The relation $v^tv = 1$ tells you that $a_1^2+\cdots + a_n^2 = 1$.

The diagonal entries of $vv^T$ are precisely $a_1^2$, $a_2^2,\ldots,a_n^2$. So the diagonal entries of $\lambda vv^T$ are $\lambda a_1^2,\ldots,\lambda a_n^2$. Adding the diagonal entries to get the trace gives: $$\mathrm{Tr}(Yvv^t) = \mathrm{Tr}(\lambda vv^T) = \lambda\mathrm{Tr}(vv^T) = \lambda(a_1^2+\cdots+a_n^2) = \lambda$$ since $a_1^2+\cdots + a_n^2 = v^Tv = 1$.

Related Question