3

Is there a way to remove the right vertical line in the following matrix?

Enter image description here

\documentclass{article}
 \usepackage{amsmath}
\begin{document}
   $    \begin{vmatrix} \alpha & -& \beta =180\\ \alpha & +&\beta =68
\end{vmatrix}$  
\end{document}
6
  • 3
    \documentclass{article} \usepackage{amsmath} \begin{document} $ \left| \begin{matrix} \alpha & -& \beta =180\\ \alpha & +&\beta =68 \end{matrix}\right.$ \end{document}?
    – user121799
    Feb 9, 2019 at 18:09
  • Well that was scary fast. It works good. Feb 9, 2019 at 18:12
  • 5
    Slow marmots get caught by the eagles. ;-)
    – user121799
    Feb 9, 2019 at 18:13
  • 1
    @marmot it is better to run, dear marmot!! ^-^
    – manooooh
    Feb 9, 2019 at 18:30
  • I think a mod should strengthen the title of the question to improve the quality of it being searchable. I’m sure this is inherently duplicate to something else already on TeX SE, but perhaps it’s salvageable as a necessary duplicate that mirrors another way of asking the question.
    – user132925
    Feb 10, 2019 at 8:24

3 Answers 3

8

You maybe want to use systeme, rather than a matrix for that, which makes for even easier input:

\documentclass{article}
\usepackage{amsmath}
\usepackage{systeme}

\begin{document}

\[
\systeme[\alpha\beta]{
  \alpha-\beta=180,
  \alpha+\beta=68
}
\]
\[
\sysdelim|.
\systeme[\alpha\beta]{
  \alpha-\beta=180,
  \alpha+\beta=68
}
\]
\[
\syssubstitute{{a}{\alpha}{b}{\beta}}
\systeme[\alpha\beta]{
  3\alpha -  \beta = 180,
   \alpha + 2\beta = 68
}
\]

\end{document}

The traditional grouping is done with a brace, but you can also use a vertical bar as shown. If you want that all your systems have a vertical bar, type the \sysdelim|. command in the preamble.

enter image description here

Latin letters need not be declared as variables in the optional argument to \systeme.

4
  • Why not cases environment? Btw thank you for showing us the systeme package!!
    – manooooh
    Feb 9, 2019 at 18:31
  • 1
    @manooooh Because \systeme ensures good alignment.
    – egreg
    Feb 9, 2019 at 18:56
  • 1
    @marmot Fixed..
    – egreg
    Feb 9, 2019 at 22:43
  • Systeme looks awesome, but the documentation is in French! Feb 11, 2019 at 9:42
5

It does work with matrix:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\left| \begin{matrix}
\alpha & -& \beta =180\\ \alpha & +&\beta =68
\end{matrix} \right.
\]

\end{document}
3

I would do

\documentclass{article} 
\usepackage{amsmath} 
\begin{document} 
$ \left| \begin{array}{@{}*{4}{c@{\,}}l} 
\alpha & -& \beta &=&180\\ 
\alpha & +&\beta &=&68 
\end{array}\right.$ 
\end{document}

This is more effort, but avoids potential headaches like here, here and here.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .