# Ho to write the condition of a set in several lines?

I would like to initiate a set, divided into the left section for the contained elements, and the right section for description of the necessarily fulfilled condition, where the right part might contain more than one line.

In a concrete case, initiating the set

\{\langle x,y\rangle\vert x\in p^1_{ij}(\mathscr{H}),\Vert x\Vert =1, y\in p^1_{kl}(\mathscr{H}),\Vert y\Vert=1\}


I would like to put

y\in p^1_{kl}(\mathscr{H}),\Vert y\Vert=1\


into a new line. Could you give me a solution?

• Is this in an equation environment or just inline text? – user121799 Feb 25 '18 at 14:03
• I used the align environment. – user153906 Feb 25 '18 at 21:37

## 1 Answer

You can use aligned (or array):

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathrsfs}

\begin{document}

This is over two lines
\left\{ \langle x,y\rangle \;\middle|\; \begin{aligned} & x\in p^1_{ij}(\mathscr{H}),\lVert x\rVert =1,\\ & y\in p^1_{kl}(\mathscr{H}),\lVert y\rVert=1 \end{aligned} \right\}
and this is on the same line, which I find clearer
$$\{ \langle x,y\rangle \mid x\in p^1_{ij}(\mathscr{H}),\lVert x\rVert =1, y\in p^1_{kl}(\mathscr{H}),\lVert y\rVert=1 \}$$
or, as well,
$$\{ \langle x,y\rangle \mid x\in p^1_{ij}(\mathscr{H}), y\in p^1_{kl}(\mathscr{H}), \lVert x\rVert =1, \lVert y\rVert=1 \}$$

\end{document}


The command \vert is not good for the bar in set notation, use \mid instead. Also \Vert should be distinguished into \lVert and \rVert (similarly for the absolute value it's better \lvert...\rvert than |...|).

• Thanks, that helps me out with my stated problem. Now I want to equate to such sets, but put the second set into a second line. As the \\  -command does not work in the equation environment, and I want to use some command like &  for adjustion, I don't know how to get along. Could you help me out again? – user153906 Feb 25 '18 at 21:48
• @user153906 You should use align or similar environment. – egreg Feb 25 '18 at 21:50