<<

LATEX Math for Undergrads Entering \{x+y} produces x + y, and \widehat{x+y} gives x\widehat+ y . Comment on an expression as Rule One Any mathematics at all, even a single character, here (there is also \overbrace{..}). gets a mathematical setting. Thus, for ``the value of x is 7 '' enter the value of $x$ is $7$. x + y \underbrace{x+y}_{|A|} \underbrace{} \underbrace{} Template Your document should contain at least this. |A | \documentclass{article} Dots Use low dots in a list \{0 , 1, 2,...\} , entered as \usepackage{mathtools,amssymb,amsthm} % imports amsmath \{0,1,2,\,\ldots\}. (If you use \ldots in as \begin{document} with London, Paris, \ldots{}\,. then note the thinspace --document body here-- \end{document} \, before the period.) Use centered dots in a sum or prod- uct 1 + \cdot \cdot + 100, entered as 1+\cdots+100. You can also get Common constructs vertical dots \vdots and diagonal dots \ddots. \surd \surd n Roman names Enter , with a backslash, instead x2 x^2 2, 3 \sqrt{2}, \sqrt[n]{3} \tan(x) 2 of tan(x). These get the same treatment. xi,j x_{i,j} 3 , 2/3 \frac{2}{3}, 2/3 sin \sin sinh \sinh arcsin \arcsin Calligraphic letters Use as in $\mathcal{A}$. cos \cos cosh \cosh arccos \arccos \scrA \scrB \scrC \scrD \scrE \scrF\scrG\scrH\scrI\scrJ\scrK\scrL\scrM\scrN\scrO\scrP\scrQ\scrR\scrS\scrT\scrU\scrV\scrW\scrX\scrY\scrZ tan \tan tanh \tanh arctan \arctan sec \sec coth \coth min \min Get script letters, such as P from $\mathscr{P}$, by csc \csc det \det max \max putting \usepackage{mathrsfs} in the preamble. cot \cot dim \dim inf \inf Greek exp \exp ker \ker sup \sup log \log deg \deg lim inf \liminf \alpha \alpha \xi , \Xi \xi, \Xi ln \ln arg \arg lim sup \limsup \beta \beta o o lg \lg gcd \gcd lim \lim \gamma , \Gamma \gamma, \Gamma \pi , \Pi \pi, \Pi \delta , \Delta \delta, \Delta \varpi \varpi Other symbols \ \epsilon \ \rho < < \angle \cdot \cdot \varepsilon \varepsilon \varrho \varrho \angle \leq \leq \measuredangle \pm \pm \zeta \zeta \sigma , \Sigma \sigma, \Sigma \measuredangle > > \ell \ell \mp \mp \eta \eta \varsigma \varsigma \geq \geq \| \parallel \times \times \theta \Theta \theta, \Theta \ \tau \not = \neq 45\circ 45^{\circ} \div \div \vargamma \vartheta \upsilon , \Upsilon \upsilon, \Upsilon \ll \ll =\sim \cong \ast \ast \iota \iota \ , \Phi \phi, \Phi \gg \gg \ncong | \mid \kappa \kappa \varphi \varphi \ncong \approx \approx \sim \sim \nmid \lambda \Lambda \lambda, \Lambda \ \chi \nmid \asymp \asymp \simeq \simeq n! n! \mu \mu \psi , \Psi \psi, \Psi \equiv \equiv \nsim \partial \partial \nu \nu \ , \Omega \omega, \Omega \nsim \prec \prec \oplus \oplus \nabla \nabla Sets and logic \preceq \preceq \ominus \ominus \hbar \hbar \succ \succ \odot \odot \circ \circ \cup \cup \mathbb{} \forall \forall \BbbR \succeq \succeq \otimes \otimes \surd \star \star \cap \cap \BbbZ \mathbb{Z} \exists \exists \propto \propto \oslash \oslash \surd . \subset \subset \BbbQ \mathbb{} \neg \neg = \doteq \upharpoonright \upharpoonright \checkmark \checkmark \subseteq \subseteq \BbbN \mathbb{N} \vee \vee Use a\mid b for the divides relation, a | b, and \supset \supset \BbbC \mathbb{C} \wedge \wedge a\nmid b for the negation, a b. Also use \mid to \supseteq \supseteq \varnothing \varnothing \vdash \vdash \nmid \in \in \emptyset \emptyset |= \models get set builder notation \{a \in S | a is odd\}, with \in/ \notin \aleph \aleph \setminus \setminus \{a\in S\mid\text{$a$ is odd}\}. Arrows Negate an operator, as in \not \subset, with \not\subset. Get the set complement A\sansc with A^{\mathsf{c}} (or A\complement with \rightarrow \rightarrow, \to \mapsto \rightarrow \mapsto A^{\complement}, or A with \overline{A}). \nrightarrow \nrightarrow \mapsto -\rightarrow \longmapsto Decorations - \rightarrow \longrightarrow \leftarrow \leftarrow \Rightarrow \Rightarrow \updownarrow \leftrightarrow \ f f’ a\. \dot{a} x\~ \{x} \nRightarrow \nRightarrow \downarrow \downarrow f \prime \prime f’’ a\" \ddot{a} x\= \bar{x} =\Rightarrow \Longrightarrow \uparrow \uparrow \ast \Sigma \Sigma^{*} x\^ \hat{x} \vec{}x \vec{x} \rightsquigarrow \leadsto \updownarrow \updownarrow If the decorated letter is i or j then some decorations need The right arrows in the first column have matching left \imath or \jmath, as in \vec{\imath}. Some authors use arrows, such as \nleftarrow, and there are some other boldface for vectors: \boldsymbol{x}. matches for down arrows, etc. \sum3 2 Variable-sized operators The summation j=0 j Displayed equations The equation* environment puts \int 3 2 an equation on a separate line. \sum_{j=0}^3 j^2 and the integral x=0 x dx \int_{x=0}^3 x^2\,dx expand when displayed. \begin{equation*} S = k \cdot lg W S=k\cdot\lg W 3 \end{equation*} \sum \int 3 j2 x2 dx j=0 x=0 You can break into multiple lines. x3 These do the same. sin(x) = x - \begin{multline*} \sin (x)=x-\frac{x^3}{3!} \\ \int \int \int \bigcup 3! \int \iiint \bigcup 5 +\frac{x^5}{5!}-\cdots x \end{multline*} \int \int \iint \oint \oint \bigcap \bigcap + - \cdot \cdot 5! Fences Align equations using align* () () \langle \rangle \langle\rangle | | | | \begin{align*} \nabla \cdot \bfitD = \rho \nabla\cdot\boldsymbol{D} &= \rho \\ [] [] \lfloor \rfloor \lfloor\rfloor \| \| \| \| \nabla\cdot\boldsymbol{B} &= 0 \{ \} \{\} \lceil \rceil \lceil\rceil \nabla \cdot \bfitB = 0 \end{align*}

