mml-book / mml-book.github.io

Companion webpage to the book "Mathematics For Machine Learning"
13.04k stars 2.41k forks source link

Potential mistake in the Gram-Schmidt orthogonalization formula, page 89, Example 3.12, equation 3.71 #669

Open MislavJuric opened 3 years ago

MislavJuric commented 3 years ago

Describe the mistake The formula for the Gram-Schmidt orthogonalization (page 89, Example 3.12, equation 3.71) may be wrong.

Location

  1. version (bottom of page): Draft (2021-05-08)
  2. Chapter 3
  3. page 89
  4. line number/equation number 3.71

Proposed solution Instead of subtracting (u_1 (u_1)^T / ||u_1||^2) * b_2 from b_2, subtract (u_1 (b_2)^T / u_1) * u_1 from b_2, as indicated by this Wikipedia section (I adjusted the vector names so that they correspond to the ones in the Example in question).

Additional context I may be wrong here; hence the "potential mistake" in my title.

mpd37 commented 3 years ago

That looks identical to me (assuming you mean .. / ||u_1||^2 and not .. / u_1: (u_1 (u_1)^T / ||u_1||^2) b_2 = u_1 (u_1^Tb_2) / ||u_1||^2 = u_1 (b_2^T u_1) / || .||^2 = u_1 b_2^T / || .||^2 u_1