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}
Simeon Simeonov
  • 819
  • 5
  • 11
  • 3
    \documentclass{article} \usepackage{amsmath} \begin{document} $ \left| \begin{matrix} \alpha & -& \beta =180\\ \alpha & +&\beta =68 \end{matrix}\right.$ \end{document}? –  Feb 09 '19 at 18:09
  • Well that was scary fast. It works good. – Simeon Simeonov Feb 09 '19 at 18:12
  • 5
    Slow marmots get caught by the eagles. ;-) –  Feb 09 '19 at 18:13
  • 1
    @marmot it is better to run, dear marmot!! ^-^ – manooooh Feb 09 '19 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. –  Feb 10 '19 at 08:24
  • @JoshDetwiler You are right. I edited it. – Simeon Simeonov Feb 10 '19 at 20:31

3 Answers3

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.

egreg
  • 1,121,712
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}
T. Pluess
  • 1,040
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