1

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?

2
  • You can use \vdots for the vertical dots. – Peter Grill Sep 26 '19 at 1:45
  • What about the { and } on different lines in math mode, and getting the ( to line up on each line? – StatsSorceress Sep 26 '19 at 1:54
2

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}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.