TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to position my equations as in the image below, but I cant seem to get it to work (mainly because I cant get the line breaks to work). How would I position my equation like in the image below? My latex code is below:



\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter

\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example} % same for example numbers


\title{My Thesis Title}
\author{My Name}



Let $x, y$ be some unknowns, we let:
x^2 + y^2 := (x+y)(x-y) := (1+2)(3+4) := (3*7)
= 21
= 42/2

share|improve this question
up vote 6 down vote accepted

Use amsmath's align* environment, since you already load it:

enter image description here

\usepackage{amsmath,amsthm}% http://ctan.org/pkg/{amsmath,amsthm}
\newtheorem{defn}{Definition} % definition numbers are dependent on theorem numbers

Let $x, y$ be some unknowns, we let:
  x^2 - y^2 &:= (x+y)(x-y) \\
    &:= (5+3)(5-3) \\
    &:= (8\times 2) \\
    &\phantom{:}= 16 \\
    &\phantom{:}= 32/2

Alignment is ensured using &, and using \phantom{:} you can obtain the correct spacing around the alignment "operator". That is, your = signs line up horizontally.

If you're interested in a more vertically aligned colon, use \coloneqq of the mathtools package (an extension to amsmath):

\usepackage{mathtools}% http://ctan.org/pkg/mathtools
  ... &\coloneqq ...

However, you would need to perform some magic to correctly align the = signs if you plan on doing that.

share|improve this answer
Of course the math is wrong. :) And * as the multiplication symbol is frowned upon in math circles. – egreg Mar 3 '12 at 16:03
I like the nice vertical centring of \coloneqq from the mathtools package. tex.stackexchange.com/q/4216/9043 – qubyte Mar 3 '12 at 16:05
@egreg: I was too quick with the draw there, focussing on \phantom{:}=. :-| – Werner Mar 3 '12 at 16:05
@Gary If $x^2+y^2=(x+y)(x-y)$ students would be very happy. – egreg Mar 3 '12 at 17:34
@egreg: Please accept my felicitations or, alternatively, my condolences. – Mico Mar 3 '12 at 17:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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