Given is a linear system of the form
\begin{pmatrix}A & B & C & \bigl | &M \\
R & D & E & \bigl | &N \\
S & F & G & \bigl | &L
\end{pmatrix}
with the unique solution
\begin{pmatrix} {\color{red}X} \\
{\color{blue}Y} \\ Z \end{pmatrix}
.
Determine the entries
\color{red} X
=
X
\color{blue} Y
=
Y
Z
=
Z
In the first step toward row echelon form, we must generate
\begin{pmatrix}A & B & C & \bigl | &M \\
\boxed{R} & D & E & \bigl | &N \\
\boxed{S} & F & G & \bigl | &L
\end{pmatrix}
\fbox{\text{a zero}}
respectively.
This is achieved by replacing the {2nd row} with
negParens(R) \; \cdot
{1. row} - A \; \cdot
{2. row}
and replacing the {3rd row} with
negParens(S) \; \cdot
{1. row} - A \; \cdot
{3. row}.
This results into
\begin{pmatrix}A & B & C & \bigl | &M \\
\boxed{0} & B*R-D*A & C*R-E*A & \bigl | &M*R-A*N \\
\boxed{0} & B*S-F*A & C*S-G*A & \bigl | &M*S-A*L
\end{pmatrix}
.
For the row echelon form, we must further get \fbox{\text{a zero}}
in
\begin{pmatrix}A & B & C & \bigl | &M \\
0 & B*R-D*A & C*R-E*A & \bigl | &M*R-A*N \\
0 & \boxed{FF} & GG & \bigl | & LL
\end{pmatrix}
.
This is managed by replacing the {3rd row} with
negParens(FF) \; \cdot
{2. row} - DD \; \cdot
{3. row}.
This results into
\begin{pmatrix}A & B & C & \bigl | &M \\
0 & DD & EE & \bigl | &NN \\
0 & \boxed{0} & FF*EE-DD*GG & \bigl | &FF*NN-DD*LL
\end{pmatrix}
and thus Z = Z
.
The second row
DD Y + EE Z = NN
rearranged
DD Y = NN - EE Z
und Z = Z
substituting gives {\color{blue}Y = Y}
.
Using these two values Z = Z
und {\color{blue} Y =
Y}
in the first row
A X + B Y + C Z = M
rearranged
A {\color{red}X} = M - B {\color{blue}Y} - C Z
is eventually
{\color{red}X = X}
.