folks! Sorry if this question has already been asked and answered, but I googled so hard I just can't find the right answer.
I learned how to write a matrix with a breaking line, using the array:
\left[ \begin{array}{ccc;{2pt/2pt}c} 1 & 2 & 3 & -2 \\
0 & 5 & 10 & -5 \\
3 & 4 & 5 & 0
\end{array} \right]
The result is this:
Now, I would like to write down the matrix transformations on this type of matrix. By searching some of the answered questions on this website, I found that the best solution would be this:
\begin{gmatrix}[b]
1 & 2 & \BAR & 3 \\
4 & 5 & \BAR & 6 \\
7 & 8 & \BAR & 9
\rowops
\swap{0}{1}
\mult{0}{\cdot 7}
\add[5]{1}{2}
\end{gmatrix}
To make this work, it is necessary to add \usepackage{gauss}
as well as
\newcommand{\BAR}{%
\hspace{-\arraycolsep}%
\strut\vrule
\hspace{-\arraycolsep}%
}
The outcome depends on the enviroment that I am using. If I write down the matrix by using $$ $$
, I get the full line, while it breaks within \begin{align*} \end{align*}
. In respective order, the outcomes are
My goal is to keep matrix transformations, but instead of complete vertical line to have a broken line, just like in the first matrix of this post. Is that possible by keeping the commands from gauss package? If not, what is the best and the simplest solution to this?
Bonus question, if I happen to need it (or in case all of this is impossible to make): how to keep a vertical line in one piece by using \begin{align*} \end{align*}
? Do I really need to change the environment for these matrices (I need it to write matrices in more than one line and having lines aligned the way I want)?
Thank you so much in advance! I truly hope someone has a simple answer to this.