You are on page 1of 2

LATEX Math for Undergrads Entering \textbackslash overline\{x+y\} produces x + y, and

\textbackslash 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 \textbackslash overbrace\{..\}).
gets a mathematical setting. Thus, for ``the value of x is 7 ''
enter the value of \$x\$ is \$7\$. x+y \textbackslash underbrace\{x+y\}\]\{|A|\}
\underbrace{} \underbrace{}
Template Your document should contain at least this. | A|

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

Fix the size with \textbackslash big, \textbackslash Big, \textbackslash bigg, or \textbackslash Bigg. (the left or right side of an alignment can be empty). For
n
\Bigl[ \sum \Bigr] each environment, get a numbered version by dropping the
2
ek \textbackslash Big[\textbackslash sum\]\{k=0\}\textasciicircum n e\textasciicircum \{k\textasciicircum 2\}\textbackslash 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 \textbackslash left
and \textbackslash right (although sometimes \textbackslash big, etc., are necessary). f : \BbbR \rightarrow \BbbR f\textbackslash colon\textbackslash mathbb\{R\}\textbackslash to\textbackslash mathbb\{R\}
\Bigl\langle i
\Bigr\rangle
i, 22 \textbackslash left\textbackslash langle i,2\textasciicircum \{2\textasciicircum i\}\textbackslash right\textbackslash rangle 9.8 m/s2 9.8\textasciitilde \textbackslash text\{m\}/\textbackslash text\{s\}\textasciicircum 2
f (x + h) - f (x)
Every \textbackslash left must match a \textbackslash right and they must end on \mathrm{l}\mathrm{i}\mathrm{m} \textbackslash lim\]\{h\textbackslash to 0\}\textbackslash 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
\textbackslash left. or \textbackslash right. on the other side. x dx = x3 /3 + C
2
\textbackslash int x\textasciicircum 2\textbackslash ,dx=x\textasciicircum 3/3+C
d d d
\bigm|
df \bigm| \bigm| \nabla = \bfiti + \bfitj + \bfitk \textbackslash nabla=\textbackslash boldsymbol\{i\}\textbackslash frac\{d\}\{dx\}+ \cdot \cdot \cdot
\textbackslash left.\textbackslash frac\{df\}\{dx\}\textbackslash right|\]\{x\]0\} dx dy dz
dx \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\textbackslash bmod n, and a \equiv b
you make a table of plain text.
(mod m) is from a\textbackslash equiv b\textbackslash pmod m, and a \equiv b mod m
0 \updownarrow 0 \textbackslash begin \{ array \}\{ rcl \}
is from a\textbackslash equiv b\textbackslash mod m, and a \equiv b (m) is from
1 \updownarrow 1 0 \&\textbackslash lef tright arrow \&0 \textbackslash \textbackslash
1 \&\textbackslash lef tright arrow \&1 \textbackslash \textbackslash a\textbackslash equiv b\textbackslash pod m.
2 \updownarrow 4 2 \&\textbackslash lef tright arrow \&4 \textbackslash \textbackslash
For combinations the binomial symbol nk is from
\bigl( \bigr)
.. .. \textbackslash vdots \& \&\textbackslash vdots
. . \textbackslash end \{ array \} \textbackslash binom\{n\}\{k\}. This resizes to be bigger in a display (to
require the display version use \textbackslash dbinom\{n\}\{k\} and require
Definition by cases is an array with two columns. the inline version with \textbackslash tbinom\{n\}\{k\}).
For permutations use nr from n\textasciicircum \{\textbackslash underline\{r\}\} (some
f\]n =
\Biggl\{ authors use P (n, r), or n Pr from \{\}\]nP\]r).
a if n = 0 \textbackslash begin \{ cases \}
fn = a \&\textbackslash text \{ if \$n =0 \$ \} \textbackslash \textbackslash Statistics examples
r \cdot fn - 1 else r \textbackslash cdot f\] \{n -1\} \&\textbackslash text \{ else \}
\textbackslash end \{ cases \} \sqrt{} \sum
\sigma 2 = (xi - \mu )2 /N \textbackslash sigma\textasciicircum 2=\textbackslash sqrt\{\textbackslash ,\textbackslash sum (x\]i-\textbackslash mu)\textasciicircum 2/N\}
\sum
A matrix is an array with fences. With a pmatrix environ- E(X) = \mu X = (xi - P (xi )) E(X)=\textbackslash mu\]X=\textbackslash sum (x\]i-P(x\]i))
ment, you need not specify column alignments.
The probability density of the normal distribution
\biggl( \biggr) \textbackslash begin \{ pmatrix \}
a b 1 (x - \mu )2
e -
a \& b \textbackslash \textbackslash
c \& d \surd 2\sigma 2
c d 2\sigma 2 \pi
\textbackslash end \{ pmatrix \}

comes from this.


For the determinant use |A| inline and vmatrix in display.
\surd \surd \textbackslash frac \{1\}\{ sqrt \{2\textbackslash sigma \textasciicircum 2\textbackslash pi \}\}
Spacing in mathematics Improve 2x to 2 x with a \textbackslash , e \textasciicircum \{ -\textbackslash frac \{( x -\textbackslash mu )\textasciicircum 2\}\{2\textbackslash sigma \textasciicircum 2\}\}!.
thin space, as in \textbackslash sqrt\{2\}\textbackslash ,x. Slightly wider are \textbackslash : and
\textbackslash ; (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.ctan.org/info/symbols/comprehensive and
as in n/\textbackslash !\textbackslash log n. Bigger spaces are: \textbackslash quad for \rightarrow \leftarrow , and DeTEXify at detexify.kirelabs.org/classify.html.
\textbackslash qquad for \rightarrow \leftarrow , which are useful between parts of a
display. Get arbitrary space as in \textbackslash hspace*\{0.5cm\}. Jim Hefferon, Saint Michael's College, VT USA 2020-Dec-30

You might also like