Solving a linear system using the Gauss-Seidel iteration method: gauss_seidel_linsolve

### 6.56.8 Solving a linear system using the Gauss-Seidel iteration method: gauss_seidel_linsolve

The gauss_seidel_linsolve command finds the solution of a linear system of equations using the Gauss-Seidel method.

- gauss_seidel_linsolve command takes two mandatory arguments and three optional arguments (including an optional first argument):
  - Optionally, ω, used for a general form of the Gauss-Seidel method (the successive overrelaxation method) (by default, ω=1).
  - A, the matrix of coefficients of a system.
  - b, the right hand side of the system as a list.
  - Optionally, є, a positive number indicating the error tolerance (by default є=epsilon, see Section 3.5.7, item 9).
  - Optionally, m, an integer indicating the maximum number of iterations (by default m=maxiter, see Section 3.5.7, item 6).
  gauss_seidel_linsolve(A,b ⟨ є,m ⟩) returns the solution of the system.

Examples.

- Input:
  A:=[[100,2],[2,100]];
  gauss_seidel_linsolve(A,[0,1],1e-12);
  Output:

  ⎡ ⎣ | −0.000200080032013,0.0100040016006 | ⎤ ⎦

- Input:
  gauss_seidel_linsolve (1.5, A, [0,1], 1e-12);
  Output:

  ⎡ ⎣ | −0.000200080032218,0.0100040016006 | ⎤ ⎦