About this code, I'd like to have left margin of NiceArray
is more spaced from first column.
Is it possible, thank you so much
\documentclass[table, svgnames]{book}
\usepackage{mathtools}
\usepackage{nicematrix}
\usepackage{stix}
\usepackage{tabularray}
\usepackage{xcolor}
\usepackage{hhline}
\usepackage{tikz}
\newcommand{\Tonde}[1]{\left(#1\right)}
\begin{document}
\begin{equation}
\left.\begin{NiceArray}{ccccc}%[margin]
1 & a^{(1)}_{12} & \cdots & a^{(1)}_{1n} & b^{(1)}_1\\
a^{(1)}_{21} & \Block[fill=Gold1,borders={top,left,right}]{3-3}{}
a^{(1)}_{22} & \cdots & a^{(1)}_{2n} &
\Block[fill=Gold1,borders={top,left}]{3-1}{}
b^{(1)}_2\\ \vdots & \vdots & \ddots & \vdots & \vdots\\
a^{(1)}_{n1} & a^{(1)}_{n2} & \cdots & a^{(1)}_{nn} & b_n^{(1)}
\CodeAfter \tikz \draw (1-|5) |- (2-|last); \tikz \draw (1-|1) |- (1-|last); \tikz \draw (1-|1) |- (last-|1);
\end{NiceArray}\right|\begin{array}{cccr}a^{(1)}_{1j}&=&a_{1j}\big/a_{11}&\forall j\in[2,n]\\b_1^{(1)}&=&b_1\big/a_{11}\\a_{ij}^{(1)}&=&a_{ij}-a_{i1}^{(1)}\cdot a_{1j }^{(1)}&\multirow{2}{*}{$\forall i,j\in [2,n]$}\\b_{i}^{(1)}&=&b_i-a_{i1}^{(1)} \cdot b_1^{(1)} \end{array}
\end{equation}
\end{document}
Best Answer
I offer two alternatives to the original (eq. 1).
The first (eq. 2) with expanded cells and the second (eq. 3) using only
nicematrix
(withoutmultirow
)UPDATE The last equation can also be written without using
tikz
.