> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ja/shu-xue/01-mathematical-expressions.md).

# 数学表現

## はじめに

LaTeXの数式組版機能は、技術文書を書くための魅力的な選択肢です。この記事では、LaTeXを使って数式を書き始めるために必要な最も基本的なコマンドを紹介します。

LaTeXで基本的な方程式を書くのは簡単です。たとえば：

```latex
\documentclass{article}
\begin{document}

よく知られたピタゴラスの定理 \(x^2 + y^2 = z^2\) は
他の指数では成り立たないことが証明されました。
つまり、次の方程式には整数解がありません：

\[ x^n + y^n = z^n \]

\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0AThe+well+known+Pythagorean+theorem+%5C%28x%5E2+%2B+y%5E2+%3D+z%5E2%5C%29+was+%0Aproved+to+be+invalid+for+other+exponents.+%0AMeaning+the+next+equation+has+no+integer+solutions%3A%0A%0A%5C%5B+x%5En+%2B+y%5En+%3D+z%5En+%5C%5D%0A%0A%5Cend%7Bdocument%7D)

![数式の例](/files/30f60d7e05664b4cd7d2ab7c88ebb82011f583dd)

ご覧のとおり、方程式の表示方法は区切り記号に依存します。この場合は `\[...\]` や `\(...\)`.

## 数式モード

LaTeXでは、数式表現に2つの記述モードがあります。 *インライン* 数式モードと *表示* 数式モード：

* *インライン* 数式モードは、段落の一部である数式を書くために使われます
* *表示* 数式モードは、段落の一部ではない式を書くために使われるため、別行に配置されます

### インライン数式モード

インラインモードで数式を組むには、これらの「区切り記号」のどれでも使えます：

* `\(...\)`
* `$...$`
* `\begin{math}...\end{math}`

どれも機能し、選択は好みの問題なので、いくつか例を見てみましょう。

```latex
\documentclass{article}
\begin{document}

\noindent 標準的な \LaTeX{} の作法では、インライン数式は \verb|\(...\)| で囲んで書きます：

\begin{quote}
物理学では、質量とエネルギーの等価性は次のように表されます
式 \(E=mc^2\) によって示され、1905年にアルベルト・アインシュタインによって発見されました。
\end{quote}

\noindent その代わりに、インライン数式を \verb|\(...\)| で（囲んで）書く代わりに、同じ結果を得るには \texttt{\$...\$} を使えます：

\begin{quote}
物理学では、質量とエネルギーの等価性は次のように表されます
式 $E=mc^2$ によって示され、1905年にアルベルト・アインシュタインによって発見されました。
\end{quote}

\noindent あるいは、\verb|\begin{math}...\end{math}| を使えます：

\begin{quote}
物理学では、質量とエネルギーの等価性は次のように表されます
式 \begin{math}E=mc^2\end{math} によって示され、1905年にアルベルト・アインシュタインによって発見されました。
\end{quote}
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+inline+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnoindent+Standard+%5CLaTeX%7B%7D+practice+is+to+write+inline+math+by+enclosing+it+between+%5Cverb%7C%5C%28...%5C%29%7C%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%5C%28E%3Dmc%5E2%5C%29%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%0A%5Cnoindent+Instead+if+writing+%28enclosing%29+inline+math+between+%5Cverb%7C%5C%28...%5C%29%7C+you+can+use+%5Ctexttt%7B%5C%24...%5C%24%7D+to+achieve+the+same+result%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%24E%3Dmc%5E2%24%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%0A%5Cnoindent+Or%2C+you+can+use+%5Cverb%7C%5Cbegin%7Bmath%7D...%5Cend%7Bmath%7D%7C%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%5Cbegin%7Bmath%7DE%3Dmc%5E2%5Cend%7Bmath%7D%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%5Cend%7Bdocument%7D)

![インライン数式の例](/files/61cd1123bc4c8d02b47efa0129a044bcc91094a0)

### ディスプレイ数式モード

ディスプレイモードで数式を組むには、次の構文のいずれかを使います：

* `\[...\]`
* `\begin{displaymath}...\end{displaymath}`
* `\begin{equation}...\end{equation}`

ディスプレイ数式モードには、番号付き方程式と番号なし方程式を作る2つの版があります。基本例を見てみましょう：

