# Homework Help: How to write a = b = c = d all aligned

1. Sep 14, 2009

### Butelle

1. The problem statement, all variables and given/known data

Hi, I was just wondering how to write a = b = c = d all aligned - like not in 2 columns

I have been messing around with & alot and I still can't get it. I know its simple I just am a first time user of Latex so any help would be aprreciated!

2. Sep 14, 2009

### fatra2

Re: Latex

Hi there,

The ampersand (&) in LaTeX is used in the math environment to align different lines of the equation. Meaning that, with multiple lines equations, the characters between the ampersand will be align.

For your question, I don't think I completely understand what is your intention. What do you want to align in this equation??? If you just want to center the equation, you can simply use the $$a = b = c = d$$.

Cheers

3. Sep 14, 2009

### Butelle

Re: Latex

Thanks for you reply. I intended to have lots of equations like:
a = b = c = d
f = g = h = i and like for them all to be aligned at the equals signs. Is that possible?

4. Sep 14, 2009

### fatra2

Re: Latex

Sure thing,

You might want to try something like:

Code (Text):
\begin{eqnarray*}
a = b &=& c = d \\
e = f &=& g = h
\end{eqnarray*}
which would align the two lines at the &=&. You can vary to have it align somewhere else, like:

Code (Text):
\begin{eqnarray*}
a = b = &c& = d \\
e &=& f = g = h
\end{eqnarray*}
Hope this helps.

Cheers

5. Sep 14, 2009

Re: Latex

thank you!