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

# Chỉ số dưới và chỉ số trên

## Giới thiệu

Việc sử dụng chỉ số trên và chỉ số dưới rất phổ biến trong các biểu thức toán học liên quan đến số mũ, chỉ số, và trong một số toán tử đặc biệt. Bài viết này giải thích cách viết chỉ số trên và chỉ số dưới trong các biểu thức đơn giản, tích phân, tổng và những thứ tương tự.

Tích phân xác định là một trong những biểu thức toán học phổ biến nhất, vì vậy hãy xem một ví dụ:

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

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

Mã LaTeX này cho ra:

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

Theo quy ước, chỉ số trên và chỉ số dưới trong LaTeX được tạo bằng các ký tự `^` và `_` tương ứng; ví dụ, các số mũ được áp dụng cho $$x$$ và $$y$$ trong đoạn mã ở trên. Các ký tự đó cũng có thể được dùng với các ký hiệu toán học, chẳng hạn như tích phân (`\int`) được dùng trong ví dụ ở trên, nơi `_` được dùng để đặt cận dưới và `^` cho cận trên.

Lệnh `\limits` thay đổi cách các cận được hiển thị trong tích phân; nếu không có nó, các cận sẽ nằm cạnh ký hiệu tích phân thay vì ở phía trên và dưới:

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

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

Mã LaTeX này cho ra:

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

## Các ví dụ chi tiết hơn

Các ký hiệu `_` và `^` cũng có thể được kết hợp trong cùng một biểu thức, ví dụ:

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

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

Mã LaTeX này cho ra:

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

Nếu biểu thức chứa các chỉ số trên hoặc chỉ số dưới dài, chúng cần được đặt trong dấu ngoặc nhọn, vì LaTeX thường áp dụng các lệnh toán học `^` và `_` chỉ cho ký tự theo sau:

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

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

Mã LaTeX này cho ra:

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

Chỉ số dưới và chỉ số trên có thể được lồng và kết hợp theo nhiều cách khác nhau. Tuy nhiên, khi lồng chỉ số dưới/chỉ số trên, hãy nhớ rằng mỗi lệnh phải tham chiếu đến một phần tử duy nhất; đó có thể là một chữ cái hoặc con số đơn lẻ, như trong các ví dụ ở trên, hoặc một biểu thức toán học phức tạp hơn được đặt trong dấu ngoặc nhọn hoặc ngoặc vuông. Ví dụ:

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

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

Mã LaTeX này cho ra:

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

## Các toán tử sử dụng chỉ số dưới và chỉ số trên

Một số toán tử toán học có thể cần chỉ số dưới và chỉ số trên. Những trường hợp thường gặp nhất là tích phân `\int` (xem [phần giới thiệu](#introduction)) và toán tử tổng (`\sum`) mà các cận của chúng được định dạng chính xác bằng chỉ số dưới và chỉ số trên.

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

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

Mã LaTeX này cho ra:

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

Đối với các toán tử thường dùng khác cần chỉ số dưới/chỉ số trên, hãy xem [hướng dẫn tham khảo](#reference-guide).

## Mở tất cả các đoạn mã trong Overleaf

Dùng liên kết bên dưới để mở tất cả các ví dụ ở trên dưới dạng một dự án Overleaf duy nhất:

```latex
Dưới đây là một số ví dụ về cách dùng đơn giản của chỉ số dưới và chỉ số trên:

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

\vspace{1cm}

Dùng chỉ số trên và chỉ số dưới trong cùng một biểu thức

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

\vspace{1cm}

Chỉ số dưới và chỉ số trên dài hơn:

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

\vspace{1cm}

Chỉ số dưới và chỉ số trên lồng nhau

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

\vspace{1cm}

Ví dụ về một phương trình toán học với chỉ số dưới và chỉ số trên

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

\vspace{1cm}

Cách dùng căn bậc hai

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

[Mở tất cả các ví dụ ở trên dưới dạng một dự án Overleaf duy nhất.](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)

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

Các ví dụ và toán tử bổ sung

| Mã đánh dấu LaTeX     | Hiển thị dưới dạng                                                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `a_{n_i}`             | a n i {\displaystyle a\_{n\_{i}}} ![{\displaystyle a\_{n\_{i}}}](/files/dc42665254a35c61bc8781e09145b520ffee1829)                           |
| `\int_{i=1}^n`        | ∫ i = 1 n {\displaystyle \int \_{i=1}^{n}} ![{\displaystyle \int \_{i=1}^{n}}](/files/0da395d8fed55376ec5645f91d67fc512e46539d)             |
| `\sum_{i=1}^{\infty}` | ∑ i = 1 ∞ {\displaystyle \sum \_{i=1}^{\infty }} ![{\displaystyle \sum \_{i=1}^{\infty }}](/files/0f76c7a15c551c4656c6be7a30a3423d0b9771bc) |
| `\prod_{i=1}^n`       | ∏ i = 1 n {\displaystyle \prod \_{i=1}^{n}} ![{\displaystyle \prod \_{i=1}^{n}}](/files/7500b804b94886bb88300003d5040608dfe8feac)           |
| `\cup_{i=1}^n`        | ∪ i = 1 n {\displaystyle \cup \_{i=1}^{n}} ![{\displaystyle \cup \_{i=1}^{n}}](/files/3ee2d94d798fb254e6bd067aabbf5f599158d8da)             |
| `\cap_{i=1}^n`        | ∩ i = 1 n {\displaystyle \cap \_{i=1}^{n}} ![{\displaystyle \cap \_{i=1}^{n}}](/files/1ea8e41a6c75c86aa20e3512ef78a034954e0fe0)             |
| `\oint_{i=1}^n`       | ∮ i = 1 n {\displaystyle \oint \_{i=1}^{n}} ![{\displaystyle \oint \_{i=1}^{n}}](/files/d6d3e6bc6850d6a58a999863061ce8fea2b467af)           |
| `\coprod_{i=1}^n`     | ∐ i = 1 n {\displaystyle \coprod \_{i=1}^{n}} ![{\displaystyle \coprod \_{i=1}^{n}}](/files/a7acf9a079aece4c143ba3148d8b5e92f7440b02)       |

Cũng còn có `bigcup` và `bigcap` các lệnh tương tự như `cup` và `cap` nhưng những lệnh đó được dùng cho các biểu thức lớn hơn.

## Đọc thêm

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

* [Danh sách các chữ cái Hy Lạp và ký hiệu toán học](/latex/vi/toan-hoc/11-list-of-greek-letters-and-math-symbols.md)
* [Các toán tử](/latex/vi/toan-hoc/07-operators.md)
* [Tích phân, tổng và giới hạn](/latex/vi/toan-hoc/09-integrals-sums-and-limits.md)
* [Phông chữ toán học](/latex/vi/toan-hoc/12-mathematical-fonts.md)
* [Dấu ngoặc và ngoặc tròn](/latex/vi/toan-hoc/03-brackets-and-parentheses.md)
* [Danh sách ký hiệu LaTeX khổng lồ](http://www.rpi.edu/dept/arc/training/latex/LaTeX_symbols.pdf) (danh sách đầy đủ các ký hiệu toán học có sẵn trong gói **amssymb** gói)
* [Phần giới thiệu về LaTeX2ε không quá ngắn](http://www.ctan.org/tex-archive/info/lshort/)
* [Căn chỉnh các phương trình bằng amsmath](/latex/vi/toan-hoc/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/vi/toan-hoc/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.
