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

# Các toán tử

Các ký tự trong chế độ toán học thường được hiển thị bằng chữ nghiêng, nhưng đôi khi một số tên hàm cần định dạng khác, có thể thực hiện bằng cách sử dụng các toán tử được định nghĩa trong LaTeX.

## Giới thiệu

Các hàm lượng giác, logarit và các hàm khác có thể được viết trong tài liệu bằng một số lệnh đặc biệt, như được minh họa trong ví dụ sau:

```latex
Ví dụ về các toán tử toán học:
\[
    \sin(a + b) = \sin a \cos b + \cos a \sin b
.\]
```

[Mở ví dụ này trong 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)

Ví dụ này tạo ra kết quả sau:

![Newsincos.png](/files/05255e2478d86222222b5f30f117327d2645a2cc)

Các lệnh sẽ in tên của hàm bằng chữ thẳng (Roman) thay vì chữ nghiêng.

## Các toán tử trong các ngữ cảnh khác nhau

Một số toán tử có thể nhận các tham số được xử lý theo cách đặc biệt, chẳng hạn như giới hạn.

```latex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Kiểm tra ký hiệu cho giới hạn
\[
    \lim_{h \to 0 } \frac{f(x+h)-f(x)}{h}
.\]
Toán tử này thay đổi khi được dùng cùng với
văn bản \( \lim_{h \to 0} (x-h) \).
\end{document}
```

[Mở ví dụ này trong 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)

Ví dụ này tạo ra kết quả sau:

![OperatorsEx2.png](/files/7caf7806c9db9d296da615e750c65822189ba0bf)

Gói `amsmath` cần cho macro `\to`; nếu không có gói này, `\rightarrow` phải được dùng.

Lưu ý cách khai báo giới hạn có thể bao gồm chỉ số dưới. Xem [hướng dẫn tham khảo](#reference-guide) để có danh sách đầy đủ các toán tử hiện có.

Một số ngôn ngữ có thể thêm hoặc thay đổi một số lệnh, hãy kiểm tra [trang chính](/latex/vi/readme.md) để xem các bài viết dành riêng cho từng ngôn ngữ.

## Định nghĩa các toán tử của riêng bạn

Nếu bạn cần thêm một toán tử tùy chỉnh để hiển thị bằng phông chữ Roman thay vì chữ nghiêng, hãy dùng `\DeclareMathOperator`

```latex
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\arctg}{arctg}
\begin{document}
Toán tử do người dùng định nghĩa cho hàm arctan:
\[
    \arctg \frac{\pi}{3} = \sqrt{3}
.\]
\end{document}
```

[Mở ví dụ này trong 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)

Ví dụ này tạo ra kết quả sau:

![OperatorsEx3.png](/files/248eff21ae48b1c7ea23a9cfff734b5a1b22569c)

Lệnh `\DeclareMathOperator` nhận hai tham số, tham số thứ nhất là tên của toán tử mới và tham số thứ hai là văn bản sẽ được hiển thị. Để lệnh này hoạt động, bạn phải nhập gói **amsmath** trong phần mở đầu với

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

Lệnh có thể được sửa đổi nhẹ nếu bạn cần toán tử đã định nghĩa của mình sử dụng chỉ số dưới, như toán tử `\lim` toán tử, trong trường hợp đó hãy dùng `\DeclareMathOperator*`.

## Hướng dẫn tham khảo

**Danh sách đầy đủ các toán tử toán học**

| Toán tử   | Hiển thị dưới dạng |
| --------- | ------------------ |
| `\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$$          |

## Đọc thêm

Để biết thêm thông tin, xem

* [Biểu thức toán học](/latex/vi/toan-hoc/01-mathematical-expressions.md)
* [Chỉ số dưới và chỉ số trên](/latex/vi/toan-hoc/02-subscripts-and-superscripts.md)
* [Phân số và nhị thức](/latex/vi/toan-hoc/05-fractions-and-binomials.md)
* [Khoảng cách trong chế độ toán học](/latex/vi/toan-hoc/08-spacing-in-math-mode.md)
* [Tích phân, tổng và giới hạn](/latex/vi/toan-hoc/09-integrals-sums-and-limits.md)
* [Kiểu hiển thị trong chế độ toán học](/latex/vi/toan-hoc/10-display-style-in-math-mode.md)
* [Phần giới thiệu về LaTeX2ε không quá ngắn](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/vi/toan-hoc/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.
