2

I would like to have an equation for an equivalence where the left-hand side is centered and the right-hand side is spaced over multiple lines. Researching this so far only lead me to the answer on how to split up a regular equation in general.

How can I split an equation over two (or more) lines

what I am looking for is something like this

only right-hand side is stretched over to lines

or with curly brackets that span two lines like so

enter image description here

How could I do this? Thank you

lpnorm
  • 123
  • 4

1 Answers1

3

For the first problem, I suggest you employ an alignedat environment; for the second, I suggest you employ a cases environment. Both environments are provided by the amsmath package.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for '\coloneqq' macro and access to the 'amsmath' package
\begin{document}
\[
x\in G \quad \iff \quad
\begin{alignedat}{2}
&g_i(x)\le0 \quad &&\text{ for } i\in I \coloneqq \{1,\dots,m\},\\
&h_j(x)=0   \quad &&\text{ for } j\in J \coloneqq \{1,\dots,p\}.
\end{alignedat}
\]

[ \mathbf{1}_A(x) \coloneqq \begin{cases} 1 & \text{if $x\in A$,} \ 0 & \text{if $x\notin A$.} \end{cases} ] \end{document}

Mico
  • 506,678