Latex

Typing mathematics in the wiki

How do you type math in a wiki?

In order to type mathematical equations into this wiki you will need to learn the basics of a powerful mathematical typesetting language called LATEX. We give a brief introduction below.

Inline expressions vs. equations

There are two ways to enter mathematical expressions in the wiki—-they can be inline math expressions or equations.

Inline expressions

Inline expressions occur in the middle of a sentence. To produce an inline expression, type [[$math expression here$]]. For example, typing

[[$90^{\circ}$]] is the same as [[$\frac{\pi}{2}$]] radians.

yields:

$90^{\circ}$ is the same as $\frac{\pi}{2}$ radians.

Note: You can get this process started by clicking the box in the editor that looks like:

$x/2$

Equations

Equations are mathematical expressions that are given their own line and are centered on the page. These are usually used for important equations that deserved to be showcased on their own line or large equations that cannot fit inline. Produce an equation as follows:

[[math]]
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
[[/math]]

yields:

(1)
\begin{align} x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \end{align}

Note: You can get this process started by clicking the box in the editor that looks like:

$\sqrt{x}$

LATEX symbols

The basics

  • addition: + produces $+$
  • subtraction: - produces $-$
  • multiplication (times): \times produces $\times$ (note: not the letter x)
  • multiplication (dot): \cdot produces $\cdot$
  • division (division symbol): \div produces $\div$
  • division (slash): / produces $/$
  • equal: = produces $=$
  • not equal: \ne produces $\ne$
  • less than: < produces $<$
  • greater than: > produces $>$
  • less than or equal to: \le produces $\le$
  • greater than or equal to: \ge produces $\ge$
  • fractions: \frac{1}{2} produces $\frac{1}{2}$
  • square roots: \sqrt{2} produces $\sqrt{2}$
  • other roots: \sqrt[5]{2} produces $\sqrt[5]{2}$
  • exponentiation: a^{b} produces $a^{b}$
  • subscript: a_{b} produces $a_{b}$
  • absolute value: |x| produces $|x|$
  • infinity: \infty produces $\infty$
  • summation notation:

[[math]]
\sum_{n=1}^{\infty}a_n
[[/math]]

(2)
\begin{align} \sum_{n=1}^{\infty}a_n \end{align}
  • product notation:

[[math]]
\prod_{n=1}^{\infty}a_n
[[/math]]

(3)
\begin{align} \prod_{n=1}^{\infty}a_n \end{align}

Functions

  • maps to: \to produces $\to$
  • composition: \circ produces $\circ$

Logic

  • not: \sim produces $\sim$
  • and: \wedge produces $\wedge$
  • or: \vee produces $\vee$
  • if…then: \to produces $\to$
  • if and only if: \leftrightarrow produces $\leftrightarrow$
  • logical equivalence: \equiv produces $\equiv$
  • therefore: \therefore produces $\therefore$
  • there exists (existential quantifier): \exists produces $\exists$
  • for all (universal quantifier): \forall produces $\forall$
  • \Rightarrow produces $\Rightarrow$
  • \Leftrightarrow produces $\Leftrightarrow$

Number theory

  • divides: | produces $|$
  • does not divide: \not | produces $\not |$
  • div: \operatorname{div} produces $\operatorname{div}$
  • mod: \mod produces $\mod$

Set theory

  • set brackets: \{1,2,3\} produces $\{1,2,3\}$
  • element of: \in produces $\in$
  • not an element of: \not\in produces $\not\in$
  • subset of: \subset produces $\subset$
  • not a subset of: \not\subset produces $\not\subset$
  • union: \cup produces $\cup$
  • intersection: \cap produces $\cap$
  • big union:

[[math]]
\bigcup_{n=1}^{10}A_{n}
[[/math]]

(4)
\begin{align} \bigcup_{n=1}^{10}A_{n} \end{align}
  • big intersection:

[[math]]
\bigcap_{n=1}^{10}A_{n}
[[/math]]

(5)
\begin{align} \bigcap_{n=1}^{10}A_{n} \end{align}
  • empty set: \emptyset produces $\emptyset$
  • power set: \mathcal{P} produces $\mathcal{P}$
  • real numbers: \Bbb{R} produces $\Bbb{R}$
  • integers: \Bbb{Z} produces $\Bbb{Z}$
  • rational numbers: \Bbb{Q} produces $\Bbb{Q}$
  • natural numbers: \Bbb{N} produces $\Bbb{N}$

Matrices

  • matrix

[[math]]
\left[\begin{array}{ccc}1 & 2 & 3 \\4 & 5 & 6 \\7 & 8 & 0\end{array}\right]
[[/math]]

(6)
\begin{align} \left[\begin{array}{ccc}1 & 2 & 3 \\4 & 5 & 6 \\7 & 8 & 0\end{array}\right] \end{align}
  • determinants

[[math]]
\left|\begin{array}{ccc}1 & 2 & 3 \\4 & 5 & 6 \\7 & 8 & 0\end{array}\right|
[[/math]]

(7)
\begin{align} \left|\begin{array}{ccc}1 & 2 & 3 \\4 & 5 & 6 \\7 & 8 & 0\end{array}\right| \end{align}
  • determinant: \det(A) produces $\det(A)$
  • trace: \operatorname{tr}(A) produces $\operatorname{tr}(A)$
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License