











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Learn Latex, see how to write functions in markup language. it is must tool for statistics and mathematics students.
Typology: Study Guides, Projects, Research
1 / 19
This page cannot be seen from the preview
Don't miss anything!
ii
iv CONTENTS
In this course, all written work must be done in LATEX. Software for composing LATEX documents is freely available online, and there are also a number of free-to-use websites for creating collaborative LATEX documents (useful for group assignments).
Links:
The important statements in mathematics each have their own environment; these include defn†, thm†, prop†, lem†, and conj†. These key words are intrinsic to my .tex file; if you use someone else’s file, the key words used to call these environments may not be the same.
Definition 1.3.1. A precise and unambiguous statement that gives meaning to a key word. Use \emph{[key word]} to highlight the key word.
Definitions do not require proof.
\begin{defn} ... \end{defn}
Theorem 1.3.2. Theorems are major mathematical results. Theorems, along with Propositions and Lemmas, are claims that require proof. Unproved claims are called conjectures.
\begin{thm} ... \end{thm}
Proposition 1.3.3. Propositions are mathematical results, but they generally do not carry the same weight as a theorem. Propositions require proof.
\begin{prop} ... \end{prop}
Lemma 1.3.4. Lemmas are small, often technical, results. Generally, lemmas are ‘helpful facts’ that are needed to prove much larger results. Lemmas require proof.
Claim 1.3.5. A catch-all term. Claims require proof.
\begin{claim} ... \end{claim}
Proof. A proof is an irrefutable, deductive argument. Be aware that there is a significant difference between giving evidence in support of a claim and proving a claim. Examples do not constitute a proof. Proofs should be written in the proof environment.
\begin{proof} ... \end{proof}
Answer: For homework problems that are not proofs, use the answer†^ environment. \begin{answer} ... \end{answer}
Conjecture 1.3.6. A conjecture is an unproven statement.
\begin{conj} ... \end{conj}
Naming definitions, theorems, etc.
You can add a ‘name’ to a definition, theorem, etc. by placing the name in square brackets imme- diately following the \begin{[environment]} command. A few examples:
\begin{defn}[even] An integer $a$ is \emph{even} if $a = 2b$ for some integer $b$. \end{defn}
Definition 1.3.7 (even). An integer a is even if a = 2b for some integer b.
\begin{thm}[Fermat’s little theorem] If $a$ is an integer and $p$ is a prime, then $a^p \equiv a \pmod p$. \end{thm}
Theorem 1.3.8 (Fermat’s little theorem). If a is an integer and p is a prime, then ap^ ≡ a (mod p).
Suppressing numbers
The automated numbering of definitions, theorems, etc. can be suppressed with an asterisk (*).
\begin{defn} This definition has no number. \end{defn}
Definition. This definition has no number.
\begin{lem}[name] This lemma has a ‘name’, but no number. \end{lem}
Lemma (name). This lemma has a ‘name’, but no number.
There are a number of environments that support lists, but I will only discuss enumerate.
(a) Again, numbering is automated. (b) And you can continue to nest lists. i. These lists may be customized further, but this should be sufficient for now.
\begin{enumerate} \item Each numbered item in the list is specified by the key word \cverb;\item;. \item Numbering is automated... \item[$\sqrt 5$.] ...but you can customize individual items using \cverb;\item[...];. \item Lists can be nested by calling \everb;enumerate; again. \begin{enumerate} \item Again, numbering is automated. \item And you can continue to nest lists. \begin{enumerate} \item These lists may be customized further, but this should be sufficient for now. \end{enumerate} \end{enumerate} \end{enumerate}
following the declaration of any numbered item, and can be recalled anywhere in the document using \eqref{[name]} for equations, and \ref{[name]} for all other items.
\begin{thm} \label{th:example theorem label} Theorem \ref{th:example theorem label} is self-referential. \end{thm} \begin{align} \label{eq:example equation label} \text{This is equation \eqref{eq:example equation label}.} \end{align}
Theorem 1.4.1. Theorem 1.4.1 is self-referential.
This is equation (1.2). (1.2)
The label-reference system is the preferred way to recall numbered items because the numbering will remain consistent even if you move these items around in your document.
1.5 Fonts
Input Output Default ABCabc123 ABCabc Bold \textbf{ABCabc123} ABCabc Italics \textit{ABCabc123} ABCabc Small capitals \textsc{ABCabc123} ABCabc Typewriter \texttt{ABCabc123} ABCabc
Input Output Default ABCabc123 ABCabc 123 Roman \mathrm{ABCabc123} ABCabc Bold \mathbf{ABCabc123} ABCabc Italics \mathit{ABCabc123} ABCabc Typewriter \mathtt{ABCabc123} ABCabc Blackboard bold^1 \mathbb{ABC} ABC Blackboard bold (more) \mathbbm{abc12} abc Calligraphic \mathcal{ABC} ABC Euler script \EuScript{ABC} ABC Fraktur \mathfrak{ABCabc123} ABCabc Script \mathscr{ABC} A BC
Note that some fonts are only available for certain characters.
(^1) How else would you write in bold on a blackboard?
Text can be written in math mode using \text{[text]} or \atext{[text]}†. These commands are particularly useful when it is inconvenient or impossible to leave math mode. Input:
\begin{align} \sum_{n=1}^\infty \frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}} \atext{is the Euler product for $\zeta(s)$ (if $\Re(s) > 1$).} \end{align}
Output:
∑^ ∞
n=
ns^
p prime
1 − p−s^
is the Euler product of ζ(s) (if <(s) > 1).
Key words should be highlighted using \emph. Visually, this has the same effect as italicizing the word (or romanizing, if the word appears in italicized text). Input: It’s time to \emph{sing}. Output: It’s time to sing. Input:
\textit{Bacon pancakes, makin’ bacon pancakes. \ Take some bacon and I put it in a pancake. \ Bacon pancakes, that’s what it’s gonna make. \ Ba- con pan- caaake \dotso in \emph{New York}}.
Output:
Bacon pancakes, makin’ bacon pancakes. Take some bacon and I put it in a pancake. Bacon pancakes, that’s what it’s gonna make. Ba- con pan- caaake... in New York.
https://www.youtube.com/watch?v=cUYSGojUuAU
1.6 Symbols
This is by no means an exhaustive list of symbols and commands. The intension is to provide a searchable reference of frequently used symbols. Nearly all of these commands are standard, but a few of the commands are my own (so you will only have access to these commands if you are using my .tex file). I have marked those commands with a dagger (†). Unless otherwise stated, the commands are only available in math mode (the purple text must be placed between dollar signs to be displayed properly).
Input Output (a,b) (a, b) [a,b] [a, b] |a,b| |a, b| |a,b| ‖a, b‖ {a,b} {a, b} \langle a,b \rangle 〈a, b〉 \Floor{\frac{a}{b}}†^
⌊a b
Resizing delimiters
These symbols can be automatically resized using the \left and \right commands.
Input: \left{ \Floor{ \left( a^n \right)^{n^2} }^{\frac{1}{2n-1}} \right} Output: {⌊ (an)n
2 ⌋^2 n^1 − 1
The \left and \right commands do not need to take the same delimiters, but they do have to be paired. A period. can be used to produce one-sided delimiters.
Input:
\begin{align} \int_a^b x,dx = \left. \frac{x^2}{2} \right|_a^b \end{align}
Output: ∫ (^) b
a
x dx =
x^2 2
b
a
Command Example Comma separated lists \dotsc 1, 2, 3, \dotsc, 9 1 , 2 , 3 ,... , 9 Lower dots \ldots 1, 2, 3,\ldots,9 1 , 2 , 3 ,... , 9 Binary expressions \dotsb 1 + 2 + \dotsb + 9 1 + 2 + · · · + 9 Centered dots \cdots 1+2+\cdots+9 1 + 2 + · · · + 9 Multiplication (binary) \cdot a \cdot b a · b Multiplication \dotsm 1 \cdot 2 \cdot 3 \dotsm 9 1 · 2 · 3 · · · 9 Otherwise [wide ellipsis] \dotso a, b, c, \dotso, z a, b, c,... , z Vertical dots \vdots
Diagonal dots \ddots
Input Output Example Translation \to → f \colon A \to B f : A → B f is a map from A to B \into†^ ↪→ f \colon A \into B f : A ↪→ B f is an injective map from A to B (f maps A into B) \onto†^ f \colon A \onto B f : A B f is a surjective map from A to B (f maps A onto B) \isom†^ ∼ → f \colon A \isom B f : A ∼ → B f is a bijective map from A to B (f is an isomorphism from A to B) \circ ◦ f \circ g f ◦ g f composed with g \mapsto 7 → x \mapsto f(x) x 7 → f (x) x is mapped to f (x) f\inv†(x) f −^1 (x) \sin\inv(\theta) sin−^1 (θ) f inverse, arcsine theta
Defining functions: Input: f \colon A \to B Output: f : A → B Input:
\begin{align} f \colon A &\to B \ x &\mapsto f(x) \end{align}
Output:
f : A → B x 7 → f (x)
Remark 1.6.1. Use \colon (not :) for proper spacing.
Input:
\begin{align} f \colon \mathbb{R} &\to \mathbb{R} \ x &\mapsto x^ \end{align}
Output:
f : R → R x 7 → x^2
Translation: f is the function from the real numbers to the real numbers that maps x to x^2. (In other words, f (x) = x^2 .) Input:
\begin{align} f \colon \mathbb{Z} &\to \mathbb{F}_p \ a &\mapsto a \bmod p \end{align}
Input Output Example Translation
\sum
\sum_{n=1}^{\infty} n^{-s}
n=
n−s^ the sum, from 1 to infinity, of n to the minus s
\prod
\prod_{k=1}^{n} k
∏^ n
k=
k the product of the first n natural numbers
\bigcup
\bigcup_{i=1}^{\infty} A_i
i=
Ai the union, from 1 to infinity, of the Ai
\bigcap
\bigcap_{i=1}^{n} A_i
⋂^ n
i=
Ai the intersection, from 1 to n, of the Ai
Input Output Example Translation \implies†^ ⇒ X \implies Y X ⇒ Y X implies Y \impliedby†^ ⇐ X \impliedby Y X ⇐ Y X is implied by Y \iff†^ ⇔ X \iff Y X ⇔ Y X if and only if Y \contradiction†^ ⇒⇐ contradiction \neg ¬ \neg X ¬X not X (negate X) also... \sim ∼ \sim X ∼ X it is not true that X \land ∧ X \land Y X ∧ Y X and Y \lor ∨ X \lor Y X ∨ Y X or Y \forall ∀ \forall a \in A ∀a ∈ A for all elements in A \exists ∃ \exists b \in B ∃b ∈ B there exists a b in B !! \exists !b \in B ∃!b ∈ B there exists a unique b in B
The left quotation key is used to produce appropriate facing quotation marks.
Input Output "Quotation marks always face right." ”Quotation marks always face right.” ‘Use the left-facing mark...’ ‘Use the left-facing mark...’ ‘‘...for left-facing quotation marks." “...for left-facing quotation marks.”
Defining sets: Input: A = { [elements] : [conditions]} Output: A = {[elements] : [conditions]}
Remark 1.6.2. Use : (not \colon) for proper spacing.
Example: Input: \mathbb{N} = { a \in \mathbb{Z} : a > 0 } Output: N = {a ∈ Z : a > 0 } Translation: The natural numbers are the set of elements in the integers that are greater than. (The natural numbers are the set of positive integers.)
Example: Input: \mathbb{Q} = \left{ \frac{a}{b} : a,b \in \mathbb{Z}, b \ne 0 \right} Output: Q =
{a b :^ a, b^ ∈^ Z, b^6 = 0
Translation: The rational numbers are the set of numbers of the form a/b, where a and b are integers, and b is non-zero.
Input Output Example Translation \in ∈ a \in A a ∈ A a is an element of A \subseteq ⊆ A \subseteq B A ⊆ B A is a subset of B \subset ⊂ A \subset B A ⊂ B A is a proper subset of B \supseteq ⊇ A \supseteq B A ⊇ B A contains B (as a subset) \supset ⊃ A \supset B A ⊃ B A contains B as a proper subset = = A = B A = B A is equal to B \cong ∼= A \cong B A ∼= B A is isomorphic to B \cup ∪ A \cup B A ∪ B A union B \cap ∩ A \cap B A ∩ B A intersect B
Negations:
Input Output \notin ∈/ \not\subseteq 6 ⊆ \not\subset 6 ⊂ \not\supseteq 6 ⊇ \not\supset 6 ⊃
Most of these commands are valid in both math mode and text mode.
Input Output % blue (box) % white (box) \colorbox{blue!100}{\color{red!0}red} red 100 0 \colorbox{blue!90}{\color{red!10}red} red 90 10 \colorbox{blue!80}{\color{red!20}red} red 80 20 \colorbox{blue!70}{\color{red!30}red} red 70 30 \colorbox{blue!60}{\color{red!40}red} red 60 40 \colorbox{blue!50}{\color{red!50}red} red 50 50 \colorbox{blue!40}{\color{red!60}red} red 40 60 \colorbox{blue!30}{\color{red!70}red} red 30 70 \colorbox{blue!20}{\color{red!80}red} red 20 80 \colorbox{blue!10}{\color{red!90}red} red 10 90 \colorbox{blue!0}{\color{red!100}red} red 0 100
More than one color can be specified as inputs as long as the colors are separated by “percent”. The last color is always used to fill out the mixture.
Input Output % Cyan % Magenta \colorbox{Cyan!0!Magenta}{text} text 0 100 \colorbox{Cyan!10!Magenta}{text} text 10 90 \colorbox{Cyan!20!Magenta}{text} text 20 80 \colorbox{Cyan!30!Magenta}{text} text 30 70 \colorbox{Cyan!40!Magenta}{text} text 40 60 \colorbox{Cyan!50!Magenta}{text} text 50 50 \colorbox{Cyan!60!Magenta}{text} text 60 40 \colorbox{Cyan!70!Magenta}{text} text 70 30 \colorbox{Cyan!80!Magenta}{text} text 80 20 \colorbox{Cyan!90!Magenta}{text} text 90 10 \colorbox{Cyan!100!Magenta}{text} text 100 0
The reason why I put “percent” in quotation marks is because when mixing more than two colors, the numbers may not be what you expect.
Input Output % red % blue % yellow \colorbox{red!50!blue!66!yellow}{text} text 33 33 34 \colorbox{red!33!blue!33!yellow}{text} text 11 22 67 Input Output % red % blue % white \colorbox{red!50!blue}{text} text 50 50 0 \colorbox{red!50!blue!50}{text} text 25 25 50 \colorbox{red!33!blue!33!white!33}{text} text 4 7 89
However if you want to be this specific about blending colors, you might as well use rgb, html, or one of the other standard conventions for specifying colors. (See the LATEX Wikibook for details.)
†These commands are unique to my .tex file.