mandli / intro-numerical-methods

Jupyter notebooks and other materials developed for the Columbia course APMA 4300
Creative Commons Attribution 4.0 International
278 stars 398 forks source link

Mistake and typoes in Backward Substitution, Solving Ax=b, 15_LA_gaussian #16

Closed yeejoh closed 8 years ago

yeejoh commented 8 years ago

In Backward Substitution, Solving Ax=b, 15_LA_gaussian, it writes:

Backwards substitution requires us to move from the last row of $U$ and move upwards. We can consider again the general $i$th row with $$ U_{i,i} xi + U{i,i-1} x{i-1} + \ldots + U{i,m-1} x{m-1} + U{i,m} x_m = y_i $$ noting that we are using the fact that the matrix $L$ has 1 on its diagonal. We can now solve for $y_i$ as $$ xi = \frac{1}{U{i,i}} \left( yi - ( U{i,i-1} x{i-1} + \ldots + U{i,m-1} x{m-1} + U{i,m} x_m) \right ) $$

  1. Both equations have index mistake ($U{i,i-1} x{i-1}$), which should be $$U_{i,i} xi + U{i,i+1} x{i+1} + \ldots + U{i,m-1} x{m-1} + U{i,m} x_m = y_i$$, $$xi = \frac{1}{U{i,i}} \left( yi - ( U{i,i+1} x{i+1} + \ldots + U{i,m-1} x{m-1} + U{i,m} x_m) \right )$$.
  2. Matrix $L$ has nothing to do with backwards substitution. Noting that the matrix $L$ has 1 on its diagonal is unnecessary.
  3. The second sentence of ones between two equations should be

We can now solve for $x_i$ as ...

mandli commented 8 years ago

Thanks, (1) has been fixed and (2) and (3) was clearly a copy-paste error (I should have proof read).

mandli commented 8 years ago

This has been addressed now in commit https://github.com/mandli/intro-numerical-methods/commit/74378de11c3146b1999e55a8f6a68768dd0113f9#diff-7cf2daec2ce73ce6343d2c99819e2a16