# How do I align the sums using the align* environment?

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
\sum_{k=1}^\infty \frac{1}{k} &\rightarrow \infty
&\sum_{k=1}^\infty \frac{1}{k^2} &= \frac{\pi^2}{6}
&&\sum_{k=1}^\infty \frac{1}{k^3} = \zeta(3)
\\
\\
\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} &= \ln(2)
&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2} &= \frac{\pi^2}{12}
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3)
\\
\\
\sum_{k=1}^\infty \frac{1}{2k} &\rightarrow \infty
&\sum_{k=1}^\infty \frac{1}{{(2k)}^2} &= \frac{\pi^2}{24}
&&\sum_{k=1}^\infty \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3)
\\
\\
\sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k} &= \frac{\ln(2)}{2}
&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^2} &= \frac{\pi^2}{48}
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3)
\\
\\
\sum_{k=0}^\infty \frac{1}{2k+1} &\rightarrow \infty
&\sum_{k=0}^\infty \frac{1}{{(2k+1)}^2} &= \frac{\pi^2}{8}
&&\sum_{k=0}^\infty \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3)
\\
\\
\sum_{k=0}^\infty \frac{(-1)^{k}}{2k+1} &= \frac{\pi}{4}
&\sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^2} &\neq \frac{\pi^2}{16}
&&\sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3)
\end{align*}

\end{document}


Sorry, I don't know how to display the output of this code, so I uploaded the pdf image. I am trying to get the sums to align like in the last column. I think it would look better if both the sums and the equals signs are aligned though. One option is given by:

\documentclass[12pt]{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
&\sum_{k=1}^\infty \frac{1}{k} \rightarrow \infty
&& \sum_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6}
&& \sum_{k=1}^\infty \frac{1}{k^3} = \zeta(3)
\\
&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} = \ln(2)
&& \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2} = \frac{\pi^2}{12}
&& \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3)
\\
&\sum_{k=1}^\infty \frac{1}{2k} \rightarrow \infty
&& \sum_{k=1}^\infty \frac{1}{{(2k)}^2} = \frac{\pi^2}{24}
&& \sum_{k=1}^\infty \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3)
\\
& \sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k} = \frac{\ln(2)}{2}
&& \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48}
&& \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3)
\\
& \sum_{k=0}^\infty \frac{1}{2k+1} \rightarrow \infty
&& \sum_{k=0}^\infty \frac{1}{{(2k+1)}^2} = \frac{\pi^2}{8}
&& \sum_{k=0}^\infty \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3)
\\
& \sum_{k=0}^\infty \frac{(-1)^{k}}{2k+1} = \frac{\pi}{4}
&& \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^2} \neq \frac{\pi^2}{16}
&& \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3)
\end{align*}

\end{document}


which produces: Notes: more space can be added between columns by using \quad after the first and second equations of each row. Space can be added between rows by using \\ on two lines as presented by the original code of the proposer.

alignat is best suited for this case. Remember that alignat alternates alignments left then right and so on, so you should add double && to get left alignment.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{alignat*}{3}
&\sum_{k=1}^\infty \frac{1}{k} \rightarrow \infty
&&\sum_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6}
&&\sum_{k=1}^\infty \frac{1}{k^3} = \zeta(3)
\\
\\
&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} = \ln(2)
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2} = \frac{\pi^2}{12}
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3)
\\
\\
&\sum_{k=1}^\infty \frac{1}{2k} \rightarrow \infty
&&\sum_{k=1}^\infty \frac{1}{{(2k)}^2} = \frac{\pi^2}{24}
&&\sum_{k=1}^\infty \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3)
\\
\\
&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k} = \frac{\ln(2)}{2}
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48}
&&\sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3)
\\
\\
&\sum_{k=0}^\infty \frac{1}{2k+1} \rightarrow \infty
&&\sum_{k=0}^\infty \frac{1}{{(2k+1)}^2} = \frac{\pi^2}{8}
&&\sum_{k=0}^\infty \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3)
\\
\\
&\sum_{k=0}^\infty \frac{(-1)^{k}}{2k+1} = \frac{\pi}{4}
&&\sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^2} \neq \frac{\pi^2}{16}
&&\sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3)
\end{alignat*}

