1

I was trying to write this in latex
enter image description here

but I don't know how to to insert the arrow in the middle with the expressions below and above on it.

1
  • 1
    take a look at the amsmath documentation (texdoc amsmath) and look at section 4.9, "extensible arrows". Jun 14, 2015 at 16:07

2 Answers 2

12

Use \substack together with \xrightarrow:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{pmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{pmatrix}
\xrightarrow
 [% below
  \substack{a+cx+x^2\\s+x}
 ]
 {% above
  \substack{a+cx+x^2\\s+x}
 }
\begin{pmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{pmatrix}
\]

\end{document}

enter image description here

2

This is plain tex but comes nearer to what you want, if you really want it and not the better aligned version above.

$$
{{\atop\qquad}\atop\left(\matrix{
a&b&c\cr
a&b&c\cr
a&b&c\cr
}\right)}
{{x\atop y}\atop\overrightarrow{\matrix{\qquad a\qquad\cr b\cr}}}
{{\atop\qquad}\atop\left(\matrix{
a&b&c\cr
a&b&c\cr
a&b&c\cr
}\right)
}
$$
\vfill\bye

plain tex math

You must log in to answer this question.

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