Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to get the following formula on two lines like this:

\begin{equation}
 W \in \mathbf{M}_N \rightarrow W' \in \mathbf{M}_{N+1}\\
(w_{ij})_{1\leq i,j\leq N} \mapsto (w_{ij})_{1\leq i,j\leq N+1}
\text{with} \left\{ \begin{array}{l}
w_{ij} = w_{ij} \quad \text{for} \; 1\leq i,j\leq N \\
w_{i,N+1} = w_{i,k}\\
w_{N+1,i} = w_{k,i}
\end{array} \right.
\end{equation}

I've read about align and align* environments, however I want something in between.

What I want is this thing to be numbered (and to be able to reference it) but only once, as one formula, and what the align environment does is number both lines seperatly (or not at all in align*)

What can I do to make this happen?

share|improve this question
    
Does this help? –  Sean Allred Apr 21 at 14:04

4 Answers 4

up vote 2 down vote accepted

While this is similar to @Bernard's, it seems to me the list of cases belong with the second line alone. The following numbers only the second line:

\documentclass[a4paper, 11pt]{book}
\usepackage{amsmath}
\begin{document}
\begin{align}
  W \in \mathbf{M}_N & \rightarrow W' \in \mathbf{M}_{N+1}
  \notag\\[-8pt]
  (w_{ij})_{1\leq i,j\leq N} & \mapsto (w_{ij})_{1\leq i,j\leq N+1}
  \text{ with }
    \begin{cases}
      w_{ij} = w_{ij} &\text{for } 1\leq i,j\leq N \\
      w_{i,N+1} = w_{i,k}\\
      w_{N+1,i} = w_{k,i}
    \end{cases}
\end{align}
\end{document} 

I've also adjusted some of the horizontal spacing of text (\text{ with }) and the vertical spacing between the lines. I've also left out the text{for} as it is implied anyway (and this leaves room for the equation number). But the key point is that align allows one to turn off numbering of select lines with \notag.

Another approach is to use aligned inside equation:

\documentclass[a4paper, 11pt]{book}
\usepackage{amsmath}
\begin{document}

\begin{equation}
\begin{aligned}
  W \in \mathbf{M}_N & \rightarrow W' \in \mathbf{M}_{N+1}\\[-8pt]
  (w_{ij})_{1\leq i,j\leq N} & \mapsto (w_{ij})_{1\leq i,j\leq N+1}
  \text{ with }
    \begin{cases}
      w_{ij} = w_{ij} & 1\leq i,j\leq N \\
      w_{i,N+1} = w_{i,k}\\
      w_{N+1,i} = w_{k,i}
    \end{cases}
\end{aligned}
\end{equation}
\end{document}

The lines of aligned are not numbered, but the equation as a whole is.

share|improve this answer

You could use the cases environment. See section 3.7 of the amsmath package documentation. Here I have split your equation in two so that it does not spill over the right margin.

\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
 W \in \mathbf{M}_N \rightarrow W' \in \mathbf{M}_{N+1}
(w_{ij})_{1\leq i,j\leq N} \mapsto (w_{ij})_{1\leq i,j\leq N+1}
\end{equation}
with
\begin{equation}
\begin{cases}
w_{ij} = w_{ij} & \text{for } \; 1\leq i,j\leq N \\
w_{i,N+1} = w_{i,k} &\\
w_{N+1,i} = w_{k,i} &
\end{cases}
\end{equation}

cases

share|improve this answer
    
I guess that the OP wants only one number. –  Sigur Apr 21 at 14:10
    
@Sigur Using equation* in one of the two places will handle that. –  Ethan Bolker Apr 21 at 14:17
    
Right. I was thinking about only one number vertical aligned. No problem. –  Sigur Apr 21 at 14:18

I realize that you specified you want to place the entire expression on two lines. However, I think the following form, which extends over five lines and uses a split environment inside an equation environment, may have some merit:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
 W \in \mathbf{M}_N &\rightarrow W' \in \mathbf{M}_{N+1}\\
(w_{ij})_{1\leq i,j\leq N} &\mapsto (w_{ij})_{1\leq i,j\leq N+1}\\[1ex]
\text{with}\qquad
w_{i,j}   &= w_{i,j} \text{ for $1\leq i,j\leq N$} \\
w_{i,N+1} &= w_{i,k}\\
w_{N+1,i} &= w_{k,i}
\end{split}
\end{equation}
\end{document}
share|improve this answer

Another solution, using alignat, aligned and cases:

\documentclass[a4paper, 11pt]{book}

\usepackage{amsmath}

\begin{document}

\begin{alignat}{2}
 & \begin{aligned}
  W \in \mathbf{M}_N & \longrightarrow W' \in \mathbf{M}_{N+1}\\[4pt]
  (w_{ij})_{1\leq i,j\leq N} & \longmapsto (w_{ij})_{1\leq i,j\leq N+1}
\end{aligned}
  & \enspace \text{with}&
\ \begin{cases}
w_{ij} = w_{ij} \enspace \text{for} \; 1\leq i,j\leq N \\
w_{i,N+1} = w_{i,k}\\
w_{N+1,i} = w_{k,i}
\end{cases}
\end{alignat}

    \end{document} 

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.