% Code for the triangular graph:
\documentclass[border=1pt]{standalone}
% The graphics library we use: TikZ
\usepackage{tikz}
% Set the styles of the vertices and the edges in the graph:
\tikzset{vertex/.style={draw, very thick, circle, minimum size=1cm},
edge/.style={very thick}}
\begin{document}
% Finally, here is our graph:
\begin{tikzpicture}
\node[vertex] (v1) at (0,0) {1};
\node[vertex] (v2) at (3,0) {2};
\node[vertex] (v3) at (1.5,2) {3};
\draw[edge] (v1) -- (v2);
\draw[edge] (v2) -- (v3);
\draw[edge] (v3) -- (v1);
\end{tikzpicture}
\end{document}
% Code for the square graph:
\documentclass[border=1pt]{standalone}
% The graphics library we use: TikZ
\usepackage{tikz}
% Set the styles of the vertices and the edges in the graph:
\tikzset{vertex/.style={draw, very thick, circle, minimum size=1cm},
edge/.style={very thick}}
\begin{document}
% Finally, here is our graph:
\begin{tikzpicture}
\node[vertex] (v1) at (0,0) {1};
\node[vertex] (v2) at (2,0) {2};
\node[vertex] (v3) at (2,-2) {3};
\node[vertex] (v4) at (0,-2) {4};
\draw[edge] (v1) -- (v2);
\draw[edge] (v2) -- (v3);
\draw[edge] (v3) -- (v4);
\draw[edge] (v4) -- (v1);
\end{tikzpicture}
\end{document}
% Code for the star-shaped graph:
\documentclass[border=1pt]{standalone}
% The graphics library we use: TikZ
\usepackage{tikz}
% Set the styles of the vertices and the edges in the graph:
\tikzset{vertex/.style={draw, very thick, circle, minimum size=1cm},
edge/.style={very thick}}
\begin{document}
% Finally, here is our graph:
\begin{tikzpicture}
\node[vertex] (v1) at (0,0) {1};
\node[vertex] (v2) at (90:2cm) {2};
\node[vertex] (v3) at (45:2cm) {3};
\node[vertex] (v4) at (0:2cm) {4};
\node[vertex] (v5) at (-45:2cm) {5};
\node[vertex] (v6) at (-90:2cm) {6};
\node[vertex] (v7) at (-135:2cm) {7};
\node[vertex] (v8) at (180:2cm) {8};
\node[vertex] (v9) at (135:2cm) {9};
\draw[edge] (v1) -- (v2);
\draw[edge] (v1) -- (v3);
\draw[edge] (v1) -- (v4);
\draw[edge] (v1) -- (v5);
\draw[edge] (v1) -- (v6);
\draw[edge] (v1) -- (v7);
\draw[edge] (v1) -- (v8);
\draw[edge] (v1) -- (v9);
\end{tikzpicture}
\end{document}