# How to draw this figure in Latex?

by JSN   Last Updated May 16, 2019 06:23 AM I am using latex for first time. I want to draw the picture below. How to proceed?

Tags :

#### Answers 2

Maybe, this can help you.

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
\draw[ultra thin] (0,0)--(3.5,-2.2)--(2.7,-6)--(-2.7,-6)--(-3.5,-2.2)--(0,0)--
(2.7,-6)--(-3.5,-2.2);
\draw[ultra thin] (0,0)--(-2.7,-6)--(3.5,-2.2);
\draw [fill](0,0)circle[radius=0.7mm]node[above]{$a$};
\draw [fill](3.5,-2.2)circle[radius=0.7mm]node[right]{$b$};
\draw [fill](2.7,-6)circle[radius=0.7mm]node[below]{$ab$};
\draw [fill](-2.7,-6)circle[radius=0.7mm]node[below]{$ab^2$};
\draw [fill](-3.5,-2.2)circle[radius=0.7mm]node[left]{$b^2$};
\end{tikzpicture}
\end{document}


Something like this: The main idea is to use tikz polar coordinates and a loop:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[bullet/.style={circle, fill, inner sep=2pt}]
\foreach \lab [count=\c,
evaluate=\c as \ang using {18+72*\c}]
in {a,b^2, ab^2, ab, b} {
\node[bullet] (\c) at (\ang:10mm) {};
\node at (\ang:14mm){$\lab$};
\foreach \i in {1,...,\c} {
\draw(\i)--(\c);
}
}
\end{tikzpicture}

\end{document}


EDIT Oops, I noticed that I have an extra edge. If this really is not wanted then here is a fix to give: using:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[bullet/.style={circle, fill, inner sep=2pt}]
\foreach \lab [count=\c, evaluate=\c as \ang using {18+72*\c}] in {a,b^2, ab^2, ab, b} {
\node[bullet] (\c) at (\ang:10mm) {};
\node at (\ang:14mm){$\lab$};
}
\draw(5)--(1)--(2)--(3)--(4)--(5)--(3)--(1)--(4)--(2);
\end{tikzpicture}

\end{document}


## Related Questions

Updated February 01, 2017 14:09 PM

Updated April 05, 2018 02:23 AM

Updated August 18, 2017 09:23 AM

Updated August 20, 2017 21:23 PM

Updated September 04, 2017 17:23 PM