# Is there a way to double indent equations

I have already aligned the first set of these equations

\begin{align*}
\sum_{k=1}^n 1 &= n\\
\newline
\sum_{k=m}^n 1 &= n+1-m\\
\sum_{k=1}^n k = S &= 1+2+3+...+n\\
&= n + (n-1) + (n-2) + ... + 1\\
\therefore 2S &= (n+1) + (n+1) + (n+1) + ...+ (n+1)\\
&= n(n+1)\\
\therefore S &= \frac{1}{2} n (n+1)\\
\end{align*}


However I would like the first equals in the line with two equals to be aligned with the preceding equals signs but all the following equals signs should be aligned with the second of the equals signs in the line with two since obviously that argument follows on.

Is there a way to do this?

• To be honest, I see no reason to align the equals signs after the summations: they aren't related to each other. – egreg Sep 26 at 19:27

Slightly more complicated than Steven's answer but allows you to add equation numbers and so on if needed. (You can see the difference from the fact that here more space is allocated for the line that has the \sum in it.)

\documentclass{article}
\usepackage{mathtools,amssymb,eqparbox}
\begin{document}
\begin{align*}
\sum_{k=1}^n 1 &= n\\
\sum_{k=m}^n 1 &= n+1-m\\
\sum_{k=1}^n k &\eqmakebox[pft]{${}= S$} = 1+2+3+\dots+n\\
&\eqmakebox[pft]{}= n + (n-1) + (n-2) + \dots + 1\\
&\eqmakebox[pft]{}\mathllap{\therefore 2S}= (n+1) + (n+1) + (n+1) + \dots+ (n+1)\\
&\eqmakebox[pft]{}= n(n+1)\\
&\eqmakebox[pft]{}\mathllap{\therefore 2S}= \frac{1}{2} n (n+1)\\
\end{align*}
\end{document}


\documentclass{article}
\usepackage{mathtools,amssymb}
\begin{document}
\begin{align*}
\sum_{k=1}^n 1 &= n\\
\newline
\sum_{k=m}^n 1 &= n+1-m\\
\sum_{k=1}^n k &= \begin{aligned}[t] S &= 1+2+3+\dots+n\\
&= n + (n-1) + (n-2) +\dots+ 1\\
\mathllap{\therefore 2S} &= (n+1) + (n+1) + (n+1) +\dots+ (n+1)\\
&= n(n+1)\\
\mathllap{\therefore S} &= \frac{1}{2} n (n+1)
\end{aligned}
\end{align*}
\end{document}


You can have what you want (I think) with alignat*and, in addition the alignment of the \therefore symbols. I replaced the fraction 1/2 with a medium-size fraction, which look better, in my opinion.

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage{nccmath}
\usepackage{mathtools, amssymb}

\begin{document}

\begin{alignat*}{2}
\sum_{k=1}^n 1 &= n\\
\sum_{k=m}^n 1 &=\mathrlap{ n+1-m}\\
\mathop{\smash[b]{\sum_{k=1}^n}} k & = S & &= 1+2+3+...+n\\
& & &= n + (n-1) + (n-2) + ... + 1\\
\therefore && \mathllap{2S} &= (n+1) + (n+1) + (n+1) + ...+ (n+1)\\
& & &= n(n+1)\\
\therefore && \mathllap{S} &= \mfrac{1}{2} n (n+1)\\
\end{alignat*}

\end{document}


• \mathop{\smash[b]{...}} – egreg Sep 26 at 19:31
• @egreg: I didn't know it was required. Upon reflection, though, it's natural: the \sum is beteen a pair of braces and therefore becomes \mathord. Am I correct? – Bernard Sep 26 at 19:38
• Yes, that's the problem! You can also, more simply, place k inside the smash. – egreg Sep 26 at 20:09