Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My teacher has a problem that asks me to iterate on Gauss-Seidel equations considering a maximum variation of 0.01. This means making the first iteration and get check if the max of each error is less that 1%?

err(x1) = (actual-guess)/actual = 100%
err(x2) = 100%
err = max(err(x1), err(x2))

Need another iteration because the err > than requested. Is this what it really means?


share|cite|improve this question
up vote 3 down vote accepted

Don't think so. In real life, you never know what the true answer to your problem is (call it $x^*$ for convenience). In practice, you use deviation from the previous iterate as a stopping criterion. So instead of computing error as $|x_n - x^*|$, use $|x_n - x_{n-1}|$.

share|cite|improve this answer
isn't the guess=x_n-1; and actual=x_n in my example? The difference is that in yours you don't divide by the actual=x_n – Totty.js Feb 21 '13 at 9:02
@Totty depending on the problem, you may want to use absolute error calculation (as in my answer) or relative error calculation (as you are suggesting, $|1 - x_n/x_{n-1}|$). Both are measures of how far the last step moved away from the previous one. The idea is, when convergence happens, iteration step size decreases... – gt6989b Feb 21 '13 at 15:27
but how do you find the real value? with another method? – Totty.js Feb 21 '13 at 20:11
@Totty You don't :). You never know what the real value is, otherwise why would you be engaged in a numerical procedure in the first place? – gt6989b Feb 21 '13 at 20:51
then how do you have the absolute error? From what I know absolute error is referred to the real value.. – Totty.js Feb 22 '13 at 17:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.