4

I have a small system of equations which should be displayed like the following:

enter image description here

I tried to display this with \left. and \right\vert. But this didn't work as expected:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \begin{equation*}
        \left.
            x^2-y+2=0 \\
            y^2-11y-6x+18=0
        \right\vert
    \end{equation*}
\end{document}

This try resulted in the following:

enter image description here

I think that\left and \right\vert is not made for such things but I didn't knew any better. The equations should be aligned too, but I already struggled with these vertical bars. I get no compilation errors. I already tried with the systeme package but didn't get it to work as well.

2
  • Do you come from some forbidden planet? 😊
    – egreg
    Apr 14 at 21:59
  • I think you mean \left\vert rather than \left., or, better, \left\lvert and \right\rvert. Apr 14 at 22:37

2 Answers 2

5

The systeme package is for linear systems.

You want aligned.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
  \left|
  \begin{aligned}
    x^2-y+2&=0 \\
    y^2-11y-6x+18&=0
  \end{aligned}
  \right|
\end{equation*}

\end{document}

enter image description here

With some space between the bars and the equations:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
  \left|\;
  \begin{aligned}
    x^2-y+2&=0 \\
    y^2-11y-6x+18&=0
  \end{aligned}
  \;\right|
\end{equation*}

\end{document}

enter image description here

I'd use left alignment, though.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
  \left|\;
  \begin{aligned}
    & x^2-y+2=0 \\
    & y^2-11y-6x+18=0
  \end{aligned}
  \;\right|
\end{equation*}

\end{document}

enter image description here

1
  • Thank you for your answer. This is a very understandable approach for me! Apr 14 at 22:01
2

Here are two possible solutions (there must be many more...). The first employs an aligned environment inside \left\lvert ... \right\rvert, the other uses a vmatrix* environment. The first solution renders its material in \displaystyle math mode, the second employ \textstyle math mode as well as tighter line spacing. I wouldn't say one approach is necessarily better than the other. It'll depend on the use case.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for 'vmatrix*' env.

\begin{document}

\begin{gather*}
   \left\lvert \begin{aligned}
       x^2-y+2&=0 \\
       y^2-11y-6x+18&=0
   \end{aligned} \right\rvert \\[5mm]
   \begin{vmatrix*}[r]
       x^2-y+2=0 \\
       y^2-11y-6x+18=0   
   \end{vmatrix*}
\end{gather*}

\end{document}

You must log in to answer this question.

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