> 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/mathematics/06-aligning-equations-with-amsmath.md).

# 수식 정렬

## 소개

이 `amsmath` 이 패키지는 방정식을 표시하기 위한 몇 가지 옵션을 제공합니다. 방정식이 정말 길더라도, 또는 같은 줄에 여러 방정식을 포함해야 하더라도, 문서에 더 잘 맞는 레이아웃을 선택할 수 있습니다.

방정식에 대한 표준 LaTeX 도구는 유연성이 다소 부족하여, 방정식이 너무 길면 겹치거나 심지어 일부가 잘릴 수 있습니다. 우리는 다음을 사용하여 이러한 어려움을 극복할 수 있습니다 `amsmath` 패키지로, 문서의 프리앰블에 다음을 사용하여 추가할 수 있습니다 `\usepackage{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` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%5Cbegin%7Bequation%7D+%5Clabel%7Beq1%7D%0A%5Cbegin%7Bsplit%7D%0AA+%26+%3D+%5Cfrac%7B%5Cpi+r%5E2%7D%7B2%7D+%5C%5C%0A+%26+%3D+%5Cfrac%7B1%7D%7B2%7D+%5Cpi+r%5E2%0A%5Cend%7Bsplit%7D%0A%5Cend%7Bequation%7D%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

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

방정식을 다음 환경에 넣어야 합니다 `equation` 번호를 매기고 싶다면 `equation*` (별표가 있는) 환경을 사용하고, 그렇지 않다면 `equation` 환경 안에서는 `split` 환경을 사용하여 방정식을 더 작은 부분으로 나누면, 이러한 더 작은 부분들이 그에 맞게 정렬됩니다. 이중 백슬래시는 줄바꿈 문자로 작동합니다. 앰퍼샌드 문자 `&`,를 사용하여 방정식이 세로로 정렬될 지점을 설정합니다.

## 단일 방정식 작성

앞서 소개에서 언급한 대로 단일 방정식을 표시하려면 `equation*` 또는 `equation` 환경을 사용해야 하며, 방정식에 번호를 매길지 여부에 따라 다릅니다. 또한 문서 안에서 나중에 참고할 수 있도록 레이블을 추가할 수 있습니다.

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

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

[이 `amsmath` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%25%5Cmaketitle%0A%25%5Csection%7BIntroduction%7D%0A%5Cbegin%7Bequation%7D+%5Clabel%7Beu_eqn%7D%0Ae%5E%7B%5Cpi+i%7D+%2B+1+%3D+0%0A%5Cend%7Bequation%7D%0A%0AThe+beautiful+equation+%5Cref%7Beu_eqn%7D+is+known+as+the+Euler+equation.%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

![Neweuler1.png](/files/312a92ebdebecd33cb807d5d8035f8e1620f9980)

또한 [더 완전한 예제를 열어 보세요 `amsmath` Overleaf에서 패키지의](https://www.overleaf.com/project/new/template/19716?id=66719097\&templateName=Amsmath+example\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 긴 방정식 표시

한 줄보다 긴 방정식은 다음을 사용하세요 `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` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%5Cbegin%7Bmultline%2A%7D%0Ap%28x%29+%3D+3x%5E6+%2B+14x%5E5y+%2B+590x%5E4y%5E2+%2B+19x%5E3y%5E3%5C%5C+%0A-+12x%5E2y%5E4+-+12xy%5E5+%2B+2y%5E6+-+a%5E3b%5E3%0A%5Cend%7Bmultline%2A%7D%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

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

또한 [더 완전한 예제를 열어 보세요 `amsmath` Overleaf에서 패키지의](https://www.overleaf.com/project/new/template/19716?id=66719097\&templateName=Amsmath+example\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 방정식 분할 및 정렬

*분할* 은(는) 매우 비슷합니다 *multline*. 다음을 사용하세요 *split* 환경을 사용하여 방정식을 나누고, 마치 방정식의 부분들이 표에 있는 것처럼 열로 정렬하세요. 이 환경은 반드시 equation 환경 안에서 사용해야 합니다 *equation* 환경. 예시는 이 문서의 소개를 확인하세요.

## 여러 방정식 정렬

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

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

[이 `amsmath` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%5Cbegin%7Balign%2A%7D+%0A2x+-+5y+%26%3D++8+%5C%5C+%0A3x+%2B+9y+%26%3D++-12%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

![Amsmatheqn4OLV2.png](/files/544290e274a5176857b14b758607d916d576ba7f)

보통 이항 연산자(`>`, `<` 및 `=`)가 보기 좋은 문서를 위해 정렬되는 대상입니다.

앞서 언급했듯이, 앰퍼샌드 문자 `&` 가 방정식의 정렬 위치를 결정합니다. 더 복잡한 예를 살펴봅시다:

```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` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%5Cbegin%7Balign%2A%7D%0Ax%26%3Dy+++++++++++%26++w+%26%3Dz++++++++++++++%26++a%26%3Db%2Bc%5C%5C%0A2x%26%3D-y+++++++++%26++3w%26%3D%5Cfrac%7B1%7D%7B2%7Dz+++%26++a%26%3Db%5C%5C%0A-4+%2B+5x%26%3D2%2By+++%26++w%2B2%26%3D-1%2Bw++++++++++%26++ab%26%3Dcb%0A%5Cend%7Balign%2A%7D%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

![Amsmath-eqn6OLV2.png](/files/233ec1efd9173c76b903c8c13780f366775c9921)

여기서는 방정식을 세 개의 열로 배치합니다. LaTeX는 각 방정식이 앰퍼샌드로 구분된 두 부분으로 이루어져 있다고 가정하며 `&` 각 방정식이 앞의 것과는 앰퍼샌드로 구분되어 있다고 가정합니다 `&`.

다시 한 번, 방정식 번호를 전환하려면 \*를 사용하세요. 번호 매김이 허용되면 각 행에 개별적으로 레이블을 붙일 수 있습니다.

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

연속된 방정식 집합을 가운데 정렬되고 어떤 정렬도 없이 표시하기만 하면 된다면, `gather` gather 환경을 사용하세요. 방정식의 번호 매기기를 설정하거나 해제하는 별표 트릭은 여기서도 작동합니다.

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

[이 `amsmath` Overleaf의 조각](https://www.overleaf.com/docs?engine=\&snip_name=amsmath+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Ctitle%7BAmsmath+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BMay+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%5Cbegin%7Bgather%2A%7D+%0A2x+-+5y+%3D++8+%5C%5C+%0A3x%5E2+%2B+9y+%3D++3a+%2B+c%0A%5Cend%7Bgather%2A%7D%0A%5Cend%7Bdocument%7D)

다음 그래픽은 LaTeX 코드로 생성된 출력을 보여 줍니다:

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

## 추가 읽을거리

자세한 내용은 다음을 참조하세요

* [수학 표현식](/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/mathematics/06-aligning-equations-with-amsmath.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.
