In How to type this arrow is MathStack Exchange and its duplicate target, a few ways are provided to typeset a horizontal extensible arrow.

$$\Large\rlap{\color{blue}{\underset{(0,0)}{\times}}}{\;\;\:\xrightarrow[\bf i]{\hspace{5em}}{\!\!\!\!\!\!\!\!\color{blue}{\underset{(1,0)}{\times}}}}$$

How can we typeset vertical arrows?

In MathJax basic tutorial and quick reference, there's no guidance on extensible horizontal arrow \xrightarrow, but the section Markov Chains included a commutative diagram that makes use of this command.

The command


suggested in


looks bad.



2 Answers 2


How about

\color{blue}{\times\, (0,1)}\\[-4pt]
\kern1px \left\uparrow\vcenter{\rule{0pt}{7em}}\rlap{\,\mathbf{j}}\right.\\[-4pt]
\color{blue}{\times\, (0,0)}

which gives

$$ \begin{array}{l} \color{blue}{\times\, (0,1)}\\[-4pt] \kern1px \left\uparrow\vcenter{\rule{0pt}{7em}}\rlap{\,\mathbf{j}}\right.\\[-4pt] \color{blue}{\times\, (0,0)} \end{array} $$


Finally I resort to the crappy solution, with a few tweaks.

$$\raise{45pt}{\rlap{\raise{8pt}{\color{blue}{\times (1,0)}}}{\Large\wedge}} \hspace{-20pt} \begin{array}{c|c} &\\\\[1.5em] \phantom{\bf j}&{\bf j} \\\\[1.5em]&\end{array} \hspace{-18pt} \raise{-50pt}{\color{blue}{\times (0,0)}}$$

  • I got the values 45pt, -20pt, etc by trial and error.
  • Despite the possibility of changing vertical space by \\[...], as revealed in Does MathJaX have a command to stretch or reduce vertical space?, that doesn't work with negative dimensions.
  • As a result, I have to put them "on the same line", then use \raise{dim}{...} and \hspace{...} to control the spacing.
  • I'm using the middle line separating a "two-column array" as the arrow body. The two \\[...] controls the height of the arrow. The ampersands & near the start and the end of the array environment keep the position of the arrow label in the middle.
  • In the middle of the array environment, we have \phantom{...} & ..., so that on the left, we reserve the same horizontal spacing as on the right without displaying the content.

You must log in to answer this question.

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