> 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/07-operators.md).

# 演算子

数学モードの文字は通常イタリック体で表示されますが、ときには特定の関数名に別の書式が必要で、その場合は LaTeX で定義された演算子を使うことで実現できます。

## はじめに

三角関数、対数、その他は、次の例に示すように、いくつかの特別なコマンドを使って文書に記述できます。

```latex
数学演算子の例:
\[
    \sin(a + b) = \sin a \cos b + \cos a \sin b
.\]
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Mathematical+operators+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0AExamples+of+mathematical+operators%3A%0A%5C%5B%0A++++%5Csin%28a+%2B+b%29+%3D+%5Csin+a+%5Ccos+b+%2B+%5Ccos+a+%5Csin+b%0A.%5C%5D%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![Newsincos.png](/files/896146ad5cca042e6d9d9dbd1b92844216e1d8ac)

これらのコマンドは、関数名をイタリック体ではなく直立体（ローマン体）で出力します。

## さまざまな文脈での演算子

演算子の中には、たとえば極限のように、特別な扱いを受ける引数を取るものがあります。

```latex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
極限の表記のテスト
\[
    \lim_{h \to 0 } \frac{f(x+h)-f(x)}{h}
.\]
この演算子は、
text \( \lim_{h \to 0} (x-h) \).
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Mathematical+operators+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cbegin%7Bdocument%7D%0ATesting+notation+for+limits%0A%5C%5B%0A++++%5Clim_%7Bh+%5Cto+0+%7D+%5Cfrac%7Bf%28x%2Bh%29-f%28x%29%7D%7Bh%7D%0A.%5C%5D%0AThis+operator+changes+when+used+alongside+%0Atext+%5C%28+%5Clim_%7Bh+%5Cto+0%7D+%28x-h%29+%5C%29.%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![OperatorsEx2.png](/files/828cda535465c70a651327c79ddbf7e4548a3e5c)

パッケージ `amsmath` このマクロには `\to`が必要です。このパッケージがないと、 `\rightarrow` を使用しなければなりません。

極限の宣言に下付き文字を含められることに注目してください。 [リファレンスガイド](#reference-guide) 利用可能な演算子の完全な一覧については、こちらを参照してください。

一部の言語ではコマンドが追加または変更される場合があります。 [メインページ](/latex/ja/readme.md) 言語ごとの記事について。

## 独自の演算子を定義する

イタリック体ではなくローマン体で表示される独自の演算子を追加する必要がある場合は、 `\DeclareMathOperator`

```latex
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\arctg}{arctg}
\begin{document}
逆正接のユーザー定義演算子:
\[
    \arctg \frac{\pi}{3} = \sqrt{3}
.\]
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+defining+an+operator\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5CDeclareMathOperator%7B%5Carctg%7D%7Barctg%7D%0A%5Cbegin%7Bdocument%7D%0AUser-defined+operator+for+arctangent%3A%0A%5C%5B%0A++++%5Carctg+%5Cfrac%7B%5Cpi%7D%7B3%7D+%3D+%5Csqrt%7B3%7D%0A.%5C%5D%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![OperatorsEx3.png](/files/e5d4f3c506216c232f15645affa6ee1e81b7d5fb)

コマンド `\DeclareMathOperator` 2つの引数を取ります。1つ目は新しい演算子の名前で、2つ目は表示するテキストです。このコマンドを機能させるには、パッケージを **amsmath** プリアンブルで次のように

```latex
\usepackage{amsmath}
```

このコマンドは、定義した演算子で下付き文字を使う必要がある場合、少し変更できます。たとえば、 `\lim` 演算子では、その場合は次を使用します `\DeclareMathOperator*`.

## リファレンスガイド

**数学演算子の完全な一覧**

| 演算子       | 次のようにレンダリングされます |
| --------- | --------------- |
| `\cos`    | $$\cos$$        |
| `\csc`    | $$\csc$$        |
| `\exp`    | $$\exp$$        |
| `\ker`    | $$\ker$$        |
| `\limsup` | $$\limsup$$     |
| `\min`    | $$\min$$        |
| `\sinh`   | $$\sinh$$       |
| `\arcsin` | $$\arcsin$$     |
| `\cosh`   | $$\cosh$$       |
| `\deg`    | $$\deg$$        |
| `\gcd`    | $$\gcd$$        |
| `\lg`     | $$\lg$$         |
| `\ln`     | $$\ln$$         |
| `\Pr`     | $$\Pr$$         |
| `\sup`    | $$\sup$$        |
| `\arctan` | $$\arctan$$     |
| `\cot`    | $$\cot$$        |
| `\det`    | $$\det$$        |
| `\hom`    | $$\hom$$        |
| `\lim`    | $$\lim$$        |
| `\log`    | $$\log$$        |
| `\sec`    | $$\sec$$        |
| `\tan`    | $$\tan$$        |
| `\arg`    | $$\arg$$        |
| `\coth`   | $$\coth$$       |
| `\dim`    | $$\dim$$        |
| `\liminf` | $$\liminf$$     |
| `\max`    | $$\max$$        |
| `\sin`    | $$\sin$$        |
| `\tanh`   | $$\tanh$$       |

## さらに読む

詳細については

* [数式](/latex/ja/shu-xue/01-mathematical-expressions.md)
* [下付き文字と上付き文字](/latex/ja/shu-xue/02-subscripts-and-superscripts.md)
* [分数と二項係数](/latex/ja/shu-xue/05-fractions-and-binomials.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)
* [LaTeX2εへのそれほど短くない入門](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/07-operators.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.
