Bennett Kanuka bio photo

Bennett Kanuka

Using math and software to solve real world problems

Twitter Google+ LinkedIn Github

Drawing a Pentagon in LaTeX

I needed to draw a pentagon for a paper on Galois theory I’m working on. After some research, this is what I have come up with:

In the header we use TikZ:


and then draw the pentagon with the following:

\begin{tikzpicture}[scale=2.2]%change the size here
    \draw[ultra thick] (0,1)--(-0.9510565163,0.309017)--(-0.58778525229,-0.809017)--(0.58778525229,-0.809017)--(0.9510565163,0.309017)--cycle;
    \draw[dashed, ultra thick,color=black] (-0.9510565163,0.309017)--(0.9510565163,0.309017)--(-0.58778525229,-0.809017)--(0,1)--(0.58778525229,-0.809017)--cycle;
    %label nodes
    \node [above] at (0,1) {$\alpha_1$};
    \node [right] at (0.9510565163,0.309017) {$\alpha_2$};
    \node [below right] at (0.58778525229,-0.809017) {$\alpha_3$};
    \node [below left] at (-0.58778525229,-0.809017) {$\alpha_4$};
    \node [left] at (-0.9510565163,0.309017) {$\alpha_5$};

Hope this helps!