0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Latexメモ

Last updated at Posted at 2020-07-10

すぐ忘れるのでメモ(自分用)
よい書き方かどうかは知らない。
メモなのでどんどん増えていきます。

実ベクトルの集合

太字は基本 {\bf x} と書く。
\mathbb{R}と書くとRがいい感じになる。

{\bf x}\in\mathbb{R}^D

{\bf x}\in\mathbb{R}^D

多変量正規分布

{\mathcal N}と書くとNがいい感じになる。
\muは{\boldsymbol \mu}と書く。\bfが効かないギリシャ文字がある。
中括弧は\{,\}と書く。\をつける必要がある。
\left\{ ... \right\} のように書くと括弧が式に合わせて大きくなる。これ便利。

{\mathcal N}({\bf x}|{\boldsymbol \mu},{\bf \Sigma})
=\frac{1}{(2\pi)^{\frac{D}{2}}|{\bf \Sigma}|^{\frac{1}{2}}}
\exp\left{-\frac{1}{2}({\bf x}-{\boldsymbol \mu})^T{\bf \Sigma}^{-1}({\bf x}-{\boldsymbol \mu})\right}

{\mathcal N}({\bf x}|{\boldsymbol \mu},{\bf \Sigma})
=\frac{1}{(2\pi)^{\frac{D}{2}}|{\bf \Sigma}|^{\frac{1}{2}}}
\exp\left\{-\frac{1}{2}({\bf x}-{\boldsymbol \mu})^T{\bf \Sigma}^{-1}({\bf x}-{\boldsymbol \mu})\right\}

=を揃える、ベクトル、行列

ベクトル、行列は \begin{pmatrix}...\end{pmatrix} で囲む。
\begin{eqnarray}...\end{eqnarray}で囲んで&&,&=&で揃う。
\vdots 3点リーダ縦
\cdots 3点リーダ横
\ddots 3点リーダ斜め

\begin{eqnarray}
{\bf x}&=&\begin{pmatrix}x_{1}\ \vdots\ x_{D}\end{pmatrix}\
&=&\begin{pmatrix}x_{1}\ \cdots\ x_{D}\end{pmatrix}^T
\end{eqnarray}

\begin{eqnarray}
{\bf x}&=&\begin{pmatrix}x_{1}\\ \vdots\\ x_{D}\end{pmatrix}\\
&=&\begin{pmatrix}x_{1}\ \cdots\ x_{D}\end{pmatrix}^T
\end{eqnarray}

置換

置換のシグマは \mathrm{sgn} このように書くとよい。

\begin{eqnarray}
&&|{\bf A}|=\sum_{\sigma\in S_n} \mathrm{sgn}(\sigma)a_{1\sigma(1)}a_{2\sigma(2)}\hdots a_{n\sigma(n)}\
&&|{\bf A}|=\sum_{} \mathrm{sgn}
\begin{pmatrix}
1 & 2 & 3 & \hdots & n\
i_{1} & i_{2} & i_{3} & \hdots & i_{n}\
\end{pmatrix}
a_{1i_1}a_{2i_1}a_{3i_1} \hdots a_{ni_n}\
\end{eqnarray}

\begin{eqnarray}
  &&|{\bf A}|=\sum_{\sigma\in S_n} \mathrm{sgn}(\sigma)a_{1\sigma(1)}a_{2\sigma(2)}\cdots a_{n\sigma(n)}\\
  &&|{\bf A}|=\sum \mathrm{sgn}
  \begin{pmatrix}
  1 & 2 & 3 & \cdots & n\\
  i_{1} & i_{2} & i_{3} &  \cdots & i_{n}\\
  \end{pmatrix}
  a_{1i_1}a_{2i_1}a_{3i_1} \cdots a_{ni_n}\\
\end{eqnarray}

行列式

\begin{eqnarray}
&&{\bf A}__{ij}=(-1)^{i+j}\left|
\begin{array}{ccccc}
a_{11} & \cdots & a_{1j} & \cdots & a_{1n}\
\vdots & & \vdots & & \vdots\
a_{i1} & \cdots & a_{ij} & \cdots & a_{in}\
\vdots & & \vdots & & \vdots\
a_{n1} & \cdots & a_{nj} & \cdots & a_{nn}\
\end{array}
\right|
\end{eqnarray}

\begin{eqnarray}
  &&{\bf A}_{ij}=(-1)^{i+j}\left|
    \begin{array}{ccccc}
  a_{11} & \cdots & a_{1j} & \cdots & a_{1n}\\
  \vdots & & \vdots & & \vdots\\
  a_{i1} & \cdots & a_{ij} & \cdots & a_{in}\\
  \vdots & & \vdots & & \vdots\\
  a_{n1} & \cdots & a_{nj} & \cdots & a_{nn}\\
  \end{array}
  \right|
\end{eqnarray}

集合

mathcalというのはカリグラフィーフォントの略。

\sum_{{\bf x}\in\mathcal{X}i}\
\sum
{{\bf y}\in\mathcal{Y}_i}

\sum_{{\bf x}\in\mathcal{X}_i}\\
\sum_{{\bf y}\in\mathcal{Y}_i}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?