# Positioning a node horizontally aligned and below others

Using tikz 3.0.0, I want to create the following diagram

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

\begin{center}
\begin{tikzpicture}
\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);
\end{tikzpicture}
\end{center}


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: using the following code:

\begin{displaymath}
\begin{tikzcd}
& (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 & &
\end{tikzcd}
\end{displaymath}


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.

-

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.


Code

\documentclass[]{article}
\usepackage[paper size={15cm,6cm}]{geometry}
\usepackage{amsmath,pgfplots,tikz}
\usetikzlibrary{arrows,calc,positioning}
%\usetikzlibrary{decorations.pathmorphing,patterns}

\begin{document}
\begin{center}
\begin{tikzpicture}
\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);
\end{tikzpicture}
\end{center}

\end{document}

-
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