0%

LaTeX Math Commands

Commonly used math commands.

Statements

Numbered

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% the counter of post restarts at every new section.
\newtheorem{post}{Postulate}[section]

% assp created, its counter will reset every time using a new post
\newtheorem{assp}{Assumption}[post]

% dfnt created, it uses the same counter as post.
\newtheorem{dfnt}[post]{Definition}

% set the styling for the numbered environment defined right below it.
% Theorem styles: definition, plain, remark.
\theoremstyle{definition}
\newtheorem{thrm}{Theorem}

% others
\newtheorem{prop}{Proposition}
\newtheorem{lema}{Lemma}

Usage

1
2
3
4
\begin{thrm}[title]
\label{thrm:1}
The content of the theorem.
\end{thrm}

Unnumbered

1
\newtheorem*{remark}{Remark}

Proofs

1
2
3
4
5
6
7
8
9
\usepackage{amsthm}

% change the symbol at the end of a proof
\renewcommand\qedsymbol{$\blacksquare$}

% start a proof environment
\begin{proof}
[content]
\end{proof}

Operators

1
2
3
4
5
6
7
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\minimize}{minimize}
\DeclareMathOperator{\tr}{tr}

% x is independent of y
$x \perp\!\!\!\perp y$

Expressions

Equation with large brace

1
2
3
4
5
6
7
8
\begin{equation}
D_{it} =
\begin{cases}
1 & \text{if bank $i$ issues ABs at time $t$}\\
2 & \text{if bank $i$ issues CBs at time $t$}\\
0 & \text{otherwise}
\end{cases}
\end{equation}

Matrix in text

1
2
3
4
5
6
7
8
% a, b in the first row, c, d the second.
$\mathbf{A} = \begin{bmatrix}
a & b \\
c & d
\end{bmatrix}$

% other options for replacing 'bmatrix'
% matrix, pmatrix, vmatrix, Vmatrix
matrix1