I have an equation which I rearrange in several steps. I want to show this, by having a single numbered equation, which has an aligned equal sign on the right, and the terms left of the equal sign are centered in each line. So basically it looks like this:

        (a+b)^3       =
     (a+b)(a+b)^2     = 
   (a+b)(a+b)(a+b)    =   (1)
  (a^2+2ab+b^2)(a+b)  =
(a^3+3a^2b+3ab^2+b^3) =

I know about aligned, gather and split, but neither seems to achieve, what I want.

Update: This is no duplicate to the linked question, as I want a fixed sign on the right, and a horizontal centered alignement on the left. The linked question has no horizontal centering in it.

  • 1
    @Sebastiano: This question is significanlty different from the one you cited. – GuM Apr 13 '18 at 22:31
  • I thus have understood in this mode. If I'm wrong, I try to reopen the question as it should be. Now there is reopen (1). – Sebastiano Apr 14 '18 at 19:39

You can do it with an array. I suggest also another method for laying out the computation.



\begin{array}{c >{{}}c}
        (a+b)^3       &= \\
     (a+b)(a+b)^2     &= \\
   (a+b)(a+b)(a+b)    &= \\
  (a^2+2ab+b^2)(a+b)  &= \\

&=(a+b)(a+b)^2 \\
&=(a+b)(a^2+2ab+b^2) \\
&=a^3+2a^2b+ab^2+a^2b+2ab^2+b^3 \\


enter image description here

  • Thanks for the suggestion. Although I asked for something different, I'm gonna use the 2nd option as it looks indeed nicer. :-) – infinitezero Apr 13 '18 at 22:46
  • 1
    @egreg Excuse me and the OP infinitezero. If I made a mistake, I voted to reopen the issue. – Sebastiano Apr 14 '18 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.