
\subsection{\bf Mathematical and Pseudo Code Form of Gauss Seidel
Iteration Method}

\begin{slide}

\begin{tabbing}
\hspace{2em} Choose an initial guess $x^{(0)}$ to the solution $x$. \\
\hspace{2em} {\bf for} \= $k = 1$,2,$\ldots$ \\
\hspace{2em} \> {\bf for} \= $i = 1$,2,$\ldots$,$n$ \\
\hspace{2em} \> \> $\sigma = 0$ \\
\hspace{2em} \> \> {\bf for} \= $j=1$,2,$\ldots$,$i-1$ \\
\hspace{2em} \> \> \> $\sigma = \sigma + a_{i,j}\, x_j^{(k)}$ \\
\hspace{2em} \> \> {\bf end} \\
\hspace{2em} \> \> {\bf for} $j=i+1$,$\ldots$,$n$ \\
\hspace{2em} \> \> \> $\sigma = \sigma + a_{i,j}\, x_j^{(k-1)}$ \\
\hspace{2em} \> \> {\bf end} \\
\hspace{2em} \> \> $x_i^{(k)} = \left( b_i - \sigma \right)/a_{i,i}$ \\
\hspace{2em} \> {\bf end} \\
\hspace{2em} \> check convergence; continue if necessary \\
\hspace{2em} {\bf end} \\
\end{tabbing}

\begin{center}
Pseudo code for Gauss-Seidel Method
\end{center}
\end{slide}

