# How to Align Equations in the Align and Proof Environment

I wrote the following proof. I used the following code and it resulted in the following output:

\begin{proof}
$S_n = \frac{a(1-r^n)}{1-r}$
\begin{align*}
\lim _{n\to \infty} S_n &= \lim _{n\to \infty} \frac{a(1-r^n)}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} - \lim _{n\to \infty} \frac{ar^n}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} &&\tag{since $|r| < 1$}\\
&= \frac {a}{1-r} && \qedhere
\end{align*}
\end{proof}


The problem is that the bottom bit which was made using the align* environment is not aligned nicely with the first line so it doesn't look that nice. Could anyone please suggest a way to make it look nicer?

I propose this variant:

\documentclass{article}
\usepackage{mathtools,amsthm}

\begin{document}

\begin{proof}\leavevmode\vspace*{-\dimexpr\baselineskip + \abovedisplayskip + 5pt}
\begin{align*}
S_n & = \frac{a(1-r^n)}{1-r},\\
\shortintertext{so, taking the limits, }
\lim _{n\to \infty} S_n &= \lim _{n\to \infty} \frac{a(1-r^n)}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} - \lim _{n\to \infty} \frac{ar^n}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} \qquad(\text{since }|r| < 1)\\
&= \frac {a}{1-r}. \qedhere
\end{align*}
\end{proof}

\end{document}


You have && that shouldn't be there:

\documentclass{article}
\usepackage{amsmath,amsthm}

\begin{document}

\begin{proof}
\begin{gather*}
S_n = \frac{a(1-r^n)}{1-r}\\[2ex]
\begin{align*}
\lim _{n\to \infty} S_n &= \lim _{n\to \infty} \frac{a(1-r^n)}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} - \lim _{n\to \infty} \frac{ar^n}{1-r}\\
&= \lim _{n\to \infty} \frac {a}{1-r} \tag{since $|r| < 1$}\\
&= \frac {a}{1-r} \qedhere
\end{align*}
\end{gather*}
\end{proof}

\end{document}


Here's a solution that uses a single aligned environment. This method simplifies the vertical alignment of "Proof" and the first line of the math material.

\documentclass{article}
\usepackage{amsmath,amsthm}
\begin{document}
\begin{aligned}[t] \text{Put }S_n &= \frac{a(1-r^n)}{1-r}\,.\\ \text{Thus, }\lim_{n\to\infty} S_n &= \lim_{n\to\infty} \frac{a(1-r^n)}{1-r}\\ &= \lim_{n\to\infty} \frac {a}{1-r} - \lim_{n\to\infty} \frac{ar^n}{1-r}\\ &= \lim_{n\to\infty} \frac {a}{1-r} \qquad\text{(since|r|<1)}\\ &= \frac {a}{1-r}\,. &&&& \qedhere \end{aligned}