I need to use the Gauss Seidel iterative method to solve the linear equations $\left\{\begin{array}{l} 8 x_{1}-3 x_{2}+2 x_{3}=20 \\ 4 x_{1}+11 x_{2}-x_{3}=33 \\ 6 x_{1}+3 x_{2}+12 x_{3}=36 \end{array}\right.$ .
(*GaussSedel iterative method*)
X[0] = {0, 0, 0};
b = {20, 33, 36};
A = ( {
{8, -3, 2},
{4, 11, -1},
{6, 3, 12}
} );
DI = DiagonalMatrix@Diagonal[A];
L = LowerTriangularize[-A, -1];
U = UpperTriangularize[-A, 1];
B = IdentityMatrix[3] - Inverse[DI - L].A;
G = Inverse[DI - L].U
f = Inverse[DI - L].b
But the above code can only get the iteration formula in the form of $\left(\begin{array}{c} x 1[k+1] \\ x 2[k+1] \\ x 3[k+1] \end{array}\right)=\left(\begin{array}{ccc} 0 & \frac{3}{8} & -\frac{1}{4} \\ 0 & -\frac{3}{22} & \frac{2}{11} \\ 0 & -\frac{27}{176} & \frac{7}{88} \end{array}\right) \cdot\left(\begin{array}{c} x 1[k] \\ x 2[k] \\ x 3[k] \end{array}\right)+f^T$.
But the reference answer is in the form of (the main difference is that the corner mark k+1
gradually appears in the iteration formula on the right) $\left\{\begin{array}{l}
x_{1}^{(k+1)}=\left(20+3 x_{2}^{(k)}-2 x_{3}^{(k)}\right) / 8 \\
x_{2}^{(k+1)}=\left(33-4 x_{1}^{(k+1)}+x_{3}^{(k)}\right) / 11, \quad k=0,1, \cdots \\
x_{3}^{(k+1)}=\left(36-6 x_{1}^{(k+1)}-3 x_{2}^{(k+1)}\right) / 12
\end{array}\right.$.
I want to know what I can do to get an iterative formula like the reference answer.
$$\left(\begin{array}{c} x 1[k+1] \\ x 2[k+1] \\ x 3[k+1] \end{array}\right)= \text { MapThread }\left[\text { Dot },\left\{\left(\begin{array}{ccc} 0 & \frac{3}{8} & -\frac{1}{4} \\ -\frac{4}{11} & 0 & \frac{1}{11} \\ -\frac{1}{2} & -\frac{1}{4} & 0 \end{array}\right) ,\left(\begin{array}{ccc} 0 & x 2[k] & x 3[k] \\ x 1[k+1] & 0 & x 3[k+1] \\ x 1[k+1] & x 2[k+1] & \theta \end{array}\right)\right\}\right]+\left(\begin{array}{c} \frac{2 \theta}{8} \\ 3 \\ 3 \end{array}\right)$$
Note: the example used is from page 189 of this book.