[Tex/LaTex] Notation for a sample space

math-mode

I would like to write the sample space for rolling two fair six-sided dice once. It would look like this:

S = {(1, 1), (1, 2), ..., (1, 6),
     (2, 1), (2, 2), ..., (2, 6),
     ...      ...    ...   ...
     (6, 1), (6, 2), ..., (6, 6)}

where that third line of "…" is actually vertical.

How can I do this in LaTeX?

Best Answer

One way you can typeset that is to use align:

enter image description here

If you are willing to do a bit more work you could use alignat that produces better output:

enter image description here

Code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{xcolor}\pagecolor{white}

\newcommand*{\CenterVdots}{\makebox[\widthof{(0,0),}][c]{\vdots}}

\begin{document}
\begin{align*}
    S = \{&(1, 1), (1, 2), \dots, (1, 6), \\
          &(2, 1), (2, 2), \dots, (2, 6), \\
          &\CenterVdots  \CenterVdots  \CenterVdots \CenterVdots \\
          &(6, 1), (6, 2), \dots, (6, 6) \}
\end{align*}
\end{document}

Code

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{xcolor}\pagecolor{white}

\newcommand*{\CenterVdots}[1][(0,0),]{\makebox[\widthof{#1}][c]{\vdots}}

\begin{document}
\begin{alignat*}{5}
    S = \{&(1, 1), &&\,(1, 2), &&\,\dots, &&\,(1, 6), \\
          &(2, 1), &&\,(2, 2), &&\,\dots, &&\,(2, 6), \\
          &\CenterVdots  &&\,\CenterVdots  &&\,\CenterVdots[\dots] &&\,\CenterVdots \\
          &(6, 1), &&\,(6, 2), &&\,\dots, &&\,(6, 6) \}
\end{alignat*}
\end{document}
Related Question