# How do I fix the alignment on these equations?

I wish to align these equation by their respective equals sign or arrow so it looks like a table (3 rows, 2 columns). How can I get the second expression to move to the right more so that it looks normal?

\begin{align}
\sum_{n=1}^{\infty} \frac{1}{n} & \rightarrow \infty
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} &=\ln(2) \\
\sum_{n=1}^{\infty} \frac{1}{2n} & \rightarrow \infty
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n} & = \frac{\ln(2)}{2} \\
\sum_{n=0}^{\infty} \frac{1}{2n+1} &\rightarrow \infty
\sum{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} & = \frac{\pi}{4}
\end{align}


Here is what it currently looks like:

• (Regarding your note at the end of the question:) Here in TeX.SE we don't have MathJax enabled, so the equations don't render here. This is because here we are more interested in the code. I edited your question accordingly. Dec 27, 2018 at 23:40
• Do you want to align what? The equal signs? The arrows? Dec 27, 2018 at 23:44
• @Sigur I found what I was looking for. I've explained it in the answer below. Dec 27, 2018 at 23:45

You're missing an alignment point.

On the other hand, I'd recommend using the second scheme, because aligning at the arrows and the equals signs makes for very unbalanced formulas.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\sum_{n=1}^{\infty} \frac{1}{n} & \rightarrow \infty &
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} &=\ln(2) \\
\sum_{n=1}^{\infty} \frac{1}{2n} & \rightarrow \infty &
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n} & = \frac{\ln(2)}{2} \\
\sum_{n=0}^{\infty} \frac{1}{2n+1} &\rightarrow \infty &
\sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} & = \frac{\pi}{4}
\end{align}

\begin{align}
&\sum_{n=1}^{\infty} \frac{1}{n} \rightarrow \infty &&
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} =\ln(2) \\
&\sum_{n=1}^{\infty} \frac{1}{2n} \rightarrow \infty &&
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n}  = \frac{\ln(2)}{2} \\
&\sum_{n=0}^{\infty} \frac{1}{2n+1} \rightarrow \infty &&
\sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1}  = \frac{\pi}{4}
\end{align}

\end{document}


• Thanks, I like the second set better. How do I add the equation numbers (1) - (6)? Dec 27, 2018 at 23:51
• @zerosofthezeta That's align. However, numbers are not added with MathJax and you have to add them yourself with \tag{1} and so on. Dec 27, 2018 at 23:52

I found an answer by experimenting myself. I added another & symbol before the second sum:

\begin{align}
\sum_{n=1}^{\infty} \frac{1}{n} & \rightarrow \infty
&\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} &=\ln(2) \\
\sum_{n=1}^{\infty} \frac{1}{2n} & \rightarrow \infty
&\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n} & = \frac{\ln(2)}{2} \\
\sum_{n=0}^{\infty} \frac{1}{2n+1} &\rightarrow \infty
&\sum{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} & = \frac{\pi}{4}
\end{align}


That gave me this:

• Nice! This is how align block works. The first & is to set the alignment symbol, the second one, to change to another alignment column, the third one, to the symbol again, and so on. Dec 27, 2018 at 23:46