# How to Align Multiple Pluses accross Multiple Lines?

$\setlength\arraycolsep{1pt} \begin{array}{rcccl} &S &= &R_0 + R_1 + R_2 + R_3 + R_4 &+ \\ & &~ &R_5 + R_6 + R_7 + R_8 + R_9 &~ \\ & &= &0 + 1 + 2 + 3 + 4 &~ \\ & &~ &5 + 6 + 7 + 8 + 9 &= 45 < 100 \end{array}$


generates:

with = signs being correctly aligned. How to make + symbols aligned? Adding extra & signs in front of +:

&S &= &R_0 &+ R_1 + R_2 + R_3 + R_4 &+ \\
&  &~ &R_5 &+ R_6 + R_7 + R_8 + R_9 &~ \\
&  &= &0   &+  1  +  2  +  3  +  4  &~ \\
&  &~ &5   &+  6  +  7  +  8  +  9  &= 45 < 100


gives compile error. Why?

• You have five columns defined (rcccl) but use five &. Add an additional column in the definition of \begin{array}. Commented Mar 22, 2017 at 17:39

You can keep using an array environment, but I'd set up a special column type for the binary and relational operators, using the \newcolumntype directive.
\documentclass{article}
$\setlength\arraycolsep{0pt} \begin{array}{ *{7}{cC} c } S &=& R_0&+& R_1&+& R_2&+& R_3&+& R_4 &+ \\ & & R_5&+& R_6&+& R_7&+& R_8&+& R_9 & \\ &=& 0 &+& 1 &+& 2 &+& 3 &+& 4 &+ \\ & & 5 &+& 6 &+& 7 &+& 8 &+& 9 &=& 45&<& 100 \end{array}$