I have written the following code:

\mathbb{R}^m\times\cdots\times\mathbb{R}^m \rightarrow \mathbb{R}\\
(v_1,\cdots,v_k)&\mapsto (f_*(v_1),\cdots,f_*(v_k))\mapsto

I am using & symbol two times..

I want output for (v_1,\cdots,v_k) to come under


and (f_*(v_1),\cdots,f_*(v_k)) to come under


and \eta(f_*(v_1),\cdots,f_*(v_k)) to come under


First two steps are coming perfectly, but


is not coming under


There is some gap. What am i supposed to do to clear this gap?

The following is what i have in my tex file

\textheight 9.3in \textwidth 6.5in \topmargin -1cm
\oddsidemargin-.05cm \evensidemargin -.1cm \topmargin .1cm

\mathbb{R}^n\times\cdots\times\mathbb{R}^n &\rightarrow     \mathbb{R}^m\times\cdots\times\mathbb{R}^m &\rightarrow \mathbb{R}\\
(v_1,\cdots,v_k) &\mapsto (f_*(v_1),\cdots,f_*(v_k)) &\mapsto \eta(f_*   (v_1),\cdots,f_*(v_k))
  • You need 2n-1 &'s, one for each alignment sets, and one between each alignment. BTW: On this site we prefer users to post full minimal examples including document class and preamble. It makes it a lot easier to help. BTW2: replace ,\cdots, with ,\dots, – daleif Feb 5 '16 at 8:01
  • @daleif I have edited it.. Please see if you can help me with this – kk lm Feb 5 '16 at 8:15
  • 1
    First of, it might be a good idea to look at your own code. It does not even compile. – daleif Feb 5 '16 at 8:17
  • Now it works... :) – kk lm Feb 5 '16 at 8:22

I'd use a different construction, and I'd not even align them because of the vast size difference.


& \rightarrow
&& \to \mathbb{R}
 (v_1,\dots,v_k)&\mapsto (f_*(v_1),\dots,f_*(v_k))
 &&\mapsto \eta(f_ (v_1),\dots,f_*(v_k))

 \to \mathbb{R}
 (v_1,\dots,v_k)\mapsto (f_*(v_1),\dots,f_*(v_k))
\mapsto \eta(f_ (v_1),\dots,f_*(v_k))


enter image description here

  • Ok, so it is not possible to get that third arrow right above third arrow that is below due to size difference.. – kk lm Feb 5 '16 at 8:24
  • I can not upvote as i do not have 15 reputation... Once i get that i will do upvote your answer – kk lm Feb 5 '16 at 8:29
  • @kklm in the first part of the image the two arrows are above each other, but it looks strange – daleif Feb 5 '16 at 8:47
  • Updated with a fix of the wrongly used \cdots – daleif Feb 5 '16 at 8:49

For the utmost in flexibility and programmability, you may want to set up an array environment to display the two rows. The following code right-aligns the material in the first group, centers the material in the middle group, and left-aligns the material in the final group; the \rightarrow and \mapsto symbols are center-set in columns of type C.

\usepackage{array} % for "\newcolumntype" macro
\begin{array}{ rCcCl }
  \R^n\times\dots\times\R^n & \rightarrow &
     \R^m\times\dots\times\R^m & \rightarrow & \R \\
  (v_1,\dots,v_k) & \mapsto & 
     \bigl(f_*(v_1),\dots,f_*(v_k)\bigr) & \mapsto & 
     \eta\bigl(f_*(v_1),\dots,f_*(v_k)\bigr) \\

If you'd like to center-set the material in all three groups instead, simply replace \begin{array}{ rCcCl } with \begin{array}{ cCcCc }.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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