latex 数式チートシート
latexチートシートを作ったほうが良いと思ったので,とりあえず個人メモ.
せっかくなのでブログにも載せておく.
条件分岐
\begin{equation*} \begin{aligned} a_{ij}=\left\{ \begin{aligned} 1 & & \text{if } i = j \\ 0 & & \text{otherwise} \\ \end{aligned} \right. \end{aligned} \end{equation*}
線形計画問題
\begin{equation*} \begin{aligned} & \text{maximize} & {\bf c}^T{\bf x} \\ & \text{subject to} & A{\bf x} \le {\bf b} \\ & & {\bf x} \ge {\bf 0}\\ \end{aligned} \end{equation*}
行列
$$ A = \left( \begin{array}{ccccc} 1 & 1 & 4 & 5 & 1 \\ 1 & 0 & 5 & 0 & 4 \\ 4 & 5 & 1 & 4 & 0 \end{array} \right)$$
ちなみに,二項係数の場合\binom{n}{k}
が使えることがある.テーブルを書く必要はない.
シンプレックス表
$$\begin{array}{rrrrrrr} x_3 & = & 1 & + & x_1 & - & x_2 \\ x_4 & = & 3 & - & x_1 & & \\ x_5 & = & 2 & & & - & x_2 \\ \hline z & = & & & x_1 & + & x_2 \end{array}$$