# Subgroup diagram of $S_3$

I am trying to make the subgroup diagram of the symmetric group $S_3$. Analyzing some materials, I arrived at something close, but it is still far from desired.

Below I present the commands that I am using:

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{amsfonts}
\title{Subgroup Diagram of $S_3$}

\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{scope}[rotate=45,scale=1.5,transform shape,nodes={fill=white,transform
shape=false}]
\draw (0,0) grid (1,1);
\path (1,1) node (A1)  {$S_3$}
(0,2) node (A2)  {$\langle \alpha \rangle$}
(-1,0) node (A3)  {$\langle \alpha^2 \beta \rangle$}
(1,0) node (A4)  {$\langle \alpha \beta \rangle$}
(0,1) node (A5)  {$\langle \beta \rangle$}
(0,0) node (A6)  {$\langle \{e\} \rangle$};
\end{scope}
\end{tikzpicture}
\caption{Subgroup Diagram of $S_3$}
\end{figure}
\end{document}


More precisely the diagram I would like to make is the following: Thank you very much in advance.

• A common aspect of the answers is that they've skipped the rotation. I don't think that was helping you at all. May 21, 2022 at 4:06

Like this? \documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
calc, chains
}

\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[
node distance = 12mm and 8mm,
start chain = A going right,
N/.style = {circle, inner sep=1pt, on chain=A}
]
\node[N]    {$\langle\alpha\rangle$};
\node[N]    {$\langle\beta\rangle$};
\node[N]    {$\langle\alpha\beta\rangle$};
\node[N]    {$\langle\alpha^2\beta\rangle$};
% node above
\node (a) [above=of {$(A-1.west)!0.5!(A-4)$}]   {$S_3$};
\node (b) [below=of {$(A-1.west)!0.5!(A-4)$}]   {$\{e\}$};
% paths
\foreach    \i in {1,2,3,4}
\draw   (a) -- (A-\i) --  (b);
\end{tikzpicture}
\caption{Subgroup Diagram of $S_3$}
\end{figure}
\end{document}


You get a more symmetric diagram if you change the order of the subgroups:

\documentclass[12pt]{article}
\usepackage{tikz-cd}

\begin{document}

\begin{figure}
\centering

\begin{tikzcd}[
row sep=1em,
column sep={4em,between origins},
]
&&[-1em] S_3 \arrow[lld] \arrow[ld] \arrow[rd] \arrow[rrd] &[-1em] \\
\langle \alpha \rangle &
\langle \alpha\beta \rangle &&
\langle \alpha^2\beta \rangle &
\langle \beta \rangle \\
&& \langle e\rangle \arrow[llu] \arrow[lu] \arrow[ru] \arrow[rru]
\end{tikzcd}

\caption{Subgroup Diagram of $S_3$}

\end{figure}

\end{document} Or using tikz-cd:

\documentclass[12pt]{article}
\usepackage{tikz-cd}

\title{Subgroup Diagram of $S_3$}
\begin{document}
\begin{figure}
\centering
\begin{tikzcd}[row sep= 1em,column sep=1em]
\langle \alpha \rangle & \langle \beta \rangle & \langle \alpha \beta \rangle                                                                                 & \langle \alpha^2 \beta \rangle \\
\end{tikzcd}
\caption{Subgroup Diagram of $S_3$}
\end{figure}
\end{document} Addendum 2022/5/24: Here there is the symmetrical version using tikz-node. \documentclass[a4paper,12pt]{article}
\usepackage{tikz}

\title{Subgroup Diagram of $S_3$}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[scale=.7]
\node (one) at (0,2) {$S_3$};
\node (a) at (-3,0) {$\langle \alpha \rangle$};
\node (b) at (-1,0) {$\langle \beta \rangle$};
\node (c) at (1,0) {$\langle \alpha \beta \rangle$};
\node (d) at (3,0) {$\langle \alpha^2 \beta \rangle$};
\node (zero) at (0,-2) {$\langle \{e\} \rangle$};
\draw (zero) -- (a) -- (one) -- (b) -- (zero) -- (c) -- (one) -- (d) -- (zero);
\end{tikzpicture}
\caption{Subgroup Diagram of $S_3$}
\end{figure}
\end{document}


The TikZ graphs and graphdrawing libraries are nice for this as well (see also "Part IV Graph Drawing" of the pgfmanual). One caveat is the requirement of LuaLaTeX for graphdrawing, since its layouting algorithms are written in lua.

\documentclass[tikz]{standalone}

\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{layered}

% This is required to fix their messing with the double quote (") character for shortcuts.
% \usetikzlibrary{babel}

\begin{document}
\begin{tikzpicture}
% \begin{noindent} % so that latexindent doesn't mess this up
\graph [layered layout] {
"$$S_3$$"
--
{
"$$\langle \alpha \rangle$$",
"$$\langle \beta \rangle$$",
"$$\langle \alpha\beta \rangle$$",
"$$\langle \alpha^2\beta \rangle$$",
}
--
"$$\{e\}$$";
};
% \end{noindent}
\end{tikzpicture}
\end{document} • +1 I see that you've put a comment in your code "so that latexindent doesn't mess this up". See the settings I've posted at gist.github.com/cmhughes/6ffaf004e573838d4209d36387cfe105 for reference May 22, 2022 at 10:10
• Oh, nice, thanks @cmhughes. I knew you could configure latexindent with some custom regexes, but I never felt like messing with that. Since this fix looks rather simple I might go for making my own when I encounter other broken stuff (usually TikZ tbh) in the future. May 22, 2022 at 11:40
• Great, let me know if you need help with it :) May 22, 2022 at 14:23
• github.com/cmhughes/latexindent.pl May 22, 2022 at 14:23