Fix the size with \big, \Big, \bigg, or \Bigg. (the left or right side of an alignment can be empty). For n each environment, get a numbered version by dropping the \Bigl[ \sum k2 \Bigr] e \Big[\sum_{k=0}^n e^{k^2}\Big] asterisk from the name. k=0 Calculus examples The last three here are display style. To have them grow with the enclosed formula, use \left and \right (although sometimes \big, etc., are necessary). f : \BbbR \rightarrow \BbbR f\colon\mathbb{R}\to\mathbb{R}

\Bigl\langle i \Bigr\rangle i, 22 \left\langle i,2^{2^i}\right\rangle 9.8 m/s2 9.8~\text{m}/\text{s}^2 f(x + h) - f(x) Every \left must match a \right and they must end on \mathrm{l}\mathrm{i}\mathrm{m} \lim_{h\to 0}\frac{f(x+h)-f(x)}{h} h\rightarrow 0 h the same line in the output. For a one-sided fence, put a \int 2 3 \left. or \right. on the other side. x dx = x /3 + C \int x^2\,dx=x^3/3+C \bigm| d d d df \bigm| \nabla = \bfiti + \bfitj + \bfitk \nabla=\boldsymbol{i}\frac{d}{dx}+ \cdot \cdot \bigm| \left.\frac{df}{dx}\right|_{x_0} dx dx dy dz \bigm| x0 Discrete mathematics examples There are four Arrays, Matrices Make an array of mathematical text as modulo forms: m mod n is from m\bmod n, and a \equiv b you make a table of plain text. (mod m) is from a\equiv b\pmod m, and a \equiv b mod m 0 \updownarrow 0 \begin{array}{rcl} is from a\equiv b\mod m, and a \equiv b (m) is from 1 \updownarrow 1 0 &\leftrightarrow &0 \\ 1 &\leftrightarrow &1 \\ a\equiv b\pod m. 2 \updownarrow 4 2 &\leftrightarrow &4 \\ For combinations the binomial symbol \bigl( n\bigr) is from . . \vdots& &\vdots k . . \end{array} \binom{n}{k}. This resizes to be bigger in a display (to require the display version use \dbinom{n}{k} and require Definition by cases is an array with two columns. the inline version with \tbinom{n}{k}). For permutations use nr from n^{\underline{r}} (some \Biggl\{ f_n = authors use P (n, r), or P from {}_nP_r). a if n = 0 \begin{cases} n r fn = a &\text{if $n=0$} \\ Statistics examples r \cdot fn 1- else r\cdot f_{n-1} &\text{else} \end{cases} 2 \sqrt{} \sum 2 \sigma = (xi - \mu ) /N \sigma^2=\sqrt{\,\sum (x_i-\mu)^2/N} \sum A matrix is an array with fences. With a pmatrix environ- E(X) = \mu X = (xi - P (xi)) E(X)=\mu_X=\sum (x_i-P(x_i)) ment, you need not specify column alignments. The probability density of the normal distribution \begin{pmatrix} \biggl( \biggr) 2 a b a &b \\ 1 - (x \mu- ) \surd e 2\sigma 2 c d c &d 2 \end{pmatrix} 2\sigma \pi comes from this. For the determinant use |A| inline and vmatrix in display. \surd \surd \frac{1}{sqrt{2\sigma^2\pi}} Spacing in mathematics Improve 2x to 2 x with a \,e^{-\frac{(x-\mu)^2}{2\sigma^2}}!. , as in \sqrt{2}\,x. Slightly wider are \: and \; (the three are in ratio 3 : 4 : 5). Get the improvement of For more See also the Comprehensive LATEX Symbols List n/log n instead of n/ log n by using a negative thin space, at mirror..org/info/symbols/comprehensive and as in n/\!\log n. Bigger spaces are: \quad for \rightarrow, \leftarrow and DeTEXify at detexify.kirelabs.org/classify.html. \qquad for \rightarrow, \leftarrow which are useful between parts of a display. Get arbitrary space as in \hspace*{0.5cm}. Jim Hefferon, Saint Michael’s College, VT USA 2020-Dec-30