User:IssaRice/Linear algebra/Trace of matrix equals sum of eigenvalues

From Machinelearning
Revision as of 04:59, 6 February 2021 by IssaRice (talk | contribs)

This is chapter 4 exercise 1.11 in Linear Algebra Done Wrong (p. 105).

Theorem. Let A be a matrix. Then traceA=λ1+⋯+λn, where λ1,…,λn are the eigenvalues of A (counting multiplicities).

Proof. We already know that det(A−λI)=(λ1−λ)⋯(λn−λ). Multiplying out the right hand side, the λn−1 term is λ1(−λ)n−1+λ2(−λ)n−1+⋯+λn(−λ)n−1=(λ1+⋯+λn)(−1)n−1λn−1.

Now consider equation 4.2 from the book (p. 89):

detA=∑σ∈Perm(n)aσ(1),1aσ(2),2⋯aσ(n),nsign(σ)

The matrix A−λI has the form:

(a1,1−λ*⋱an,n−λ)

Taking the identity permutation we get the term (a1,1−λ)⋯(an,n−λ). All the rest of the permutations correspond to terms that can take at most n−2 of the elements along the diagonal, so will result in a term (when multiplied out) that will have degree at most n−2 (why n−2 rather than n−1? because if we pick row k in column j!=k (i.e. not a diagonal element), then we can't take row k in any of the other columns including in column k, since a permutation can take at most one element from each row).

So we can write det(A−λI)=(a1,1−λ)⋯(an,n−λ)+q(λ), where q(λ) has degree at most n−2.

Now if we look at the λn−1 term in (a1,1−λ)⋯(an,n−λ)+q(λ) we get (a1,1+⋯+an,n)(−1)n−1λn−1. This means that λ1+⋯+λn=a1,1+⋯+an,n=traceA as required.

See also