# How to draw a commutative diagram on math.stackexchange.com? [duplicate]

I want to draw a rectangle commutative diagram, but I do not know how. The MathJax codes I find on the internet do not work here. I tried the following:

$\xymatrix \mathbb{Z}/p^n\mathbb{Z}\ar[r]^{\theta_{n+1,\alpha}} \ar[d] U_1/U_{n+1}\ar[d] \\ \mathbb{Z}/p^{n-1}\mathbb{Z} \ar[r]^{\theta_{n,\alpha}} \\ U_1/U_n$

• Older question: How to draw a commutative diagram? (You can find there link to the presheaf site. If you are used to xypic syntax, a possibility is to use that website and include the picture in the post.) Nov 6 '17 at 4:24

The package you want to use is not supported on this site, sorry. You could use AMScd instead:

$\require{AMScd}$
\begin{CD}
\mathbb{Z}/p^n\mathbb{Z} @>{\theta_{n+1,\alpha}}>> U_1/U_{n+1}\\
@VVV @VVV\\
\mathbb{Z}/p^{n-1}\mathbb{Z} @>{\theta_{n,\alpha}}>> U_1/U_n
\end{CD}


$\require{AMScd}$ \begin{CD} \mathbb{Z}/p^n\mathbb{Z} @>{\theta_{n+1,\alpha}}>> U_1/U_{n+1}\\ @VVV @VVV\\ \mathbb{Z}/p^{n-1}\mathbb{Z} @>{\theta_{n,\alpha}}>> U_1/U_n \end{CD}

I hope I got it right; I just read your source and my brain is not the most reliable compiler.

For some more details see the relevant answer in the main MathJax thread.

• Thank you. You got it right! Nov 5 '17 at 21:41
• You are welcome. I am glad to know it worked out.
– quid Mod
Nov 5 '17 at 21:42