Scheme for solving Laplace's (Poisson's) equation using Jacobi's iterative method
In setting up for example Jacobi's method, it is useful to rewrite the matrix
\mathbf{A} as
\begin{equation*}
\mathbf{A}=\mathbf{D}+\mathbf{U}+\mathbf{L},
\end{equation*}
with
\mathbf{D} being a diagonal matrix with
4 as the only value,
\mathbf{U} is an upper triangular matrix and
\mathbf{L}
a lower triangular matrix. In our case we have
\begin{equation*}
\mathbf{D}=\begin{bmatrix}4&0 &0 &0 \\
0& 4 &0 &0 \\
0& 0 &4 &0 \\
0& 0 &0 &4 \\
\end{bmatrix},
\end{equation*}
and
\begin{equation*}
\mathbf{L}=\begin{bmatrix} 0&0 &0 &0 \\
-1& 0 &0 &0 \\
-1& 0 &0 &0 \\
0& -1 &-1 &0 \\
\end{bmatrix} \hspace{1cm} \mathbf{U}= \begin{bmatrix}
0&-1 &-1 &0 \\
0& 0 &0 &-1 \\
0& 0 &0 &-1 \\
0& 0 &0 &0 \\
\end{bmatrix}.
\end{equation*}