> 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/02-subscripts-and-superscripts.md).

# 下付き文字と上付き文字

## はじめに

上付き文字と下付き文字の使用は、指数、添字、およびいくつかの特殊な演算子を含む数学式では非常に一般的です。この記事では、単純な式、積分、総和などで上付き文字と下付き文字を書く方法を説明します。

定積分は最も一般的な数学式の一つなので、例を見てみましょう：

```latex
\[ \int\limits_0^1 x^2 + y^2 \ dx \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%5Cint%5Climits_0%5E1+x%5E2+%2B+y%5E2+%5C+dx+%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$\int\limits\_0^1 x^2 + y^2 \ dx$$

慣例として、LaTeX では上付き文字と下付き文字は次の文字を使って作成されます `^` や `_` それぞれ。たとえば、 $$x$$ や $$y$$ に適用される指数は、上のコード断片で示されています。これらの文字は、積分記号（`\int`）のような数学記号にも使えます。上の例では `_` が下限の設定に使われ、 `^` が上限に使われます。

コマンド `\limits` は、積分における限界の表示方法を変更します。これがない場合、上下ではなく積分記号の横に限界が表示されます：

```latex
\[ \int_0^1 x^2 + y^2 \ dx \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%5Cint_0%5E1+x%5E2+%2B+y%5E2+%5C+dx+%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$\int\_0^1 x^2 + y^2 \ dx$$

## より詳しい例

記号 `_` や `^` は同じ式で組み合わせることもできます。たとえば：

```latex
\[ a_1^2 + a_2^2 = a_3^2 \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example+2\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+a_1%5E2+%2B+a_2%5E2+%3D+a_3%5E2+%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$a\_1^2 + a\_2^2 = a\_3^2$$

式に長い上付き文字や下付き文字が含まれる場合は、波括弧でまとめる必要があります。LaTeX では通常、数学コマンド `^` や `_` を次の文字に対してのみ適用するためです：

```latex
\[ x^{2 \alpha} - 1 = y_{ij} + y_{ij}  \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example+3\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+x%5E%7B2+%5Calpha%7D+-+1+%3D+y_%7Bij%7D+%2B+y_%7Bij%7D++%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$x^{2 \alpha} - 1 = y\_{ij} + y\_{ij}$$

下付き文字と上付き文字は、さまざまな方法で入れ子にしたり組み合わせたりできます。ただし、入れ子にする場合は、各コマンドが単一の要素を参照しなければならないことを忘れないでください。これは、上の例のように単一の文字や数字でもよいですし、波括弧や角括弧でまとめたより複雑な数学式でもかまいません。たとえば：

```latex
\[ (a^n)^{r+s} = a^{nr+ns}  \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example+4\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%28a%5En%29%5E%7Br%2Bs%7D+%3D+a%5E%7Bnr%2Bns%7D++%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$(a^n)^{r+s} = a^{nr+ns}$$

## 下付き文字と上付き文字を使う演算子

いくつかの数学演算子では下付き文字と上付き文字が必要です。最もよくあるのは積分 `\int` （ [導入](#introduction)を確認してください）と総和（`\sum`）演算子で、その境界は下付き文字と上付き文字を使って正確に組版されます。

```latex
\[ \sum_{n=1}^{\infty} \frac{1}{n^s}
= \prod_p \frac{1}{1 - p^{-s}} \]
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example+5\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D+%5Cfrac%7B1%7D%7Bn%5Es%7D+%0A%3D+%5Cprod_p+%5Cfrac%7B1%7D%7B1+-+p%5E%7B-s%7D%7D+%5C%5D%0A%5Cend%7Bdocument%7D)

この LaTeX コードは次を出力します：

$$\sum\_{n=1}^{\infty} \frac{1}{n^s} = \prod\_p \frac{1}{1 - p^{-s}}$$

下付き文字/上付き文字を必要とする、よく使われる他の演算子については、 [リファレンスガイド](#reference-guide).

## Overleaf でコード断片をすべて開く

下のリンクを使って、上の例をすべて 1 つの Overleaf プロジェクトとして開いてください：

```latex
下付き文字と上付き文字の簡単な使用例をいくつか紹介します：

\[ \int\limits_0^1 x^2 + y^2 \ dx \]

\vspace{1cm}

同じ式で上付き文字と下付き文字を使う

\[ a_1^2 + a_2^2 = a_3^2 \]

\vspace{1cm}

長い下付き文字と上付き文字：

\[ x^{2 \alpha} - 1 = y_{ij} + y_{ij}  \]

\vspace{1cm}

入れ子になった下付き文字と上付き文字

\[ (a^n)^{r+s} = a^{nr+ns} \]

\vspace{1cm}

下付き文字と上付き文字を含む数式の例

\[ \sum_{i=1}^{\infty} \frac{1}{n^s} = \prod_p \frac{1}{1 - p^{-s}} \]

\vspace{1cm}

平方根の使用

\[ \sqrt[4]{4ac} = \sqrt{4ac}\sqrt{4ac} \]
```

[上のすべての例を 1 つの Overleaf プロジェクトとして開きます。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Superscripts+example+6\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Ctitle%7BSubscripts+and+Superscripts%7D%0A%5Cauthor%7BExamples+from+Overleaf%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0AHere+are+some+examples+of+simple+usage+of+subscripts+and+superscripts%3A%0A%0A%5C%5B+%5Cint%5Climits_0%5E1+x%5E2+%2B+y%5E2+%5C+dx+%5C%5D%0A%0A%5Cvspace%7B1cm%7D%0A%0AUsing+superscript+and+subscripts+in+the+same+expression%0A%0A%5C%5B+a_1%5E2+%2B+a_2%5E2+%3D+a_3%5E2+%5C%5D%0A%0A%5Cvspace%7B1cm%7D%0A%0ALonger+subscripts+and+superscripts%3A%0A%0A%5C%5B+x%5E%7B2+%5Calpha%7D+-+1+%3D+y_%7Bij%7D+%2B+y_%7Bij%7D++%5C%5D%0A%0A%5Cvspace%7B1cm%7D%0A%0ANested+subscripts+and+superscripts%0A%0A%5C%5B+%28a%5En%29%5E%7Br%2Bs%7D+%3D+a%5E%7Bnr%2Bns%7D+%5C%5D%0A%0A%5Cvspace%7B1cm%7D%0A%0AExample+of+a+mathematical+equation+with+subscripts+and+superscripts%0A%0A%5C%5B+%5Csum_%7Bi%3D1%7D%5E%7B%5Cinfty%7D+%5Cfrac%7B1%7D%7Bn%5Es%7D+%3D+%5Cprod_p+%5Cfrac%7B1%7D%7B1+-+p%5E%7B-s%7D%7D+%5C%5D%0A%0A%5Cvspace%7B1cm%7D%0A%0ASquared+root+usage%0A%0A%5C%5B+%5Csqrt%5B4%5D%7B4ac%7D+%3D+%5Csqrt%7B4ac%7D%5Csqrt%7B4ac%7D+%5C%5D%0A%5Cend%7Bdocument%7D)

## リファレンスガイド

追加の例と演算子

| LaTeX マークアップ          | 次のようにレンダリングされます                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `a_{n_i}`             | a n i {\displaystyle a\_{n\_{i}}} ![{\displaystyle a\_{n\_{i}}}](/files/1065a64a80328e20dac3c97000974c264bf2b600)                           |
| `\int_{i=1}^n`        | ∫ i = 1 n {\displaystyle \int \_{i=1}^{n}} ![{\displaystyle \int \_{i=1}^{n}}](/files/19e8640d089c549182ef92a0bc5993b527345e08)             |
| `\sum_{i=1}^{\infty}` | ∑ i = 1 ∞ {\displaystyle \sum \_{i=1}^{\infty }} ![{\displaystyle \sum \_{i=1}^{\infty }}](/files/0f81132c0a4724f4287173e4d2868c7572540fa4) |
| `\prod_{i=1}^n`       | ∏ i = 1 n {\displaystyle \prod \_{i=1}^{n}} ![{\displaystyle \prod \_{i=1}^{n}}](/files/b63facbd9369740632129c492ff9da05cf3f024e)           |
| `\cup_{i=1}^n`        | ∪ i = 1 n {\displaystyle \cup \_{i=1}^{n}} ![{\displaystyle \cup \_{i=1}^{n}}](/files/7b0620043b7871fa8a45b8ce560ef1c1c585236d)             |
| `\cap_{i=1}^n`        | ∩ i = 1 n {\displaystyle \cap \_{i=1}^{n}} ![{\displaystyle \cap \_{i=1}^{n}}](/files/4f5f4895566e392cc14e89bba3cddca652ad3031)             |
| `\oint_{i=1}^n`       | ∮ i = 1 n {\displaystyle \oint \_{i=1}^{n}} ![{\displaystyle \oint \_{i=1}^{n}}](/files/e54208dd1af1702428d99aaa4e5abdd17cdf1a19)           |
| `\coprod_{i=1}^n`     | ∐ i = 1 n {\displaystyle \coprod \_{i=1}^{n}} ![{\displaystyle \coprod \_{i=1}^{n}}](/files/799c31c38cd3f55b3168237697ae3e226bb87bc9)       |

また、 `bigcup` や `bigcap` に似たコマンドがあります `cup` や `cap` ただし、これらはより大きな式に使われます。

## さらに読む

詳細については

* [ギリシャ文字と数式記号の一覧](/latex/ja/shu-xue/11-list-of-greek-letters-and-math-symbols.md)
* [演算子](/latex/ja/shu-xue/07-operators.md)
* [積分、総和、極限](/latex/ja/shu-xue/09-integrals-sums-and-limits.md)
* [数学フォント](/latex/ja/shu-xue/12-mathematical-fonts.md)
* [角括弧と丸括弧](/latex/ja/shu-xue/03-brackets-and-parentheses.md)
* [LaTeX 記号の大きな一覧](http://www.rpi.edu/dept/arc/training/latex/LaTeX_symbols.pdf) （利用可能な数学記号の完全な一覧は、 **amssymb** パッケージにあります）
* [LaTeX2εへのそれほど短くない入門](http://www.ctan.org/tex-archive/info/lshort/)
* [amsmath を使った方程式の整列](/latex/ja/shu-xue/06-aligning-equations-with-amsmath.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/02-subscripts-and-superscripts.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.
