\documentclass[12pt]{amsart} \usepackage{amsmath, amssymb, amsthm, amsfonts, amssymb, latexsym, hyperref, graphicx, color} \begin{document} \begin{center} \textbf{align, arrays and tables} \end{center} \ \textbf{Align}: the align command is very similar to the eqnarray command., it's automatically in the mathematics environment, it also uses \& to separate columns: \begin{align*} \sum_{i=1}^n x_i &= x^2 + y^2 & x+y =1 & \mbox{ comment 1 }&\mbox{ comment 2 }\\ &= \sin^2\theta + \cos^2 \theta & & \mbox{ comment 3}\\ &= \sin^2\theta + \cos^2 \theta & & \mbox{ comment 3}\\ &= \sin\big(\frac 1x \Big) & & \mbox{ comment 4}\\ & \in P \cup Q & & z=x^3 & \mbox{ comment F } \\ & \in M \end{align*} \ Removing the * causes automatic numbering (unless you stipulate otherwise): \begin{align} \sum_{i=1}^n x_i &= x^2 + y^2 & x+y =1 & \mbox{ comment 1 }&\mbox{ comment 2 }\\ &= \sin^2\theta + \cos^2 \theta & & \mbox{ comment 3}\\ &= \sin^2\theta + \cos^2 \theta & & \mbox{ comment 3} \nonumber\\ &= \sin\big(\frac 1x \Big) & & \mbox{ comment 4}\\ & \in P \cup Q & & z=x^3 & \mbox{ comment F } \\ & \in M \end{align} \textbf{Arrays.} Here's an array as part of your text as this simple example illustrates: $ \begin{array}{cc} a & b \\ x & y \end{array}$ is a two-by-two matrix. The \& symbol separates entries on a line; the $\backslash \backslash$ separates the lines; the $\{cc\}$ says to center the entries in each cell (one ``c'' for each column.) Here's a three-by-four matrix centered in the text - note that arrays need to be in the mathematics environment (between \$ signs.) : $$ \begin{array}{ccc} a+ b+ x & b & c \\ x & y & z \\ p & q & r \\ u & v & w + a + 4 \end{array}$$ Use $\{lll\}$ to left justify each cell $$ \begin{array}{lll} a+ b+ x & b & c \\ x & y & z \\ p & q & r \\ u & v & w + a + 4 \end{array}$$ and $\{rrr\}$ to right justify each cell $$ \begin{array}{rrr} a+ b+ x & b & c \\ x & y & z \\ p & q & r \\ u & v & w + a + 4 \end{array} $$ To make it look like a matrix we need to add the end bars: $$ \left [ \begin{array}{ccc} a & b & c \\ x & y & z \\ p & q & r \\ u & v & w \end{array} \right ]$$ Here's a nice matric equation: $$AB = \left [ \begin{array}{ccccc} a_{1,1} & a_{1,2} & ... & a_{1,n} \\ a_{2,1} & a_{2,2} & ... & a_{2,n} \\ \vdots \\ a_{m,1} & a_{m,2} & ... & a_{m,n} \end{array} \right ] \left [ \begin{array}{ccccc} b_{1,1} & b_{1,2} & ... & b_{1,k} \\ b_{2,1} & b_{2,2} & ... & b_{2,k} \\ \vdots \\ b_{n,1} & b_{n,2} & ... & a_{n,k} \end{array} \right ]= \left [ \begin{array}{ccccc} c_{1,1} & c_{1,2} & ... & c_{1,k} \\ c_{2,1} & c_{2,2} & ... & c_{2,k} \\ \vdots \\ c_{n,1} & \ & ... & c_{m,k} \end{array} \right ]= C$$ \newpage You can also use this to define complicated functions (note my use of the ``message box'' $\backslash \mbox{mbox\{ ... \}}$): $f = \left \{ \begin{array}{c l} x^2 + \sin x & \mbox{if } x < 0 \\ x^3 + \cos x & \mbox{if } 0 \le x \le 1 \\ 2x + \tan x & \mbox{if } 1 < x \le 2 \\ x+ 7 & \mbox{if } 2 < x \end{array} \right .$ \ Next we consider equation array formats that allow you to write a list of equations. Note that it is automatically in the mathematics environment and you DO NOT need the \$ to enclose the equation arrays \begin{eqnarray} \int \psi (a \hat f)^{\dagger} \phi dq & = & \int \phi (a \hat f)^* \psi dq \\ & = & \int \phi (a \hat f ( \psi^*))^* dq \\ & = & \int \phi a^* (\hat f ( \psi^*))^* dq \\ & = & a^* \int \phi \hat f^* ( \psi) dq \\ & = & a^* \int \psi \hat f^{\dagger} ( \phi) dq. \end{eqnarray} Notice how it automatically numbers. If you don't want the numbering add an * symbol: \begin{eqnarray*} \int \psi (a \hat f)^{\dagger} \phi dq & = & \int \phi (a \hat f)^* \psi dq \\ & = & \int \phi (a \hat f ( \psi^*))^* dq \\ & = & \int \phi a^* (\hat f ( \psi^*))^* dq \\ & = & a^* \int \phi \hat f^* ( \psi) dq \\ & = & a^* \int \psi \hat f^{\dagger} ( \phi) dq. \end{eqnarray*} If you just want some of the lines numbered you need to tell it which lines not to number. \begin{eqnarray} \int \psi (a \hat f)^{\dagger} \phi dq & = & \int \phi (a \hat f)^* \psi dq \\ & = & \int \phi (a \hat f ( \psi^*))^* dq \nonumber \\ & = & \int \phi a^* (\hat f ( \psi^*))^* dq \nonumber \\ & = & a^* \int \phi \hat f^* ( \psi) dq \nonumber \\ & = & a^* \int \psi \hat f^{\dagger} ( \phi) dq. \end{eqnarray} And observe how it continues the consecutive numbering. Another example: \begin{eqnarray*} A & = & B \\ & \in & S \\ & \subset & U \\ a^2 = b^2 & \equiv & c^2 \\ & = & d^3 . \end{eqnarray*} \ \textbf{Tables.} First an example then an explanation on how it is set up. Tables are part of the non-mathematics environment, so if you want mathematics formulas included you need to use the \$ as usual \begin{tabular}{|c|c|c|} \hline animal & name & $P \vee Q$ \\ \hline cat & Felix & $a^2 + b^2$ \\ dog & Pluto & $\sqrt{x^2 + y^2}$ \\ octopus & Romeo & $3x$ \\ tiger & Tiger & $\frac{\pi}{2}$ \\ \hline \end{tabular} Here's how you center it: \begin{center} \begin{tabular}{|c|c|c|} \hline animal & name & $P \vee Q$ \\ \hline cat & Felix & $a^2 + b^2$ \\ dog & Pluto & $\sqrt{x^2 + y^2}$ \\ octopus & Romeo & $3x$ \\ tiger & Tiger & $\frac{\pi}{2}$ \\ \hline \end{tabular} \end{center} Observe that the syntax is similar to the array environment. And so hopefully most of it is self explanatory by now. When defining column alignment you also need to specify where vertical dividers occur with the $|$ symbol. For example $\backslash$begin\{tabular\}{$|$ cc$|$ cc$|$ } ... will give you four columns, bounded on the far left and right with vertical lines, with a vertical line between the 2nd and 3rd column. Again c stands for centering the entry to left ore right justify use l and r respectively. The $\backslash$hline tells where to put in horizontal lines. \ \begin{center} \begin{tabular}{|c|r||l|} \hline \mbox{centered} & \mbox{right justified} & \mbox{left justified} \\ \hline cat & Felix & $a^2 + b^2$ \\ \hline dog & Pluto & $\sqrt{x^2 + y^2}$ \\ \hline octopus & Romeo & $3x$ \\ \hline \end{tabular} \end{center} \newpage \textbf{Inserting pictures.} This is easy if you use pdfLaTex process. Just insert the command $\backslash$usepackage\{graphicx\} before the begin document command (only Not how this appears in the LaTex file (I had to cheat to make it look right), but as I've placed it in the beginning of my document). The syntax is $\backslash$includegraphics[scale=0.05]\{Windmill\}. The image itself needs to be a .jpg file and has to be located in the same folder as your LaTex file. Between the \{ \} symbols is the name of the image file (without the .jpg extension) and the scale = 0.05 scales down my picture to 5\% (it was a big file.) I centered it as usual. \begin{center} \includegraphics[scale=0.05]{Windmill} \end{center} \newpage \textbf{Commuting Functions Charts.} \ $$ \begin{array}{ccc} x_{i-1} \in f_{i-1}(x_i) & \begin{array}{c} f_{i-1} \\ {\longleftarrow} \end{array} & x_i \\ \downarrow & & \downarrow \\ p_{i-1} \in g_{i-1}(p_i) & \begin{array}{c} g_{i-1} \\ {\longleftarrow} \end{array} & p_i \end{array}.$$ \ $$ \begin{array}{ccc} A & \begin{array}{c} f_{i-1} \\ {\longleftarrow} \end{array} & B \\ \downarrow & & \downarrow \\ C & \begin{array}{c} g_{i-1} \\ {\longleftarrow} \end{array} & D \end{array}.$$ \ $$ \begin{array}{ccc} A & \begin{array}{c} f_{i-1} \\ {\longleftarrow} \end{array} & B \\ & \begin{array}{c} {\nwarrow} \\ h_{i-1} \end{array} & \downarrow \\ C & \begin{array}{c} g_{i-1} \\ {\longleftarrow} \end{array} & D \end{array}.$$ \ \end{document}