Scheme for solving Laplace's (Poisson's) equation
If we isolate on the left-hand side the unknown quantities \( u_{11} \), \( u_{12} \), \( u_{21} \) and \( u_{22} \), that is
the inner points not constrained by the boundary conditions, we can
rewrite the above equations as a matrix \( \mathbf{A} \) times an unknown vector \( \mathbf{x} \), that is
$$
\begin{equation*}
Ax = b,
\end{equation*}
$$
or in more detail
$$
\begin{equation*}
\begin{bmatrix} 4&-1 &-1 &0 \\
-1& 4 &0 &-1 \\
-1& 0 &4 &-1 \\
0& -1 &-1 &4 \\
\end{bmatrix}\begin{bmatrix}
u_{11}\\
u_{12}\\
u_{21} \\
u_{22} \\
\end{bmatrix}=\begin{bmatrix}
u_{01}+u_{10}-\tilde{\rho}_{11}\\
u_{13}+u_{02}-\tilde{\rho}_{12}\\
u_{31}+u_{20}-\tilde{\rho}_{21} \\
u_{32}+u_{23}-\tilde{\rho}_{22}\\
\end{bmatrix}.
\end{equation*}
$$