TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using tikz 3.0.0, I want to create the following diagram

commutative diagram1

which I have so far achieved by manually positioning the “G” in the last row:

        \node (A) {$(G×G)×G$};
        \node (B) [right=of A] {$G×(G×G)$};
        \node (C) [below left=of A] {$G×G$};
        \node (D) [below right=of B] {$G×G$};
        \node (E) at (1.5,-3) {$G$};
        \draw[double equal sign distance] (A) -- node[above]{$\sim$} (B);

        \draw[->] (A) -- node[above left]{\small $μ × \id$} (C);
        \draw[->] (B) -- node[above right]{\small $\id × μ$} (D);
        \draw[->] (C) -- node[above]{\small $μ$} (E);
        \draw[->] (D) -- node[above]{\small $μ$} (E);

Can I do this without maually setting “G” at (1.5,-3) using positioning?

On a related note, I tried to do the same with {tikz-cd} and got: commutative diagram2 using the following code:


        & (G × G) × G \ar[dl, "μ × \id"] \ar[rr, equal, "\sim"] & & G × (G × G) \ar[dr, "\id × μ"] & \\

        G × G \ar[drr, "μ"] & & & & G × G \ar[dll, "μ"] \\

         & & G & &



Can I somehow achieve a picture without an unnecessarily stretched equal sign, that is a picture more like the one above, but using {tikz-cd}?

I’m using TeXLive, version 2013.

share|improve this question
up vote 2 down vote accepted

This one possible solution. However, my tikz is not 3.0.0 so I need to change some of your math code \mu and times. Also this solution uses double for equal sign, not double equal sign distance as the OP used. IMHO, the principle applies if the related math quantities is changed to those applicable in tikz 3.0.0. The bottom G position is determined via the code below where given (A) and (B), their center is determined automatically. That is the (1.5,-3) is removed.

\node[yshift=-3cm] (E) at ($(A)!0.5!(B)$) {$G$};  %change yshift for one's need.

enter image description here


\usepackage[paper size={15cm,6cm}]{geometry}

        \node (A) {$(G\times G)\times G$};
        \node (B) [right=1cm of A] {$G\times (G\times G)$};
        \node (C) [below left=of A] {$G\times G$};
        \node (D) [below right=of B] {$G\times G$};
%        \node (E) at (1.5,-3) {$G$};
\node[yshift=-3cm] (E) at ($(A)!0.5!(B)$) {$G$};
        \draw[double] (A) -- node[above]{$\sim$} (B);

        \draw[->] (A) -- node[above left]{\small $\mu \times id$} (C);
        \draw[->] (B) -- node[above right]{\small $id \times \mu$} (D);
        \draw[->] (C) -- node[above]{\small $\mu$} (E);
        \draw[->] (D) -- node[above]{\small $\mu$} (E);

share|improve this answer
Many thanks for the solution! The matrix nature of {tikz-cd} makes such an approach impossible, right? – k.stm Jun 8 '14 at 10:38
For tikzcd column sep=xx is a global setting for the entire matrix node. So, yes, tikz is flexible. – Jesse Jun 8 '14 at 11:03

Your Answer


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.