\end{document} I propose a classic alignment (with align*), another (with alignat*), perhaps more pleasant to read, which consists in not repeating the sum operator on each line, and a last with a single big sum operator for the whole alignment:

\documentclass{article}

\usepackage{amsmath}
\usepackage{graphics}
\usepackage{relsize}
\newcommand\Sum{\mathlarger{\sum}}
\usepackage{lettrine}
\usepackage{showframe}
\begin{document}

\begin{align*}
& \sum_{k=1}^\infty \frac{1}{k}\rightarrow \infty &
&\sum_{k=1}^\infty \frac{1}{k^2}= \frac{\pi^2}{6}
& & \sum_{k=1}^\infty \frac{1}{k^3} = \zeta(3)
\1ex] & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k}= \ln(2) & & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2}= \frac{\pi^2}{12} & & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3) \\[1ex] & \sum_{k=1}^\infty \frac{1}{2k} \rightarrow \infty & & \sum_{k=1}^\infty \frac{1}{{(2k)}^2} = \frac{\pi^2}{24} & & \sum_{k=1}^\infty \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3) \\[1ex] & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k}= \frac{\ln(2)}{2} & & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48} & & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3) \\[1ex] & \sum_{k=0}^\infty \frac{1}{2k+1}\rightarrow \infty & & \sum_{k=0}^\infty \frac{1}{{(2k+1)}^2}= \frac{\pi^2}{8} & & \sum_{k=0}^\infty \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3) \\[1ex] &\sum_{k=0}^\infty \frac{(-1)^{k}}{2k+1}= \frac{\pi}{4} & & \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^2}\neq \frac{\pi^2}{16} & & \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3) \end{align*} \begin{alignat*}{3} \mathlarger{\sum}_{k=1}^\infty \enspace & \frac{1}{k}\rightarrow \infty & \quad \Sum_{k=1}^\infty\enspace & \frac{1}{k^2}= \frac{\pi^2}{6} & \quad \Sum_{k=1}^\infty\enspace & \frac{1}{k^3} = \zeta(3) \\[1ex] &\frac{(-1)^{k+1}}{k}= \ln(2) & & \frac{(-1)^{k+1}}{k^2}= \frac{\pi^2}{12} & & \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3) \\[1ex] & \frac{1}{2k} \rightarrow \infty & & \frac{1}{{(2k)}^2} = \frac{\pi^2}{24} & & \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3) \\[1ex] & \frac{(-1)^{k+1}}{2k}= \frac{\ln(2)}{2} & & \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48} & & \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3) \\[1ex] & \frac{1}{2k+1}\rightarrow \infty & & \frac{1}{{(2k+1)}^2}= \frac{\pi^2}{8} & & \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3) \\[1ex] & \frac{(-1)^{k}}{2k+1}= \frac{\pi}{4} & & \frac{(-1)^{k}}{{(2k+1)}^2}\neq \frac{\pi^2}{16} & & \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3) \end{alignat*} \begin{alignat*}{4} \smash{\mathop{\raisebox{-0.7\height}{\scalebox{2.8}{ \sum }}}_{\boldsymbol{k=}1}^{\boldsymbol\infty}}\! \enspace & \frac{1}{k}\rightarrow \infty & \hspace{2.5em} & \frac{1}{k^2}= \frac{\pi^2}{6} & \hspace{2.5em} & \frac{1}{k^3} = \zeta(3) \\ &\frac{(-1)^{k+1}}{k}= \ln(2) & & \frac{(-1)^{k+1}}{k^2}= \frac{\pi^2}{12} & & \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3) \\[1ex] & \frac{1}{2k} \rightarrow \infty & & \frac{1}{{(2k)}^2} = \frac{\pi^2}{24} & & \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3) \\[1ex] & \frac{(-1)^{k+1}}{2k}= \frac{\ln(2)}{2} & & \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48} & & \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3) \\[1ex] & \frac{1}{2k+1}\rightarrow \infty & & \frac{1}{{(2k+1)}^2}= \frac{\pi^2}{8} & & \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3) \\[1ex] & \frac{(-1)^{k}}{2k+1}= \frac{\pi}{4} & & \frac{(-1)^{k}}{{(2k+1)}^2}\neq \frac{\pi^2}{16} & & \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3) \end{alignat*} \end{document}  • Personally, I like it with the sums included. But this got me thinking... Is there a way to enlarge the sum operator to where it is the size of six rows? Instead of having one regular sized sum on top, is there a way to have one large sum to the left of the rows? (Please tell me you know how to create this!) – zerosofthezeta Sep 4 '15 at 0:01 • Usually I include the sums, but here they are quite a lot, I feel it tiresome to the eye. I'm not sure I understand very well your request. The second solution makes the sum signs column heads, so to say. Do you mean only one quite big sign instead of three moderately larger? – Bernard Sep 4 '15 at 0:13 • Imagine the first column alone without the sums. Is there way to enlarge the sum symbol so it is the size of an entire page and place it to the left of the column? So there is only one sum symbol for the 6 equations. The closest analogy I can think of is an enormous drop capital at the beginning of a chapter in a book. – zerosofthezeta Sep 4 '15 at 0:21 • @zerosofthezeta: I've just added a third possibility. Is it close to what you imagined? – Bernard Sep 4 '15 at 0:52 • Yes, its close...I think what I am imagining is more of an artistic thing, perhaps not suitable for LaTex...Thanks for your help though! I really appreciate all the options you provided! – zerosofthezeta Sep 4 '15 at 1:56 You may just as well set the entire construction inside an array: \documentclass{article} \usepackage{amsmath,array} \begin{document} \[ \renewcommand{\arraystretch}{3}% http://tex.stackexchange.com/a/31704/5764 \begin{array}{ >{\displaystyle}l @{\quad} >{\displaystyle}l @{\quad} >{\displaystyle}l } \sum_{k=1}^\infty \frac{1}{k} \rightarrow \infty & \sum_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6} & \sum_{k=1}^\infty \frac{1}{k^3} = \zeta(3) \\ \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} = \ln(2) & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2} = \frac{\pi^2}{12} & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^3} = \frac{3}{4}\zeta(3) \\ \sum_{k=1}^\infty \frac{1}{2k} \rightarrow \infty & \sum_{k=1}^\infty \frac{1}{{(2k)}^2} = \frac{\pi^2}{24} & \sum_{k=1}^\infty \frac{1}{{(2k)}^3} = \frac{1}{8}\zeta(3) \\ \sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k} = \frac{\ln(2)}{2} & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^2} = \frac{\pi^2}{48} & \sum_{k=1}^\infty \frac{(-1)^{k+1}}{{(2k)}^3} = \frac{3}{32}\zeta(3) \\ \sum_{k=0}^\infty \frac{1}{2k+1} \rightarrow \infty & \sum_{k=0}^\infty \frac{1}{{(2k+1)}^2} = \frac{\pi^2}{8} & \sum_{k=0}^\infty \frac{1}{{(2k+1)}^3} = \frac{7}{8}\zeta(3) \\ \sum_{k=0}^\infty \frac{(-1)^{k}}{2k+1} = \frac{\pi}{4} & \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^2} \neq \frac{\pi^2}{16} & \sum_{k=0}^\infty \frac{(-1)^{k}}{{(2k+1)}^3} = \frac{\pi^3}{32} \neq \frac{21}{32}\zeta(3) \end{array}

\end{document}


Padding between columns are set to \quad.

• Interesting. What are the benefits of using an array over align? – zerosofthezeta Sep 3 '15 at 23:55
• Not really. Your application just didn't call for a align-specific requirement. The entire array block will be unbreakable across the page boundary, while align-like environment allow for breaking in certain situations. – Werner Sep 4 '15 at 0:04