I'm trying to write equations on multiple lines using \displaystyle. I can use \\ for line breaks but can't align or put horizontal space on the second line.



\item $\displaystyle
(n+1)^2+5(n+1)+1 = n^2+2n+1+5n+5+1 \\
= n^2+7n+7


Note that the equation is in-line and should start at the bullet point. I have made several attempts to indent the second line but the output always looks like

enter image description here

(Note that this is a MWE - the actual equation I'm typesetting is more complicated.) Is there a way to align the two lines of the equation at the = sign? This is indicated by the red arrow in the picture.

  • Well, that's the cause for the align environment ;-) \begin{align} (n+1)^2+5(n+1)+1 &= n^2+2n+1+5n+5+1 \\ &= n^2+7n+7 \end{align} and its variants alignat and aligned etc. – Christian Hupfer Feb 6 at 9:39
  • yes but I want the equation to start on the line with the bullet point, not after it – Medulla Oblongata Feb 6 at 9:41
  • That's why I suggested aligned as well ... – Christian Hupfer Feb 6 at 9:42

Use aligned with top vertical alignment.



\item $\begin{aligned}[t]
       (n+1)^2+5(n+1)+1 &= n^2+2n+1+5n+5+1 \\
                        &= n^2+7n+7


I removed the packages that are unnecessary for the example; amsfonts is loaded by amssymb anyway.

Are you sure you want to continue using latin1 for your documents?

enter image description here

  • No the latin1 isn't necessary. It's just part of one of the "quick start" templates offered by my Latex editor. – Medulla Oblongata Feb 6 at 9:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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