[General boards] [Winter 2023 courses] [Fall 2022 courses] [Summer 2022 courses] [Older or newer terms]

A2 latex help

I’m trying to GE like in lecture/tutorial for question 2 but can’t figure out how to add the additional lines to indicate the lower triangular values of L. I found a few ways online but they use different packages aside from array in example.txt (namely nicematrix from this post matrices - Reduce a matrix to row echelon form: - TeX - LaTeX Stack Exchange). Could you please let me know how to draw the lines, or can I use other packages and potentialy cite my sources?

Here is some latex code from tut04 (first page).

Before begin{document}

\newcommand{\mc}{\multicolumn}

Inside begin{document}
\begin{eqnarray*}
A =
\left(\begin{array}{rrr}
2 & 3 &-6\
1 &-6 & 8\
3 &-2 & 1
\end{array}\right)

\xrightarrow[\mbox{\small{$k=1$}}]{\mbox{\small{elim}}}

\left(\begin{array}{rrr}
2 & 3 &-6\
\cline{1-1}
\mc{1}{r|}{\frac{1}{2}} &-6-\frac{3}{2} & 8+\frac{6}{2} \
\mc{1}{r|}{\frac{3}{2}} &-2-\frac{3\cdot 3}{2} & 1 + \frac{3\cdot 6}{2}
\end{array}\right)

\left(\begin{array}{rrr}
2 & 3 &-6\
\cline{1-1}
\mc{1}{r|}{\frac{1}{2}} &-\frac{15}{2} & 11 \
\mc{1}{r|}{\frac{3}{2}} &-\frac{13}{2} & 10
\end{array}\right)\

\xrightarrow[\mbox{\small{$k=2$}}]{\mbox{\small{elim}}}

\left(\begin{array}{rrr}
2 & 3 &-6\
\cline{1-1}
\mc{1}{r|}{\frac{1}{2}} &-\frac{15}{2} & 11 \
\cline{2-2}
\frac{3}{2} & \mc{1}{r|}{\frac{13}{15}} & 10 - \frac{13}{15}\cdot 11
\end{array}\right)

\left(\begin{array}{rrr}
2 & 3 &-6\
\cline{1-1}
\mc{1}{r|}{\frac{1}{2}} &-\frac{15}{2} & 11 \
\cline{2-2}
\frac{3}{2} & \mc{1}{r|}{\frac{13}{15}} & \frac{7}{15}
\end{array}\right),
\end{eqnarray*}

Let me know if it works.

Thank you!

  [General boards] [Winter 2023 courses] [Fall 2022 courses] [Summer 2022 courses] [Older or newer terms]