## LaTeX forum ⇒ Math & Science ⇒ Basic Algebra

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Posts: 42
Joined: Fri Oct 17, 2008 5:55 pm

### Basic Algebra

I am trying to make a beamer presentation for my class on the basic methods of algebra. Basicly i want to be able to take an equation like 5x+3=2x-5 and show step by step that you subtract 5x from both sides and thenn add 5 to both sides. I would like to be able to "line up" the "x's" and "numbers". I tried using the align feature however it puts a large gap between the alignment &.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
You might try either an array or matrix environment. Or possibly alignat. Voss's mathmode document would describe the various options.

(E.g -- requires amsmath ... )
$\begin{array}{@{}r@{\,}c@{\,}r@{\,}c@{\,}r@{\,}c@{}r@{\,}} 5x&+&3&=& 2x&-&5\\-5x& & & &-5x& & \\ 0&+&3&=&-3x&-&5\\ 0&+&3&=&-3x&-&5\\ &+&5& & &+&5\\ & &8&=&-3x& & \\\end{array}$