note - 921 views

LaTeX reference

LATEX is a typesetting language that renders beautiful mathematical equations making it much easier to read, and makes your work look very professional.  If you are thinking of studying math or computer science, you will need to learn sooner or later, why not now?

Here is a quick guide to LaTeX: https://fr.overleaf.com/latex/templates/a-quick-guide-to-latex/fghqpfgnxggz

The following is a reference for commonly used commands from past years' MAT137 Piazza forum, composed with the collective efforts of many students and TAs. You can use these commands here on Piazza by surrounding the code with double dollar signs before and after.  (In regular LATEX, you would use single dollar signs instead). 

Fun facts 

1. Surrounding LATEX equations by dollar signs is a reminder of how costly it was back in the days to print equations on paper.

This site’s a lifesaver for finding symbols: http://detexify.kirelabs.org/classify.html

Feel free to add to and edit this list. Please try to keep it relevant, clear, and concise for everyone's benefit. Log your changes in the discussion below.

If you have questions, ask below!  And help each other.

CodeResult
Common Elements
a^{2} + b^{2} = c^{2}a2+b2=c2
a_{n}x^{n} + a_{n-1}x^{n-1} + \ldots + a_{1}x + a_{0}anxn+an1xn1++a1x+a0
f(x) = \frac{P(x)}{Q(x)}f(x)=P(x)Q(x)
f(x) = \sqrt[n]{x}f(x)=xn
x \geq yxy
x \leq yxy
x \gg yxy
x \ll yxy
\pm, \neq, \approx, \nless, \ngtr, \nleq, \ngeq, \infty, \cdot±,,,,,,,,
|x| = \left\{
\ begin{array}{rl}
x & \text{ if } x \geq 0 \\
-x & \text{ if } x < 0
\end{array}
\right.
|x|={xx if x0 if x<0
\delta(x)=
\ begin{cases}
\infty & \text{if} x=0 \\
0 & \text{otherwise}
\end{cases}
δ(x)={0if x=0otherwise
\mathbb{R}, \mathbb{N}, \mathbb{Z}, \mathbb{Q}R, N, Z, Q
f = g \circ hf=gh
\blacksquare
Automatically sized braces
\left( x^2 + 1 \right)(x2+1)
\left( \frac{1}{\left( x^2 + 1 \right)} \right)(1(x2+1))
\left[ \frac{1}{\left( x^2 + 1 \right)} \right][1(x2+1)]
Logic
P \wedge QPQ
P \vee QPQ
\neg{P} \vee Q¬PQ
P \implies QPQ
P \iff QPQ
Limits
\lim_{x \to c} f(x) = Llimxcf(x)=L
\lim\limits_{x \to c} f(x) = Llimxcf(x)=L
\forall \epsilon > 0, \exists \delta > 0, …ϵ>0,δ>0,
0 < |x - c| < \delta \implies |f(x) - L| < 00<|xc|<δ|f(x)L|<0
Trig Functions
\sin{x}, \cos{x}, \tan^a{x}sinx,cosx,tanax
\csc{x}, \sec{x}, \cot^b{x}cscx,secx,cotbx
Sets
a \in AaA
a \notin AaA
\{ x\in\mathbb{R} : x\geq x^2\}{xR:xx2}
\cup_{i \in I} A_{i},\bigcup_{i \in I} A_{i}iIAi,iIAi
\cap_{i \in I} A_{i},\bigcap_{i \in I} A_{i}iIAi,iIAi
\subset, \not\subset, \subseteq, \nsubseteq,⊄,,
\mathbb{R} \setminus \mathbb{Q}RQ
Integrals
U_{f}(P) = U_{f}(P) = \sum\limits_{i=1}^{|P|-1} \left[\sup_{x \in [x_i, x_{i+1}]}f(x)\right](x_{i+1} - x_i)Uf(P)=i=1|P|1[supx[xi,xi+1]f(x)](xi+1xi)
L_{f}(P) = U_{f}(P) = \sum\limits_{i=1}^{|P|-1} \left[\inf_{x \in [x_i, x_{i+1}]}f(x)\right](x_{i+1} - x_i)Lf(P)=i=1|P|1[infx[xi,xi+1]f(x)](xi+1xi)
\underline{I}_{a}^{b} = \sup_{P} L_{P}(f)Iba=supPLP(f)
\overline{I}_{a}^{b} = \inf_{P} U_{P}(f)I¯¯¯ba=infPUP(f)
\int_{a}^{b} f(s) \, dsbaf(s)ds
F(x) = \int_{a}^{x} f(s) \, dsF(x)=xaf(s)ds
\int f(s) \, ds, \displaystyle{ \int f(s) \, ds }f(s)ds, f(s)ds
Other Mathematical Concepts
\sum\limits_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6}n=11n2=π26
Advanced Usage
\dfrac{P(x)}{Q(x)} = \tfrac{P(x)}{Q(x)}P(x)Q(x)=P(x)Q(x)
\textbf{Constant Value}Constant Value

#pin

Posted about 1 month ago by

Followups

resolved followup -

Since I've done a bit of linear algebra, I'll add that for vectors, you can use the \vec{} function. 

For example, 

\vec{a} would render as a⃗ 

Additionally, when editing in a text editor, to actually render your latex, you can enclose within the $ sign or two $ signs depending on how you want it. This editor for example, renders it within two $ signs.

| 4
Posted 17 days ago by

added "fun facts" list

| 2
Posted about 1 month ago by