```latex
\documentclass{article}
\begin{document}
質量とエネルギーの等価性は、次の有名な式で表されます

\[E=mc^2\]

1905年にアルベルト・アインシュタインによって発見されました。
自然単位系では（$c$ = 1）、この式は恒等式を表します

\begin{equation}
E=m
\end{equation}
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0AThe+mass-energy+equivalence+is+described+by+the+famous+equation%0A%0A%5C%5BE%3Dmc%5E2%5C%5D%0A%0Adiscovered+in+1905+by+Albert+Einstein.+%0AIn+natural+units+%28%24c%24+%3D+1%29%2C+the+formula+expresses+the+identity%0A%0A%5Cbegin%7Bequation%7D%0AE%3Dm%0A%5Cend%7Bequation%7D%0A%5Cend%7Bdocument%7D)

![Displayex.png](/files/c59188261a27a670e5a91ba1d2513f23577c2186)

## 別の例

次の例では `equation*` これは、次のものによって提供される環境です `amsmath` パッケージ—次を参照してください [`amsmath` article](/latex/ja/shu-xue/06-aligning-equations-with-amsmath.md) 詳細は。

```latex
\documentclass{article}
\usepackage{amsmath} % equation* 環境用
\begin{document}

これは、本文中の簡単な数式 \(\sqrt{x^2+1}\) です。
これも同じです：
\begin{math}
\sqrt{x^2+1}
\end{math}
ただし、別のコマンドを使っています。

これは番号なしの簡単な数式です
\[\sqrt{x^2+1}\]
本文から分離されています。

これも同じです：
\begin{displaymath}
\sqrt{x^2+1}
\end{displaymath}

…そしてこれも：
\begin{equation*}
\sqrt{x^2+1}
\end{equation*}

\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Typesetting+maths+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+for+the+equation%2A+environment%0A%5Cbegin%7Bdocument%7D%0A%0AThis+is+a+simple+math+expression+%5C%28%5Csqrt%7Bx%5E2%2B1%7D%5C%29+inside+text.+%0AAnd+this+is+also+the+same%3A+%0A%5Cbegin%7Bmath%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bmath%7D%0Abut+by+using+another+command.%0A%0AThis+is+a+simple+math+expression+without+numbering%0A%5C%5B%5Csqrt%7Bx%5E2%2B1%7D%5C%5D+%0Aseparated+from+text.%0A%0AThis+is+also+the+same%3A%0A%5Cbegin%7Bdisplaymath%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bdisplaymath%7D%0A%0A%5Cldots+and+this%3A%0A%5Cbegin%7Bequation%2A%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bequation%2A%7D%0A%0A%5Cend%7Bdocument%7D)

![Amsexample.png](/files/c40deff3b7b01fb62e47375ca7e713b123a77c4c)

## リファレンスガイド

以下は、よく使われる数式記号の一覧表です。より完全な一覧は次を参照してください [ギリシャ文字と数式記号の一覧](/latex/ja/shu-xue/11-list-of-greek-letters-and-math-symbols.md):

| 説明     | コード                                               | 例                                                               |
| ------ | ------------------------------------------------- | --------------------------------------------------------------- |
| ギリシャ文字 | `\alpha \beta \gamma \rho \sigma \delta \epsilon` | $$\alpha \ \beta \ \gamma \ \rho \ \sigma \ \delta \ \epsilon$$ |
| 二項演算子  | `\times \otimes \oplus \cup \cap`                 | $$\times \ \otimes \ \oplus \ \cup \ \cap$$                     |
| 関係演算子  | `< > \subset \supset \subseteq \supseteq`         | $$< \ >\ \subset \ \supset \ \subseteq \ \supseteq$$            |
| その他    | `\int \oint \sum \prod`                           | $$\int \ \oint \ \sum \ \prod$$                                 |

数式記号の各クラスは、それぞれ異なる書式で区別されます（たとえば、変数は斜体ですが、 [演算子](/latex/ja/shu-xue/07-operators.md) は斜体ではなく）、また異なる [スペーシング](/latex/ja/shu-xue/08-spacing-in-math-mode.md).

## さらに読む

LaTeXの数式モードは非常に柔軟で強力で、ほかにもできることがたくさんあります：

* [下付き文字と上付き文字](/latex/ja/shu-xue/02-subscripts-and-superscripts.md)
* [角括弧と丸括弧](/latex/ja/shu-xue/03-brackets-and-parentheses.md)
* [分数と二項係数](/latex/ja/shu-xue/05-fractions-and-binomials.md)
* [数式の配置](/latex/ja/shu-xue/06-aligning-equations-with-amsmath.md)
* [演算子](/latex/ja/shu-xue/07-operators.md)
* [数式モードでのスペース](/latex/ja/shu-xue/08-spacing-in-math-mode.md)
* [積分、総和、極限](/latex/ja/shu-xue/09-integrals-sums-and-limits.md)
* [数式モードでの表示スタイル](/latex/ja/shu-xue/10-display-style-in-math-mode.md)
* [ギリシャ文字と数式記号の一覧](/latex/ja/shu-xue/11-list-of-greek-letters-and-math-symbols.md)
* [数学フォント](/latex/ja/shu-xue/12-mathematical-fonts.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ja/shu-xue/01-mathematical-expressions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
