mml-book / mml-book.github.io

Companion webpage to the book "Mathematics For Machine Learning"
12.71k stars 2.36k forks source link

Problem 4.8 Signs #775

Open pphuo001 opened 3 months ago

pphuo001 commented 3 months ago

In the textbook solution manual, problem 4.8, page 45, I think the sign needs to change for the center eigenvector for the eigenvalue of 9. I believe for the eigenvalue of 9, we get the eigenvector [1, -1, 4].

(A^T)A = [13 12 2, 12 13 -2, 2 -2 8]

det( [13-λ 12 2, 12 13-λ -2, 2 -2 8-λ]) = (-λ^3)+(34λ^2)-225λ=0 λ = 0 or λ = 9 or λ = 25

For λ = 9: A-λI: [13 12 2, 12 13 -2, 2 -2 8]-9[1 0 0, 0 1 0, 0 0 1] = [4 12 2, 12 14 -2, 2 -2 -1] With RREF, we get [1 0 -1/4, 0 1 1/4, 0 0 0]. (A-9I)[x,y,z] = [1 0 -1/4, 0 1 1/4, 0 0 0] [x, y, z] = [0, 0, 0] x - z/4 =0 y + z/4 = 0 Let z = 4, gives us [1 -1 4].

In constructing V: w_2 =[1 -1 4] ||w_2|| = 3sqrt(2) so v_2 should be [1/(3sqrt(2)), -1/(3sqrt(2)), 4/(3sqrt(2))]

The textbook solution manual has V as [1/sqrt(2) -1/(3sqrt(2)) -2/3, 1/sqrt(2) 1/(3sqrt(2)) 2/3, 0 -2sqrt(2)/3 1/3].

My proposed V is [1/sqrt(2) 1/(3sqrt(2)) -2/3, 1/sqrt(2) -1/(3sqrt(2)) 2/3, 0 2sqrt(2)/3 1/3] because I think the signs are reversed.

Let me know if I'm incorrect.

pphuo001 commented 3 months ago

Also, I believe that U should be changed to [1/sqrt(2) 1/sqrt(2), 1/sqrt(2) -1/sqrt(2)]