> 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/ko/more-topics/03-aligning-equations-with-amsmath-es.md).

# amsmath를 사용한 방정식 정렬 es

패키지 **amsmath** 이 패키지는 방정식을 출력하기 위한 다양한 옵션을 제공합니다. 방정식이 매우 크거나 같은 줄에 여러 방정식을 포함해야 하는 경우에도 문서에 가장 잘 맞는 방정식 배치를 선택할 수 있습니다.

## 소개

LaTeX의 방정식 처리를 위한 표준 도구는 유연성이 부족하여, 때로는 요소가 겹치거나 방정식이 너무 클 경우 방정식의 일부가 잘려 나가기도 합니다. 이러한 모든 어려움은 패키지 **amsmath**. 예제로 시작해 봅시다:

```latex
\begin{equation} \label{eq1}
\begin{split}
A & = \frac{\pi r^2}{2} \\
 & = \frac{1}{2} \pi r^2
\end{split}
\end{equation}
```

![Amsmath-eqn1.png](/files/4695053f85267fc15311fcf2d9084d91a5f9638b)

방정식은 환경 안에 포함되어야 합니다. *equation* 번호가 표시되도록 하려면 사용할 수 있습니다 *equation\** (별표를 붙여) 번호를 매기지 않으려면 사용합니다. 환경 안에서는 *equation* 환경을 사용합니다 *split* 방정식을 더 작은 부분으로 나누는 데 사용하며, 이 부분들은 자동으로 정렬됩니다. 이중 백슬래시(double backslash)는 줄 바꿈으로 작동합니다. 앰퍼샌드 기호(et), 또는 영어 이름으로도 알려진 ampersand *&* 는 방정식이 수직으로 정렬될 기준점을 설정하는 데 사용됩니다.

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## amsmath 패키지 가져오기

이 단계는 매우 간단합니다. LaTeX를 자주 사용하는 사용자라면 아마 이미 알고 있을 것입니다. 패키지 '*amsmath*'를 가져오려면 문서의 프리앰블에 다음 코드 줄을 추가하세요.

`\usepackage{amsmath}`

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## 하나의 방정식 쓰기

소개에서 언급했듯이 단일 방정식을 표시하려면 환경 *equation\** 을(를) 사용해 번호 없는 방정식을, 또는 환경 *equation* 을(를) 사용해 번호가 있는 방정식을 표시합니다. 또한 명령 `\label`을 사용하여 레이블을 추가할 수 있으며, 이 레이블은 나중에 문서 내에서 참조할 수 있습니다.

```latex
\begin{equation} \label{eu_eqn}
e^{\pi i} - 1 = 0
\end{equation}

아름다운 방정식 \ref{eu_eqn}은 오일러 방정식으로 알려져 있습니다
```

![Amsmath-eqn2.png](/files/1f25945d0fb2a1530c222dd6bcc036437c6b34bf)

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## 여러 줄의 방정식 포함하기

여러 줄에 걸친 방정식을 만들려면 환경 *multline*. 이중 백슬래시를 삽입하여 방정식이 분리될 지점을 설정해야 합니다. 첫 번째 부분은 왼쪽에 정렬되고, 다른 부분은 다음 줄에 표시되어 오른쪽에 정렬됩니다.

다른 명령과 마찬가지로, 방정식에 번호를 매길지 여부를 결정하기 위해 환경 이름에 별표를 붙일 수 있습니다.

```latex
\begin{multline*}
p(x) = 3x^6 + 14x^5y + 590x^4y^2 + 19x^3y^3\\
- 12x^2y^4 - 12xy^5 + 2y^6 - a^3b^3
\end{multline*}
```

![Amsmath-eqn3.png](/files/2942194d2f98bc788ec5bf3281bb5df1c9c48bce)

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## 방정식 나누기와 정렬하기

*split* 는 *multline*. 환경 *split* 은 방정식을 여러 부분으로 나눈 뒤, 마치 표 안에 있는 것처럼 열 단위로 정렬하는 데 사용됩니다. 이 환경은 환경 *equation* 안에서 사용해야 합니다. 예제는 이 글의 시작 부분에 있는 소개 섹션을 참조하세요.

## 여러 방정식 정렬하기

수직으로 정렬해야 하는 여러 방정식이 있다면, 환경 *align* 이 이를 처리합니다:

```latex
\begin{align*}
2x - 5y &=  8 \\
3x + 9y &=  -12
\end{align*}
```

![Amsmath-eqn4.png](/files/3f442e1fcaf8763adb6072a166b20dec6bab7382)

일반적으로 이항 연산자(>, <, =)를 수직 정렬 기준점으로 사용하면 시각적으로 보기 좋은 문서를 얻을 수 있습니다.

앞서 언급했듯이, 앰퍼샌드 기호 *&* 는 방정식의 정렬 지점을 결정합니다. 좀 더 복잡한 예를 보겠습니다:

```latex
\begin{align*}
x&=y           &  w &=z              &  a&=b+c\\
2x&=-y         &  3w&=\frac{1}{2}z   &  a&=b\\
-4 + 5x&=2+y   &  w+2&=-1+w          &  ab&=cb
\end{align*}
```

![Amsmath-eqn6.png](/files/5255f9a774be5efb1bd7aff777e190c54053dc7d)

여기서 방정식들은 세 개의 열에 배치됩니다. LaTeX는 각 방정식이 문자 *&*&#xB85C; 구분된 두 부분으로 이루어져 있다고 가정하며, 또한 각 방정식은 이전 방정식과 *&*.

로 구분된다고 가정합니다. 다시 말해, 별표 \*를 사용해 방정식 번호 매기기를 활성화하거나 비활성화할 수 있습니다. 번호 매기기가 활성화되면 각 줄을 개별적으로 레이블할 수 있습니다.

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## 방정식 묶기와 가운데 정렬

그냥 연속된 여러 방정식을 가운데 정렬하여 표시하기만 하면 되고, 어떤 정렬도 필요 없다면 환경 *gather*. 여기서도 방정식 번호 매기기를 활성화/비활성화하는 별표 트릭이 작동합니다.

```latex
\begin{gather*}
2x - 5y =  8 \\
3x^2 + 9y =  3a + c
\end{gather*}
```

![Amsmath-eqn5.png](/files/f80081131ef63b910b8e17bd5de692268bbd0073)

[Overleaf에서 amsmath 패키지 예제 열기](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e1889fd3e596077700148c/download/zip\&templateName=Amsmath_Example_Project\&compiler=pdflatex)

## 추가 읽을거리

자세한 정보는 다음을 참조하세요:

* [수학 표현식](/latex/ko/mathematics/01-mathematical-expressions.md)
* [대괄호와 소괄호](/latex/ko/mathematics/03-brackets-and-parentheses.md)
* [아래첨자와 위첨자](/latex/ko/mathematics/02-subscripts-and-superscripts.md)
* [수학 모드에서의 간격](/latex/ko/mathematics/08-spacing-in-math-mode.md)
* [수학 모드에서의 표시 스타일](/latex/ko/mathematics/10-display-style-in-math-mode.md)
* [수학 글꼴](/latex/ko/mathematics/12-mathematical-fonts.md)
* [그리스 문자와 수학 기호 목록](/latex/ko/mathematics/11-list-of-greek-letters-and-math-symbols.md)
* [연산자](/latex/ko/mathematics/07-operators.md)
* [분수와 이항계수](/latex/ko/mathematics/05-fractions-and-binomials.md)
* [amsmath 패키지 문서](http://mirrors.ctan.org/macros/latex/required/amsmath/amsmath.pdf)


---

# 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/ko/more-topics/03-aligning-equations-with-amsmath-es.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.
