> 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/04-matrices.md).

# 행렬

## amsmath 행렬 환경

다음 `amsmath` 패키지는 서로 다른 구분 기호를 사용해 행렬을 조판할 수 있는 명령을 제공합니다. 일단 `\usepackage{amsmath}` 를 프리앰블에 로드하면, 수학 환경에서 다음 환경들을 사용할 수 있습니다:

| 유형                   | LaTeX 마크업                                             | 다음과 같이 렌더링됨                                         |
| -------------------- | ----------------------------------------------------- | --------------------------------------------------- |
| 일반                   | `\begin{matrix} 1 & 2 & 3\\ a & b & c \end{matrix}`   | $$\begin{matrix}1 & 2 & 3\a & b & c\end{matrix}$$   |
| <p>괄호;<br>둥근 괄호</p>  | `\begin{pmatrix} 1 & 2 & 3\\ a & b & c \end{pmatrix}` | $$\begin{pmatrix}1 & 2 & 3\a & b & c\end{pmatrix}$$ |
| <p>대괄호;<br>네모 괄호</p> | `\begin{bmatrix} 1 & 2 & 3\\ a & b & c \end{bmatrix}` | $$\begin{bmatrix}1 & 2 & 3\a & b & c\end{bmatrix}$$ |
| <p>중괄호;<br>곡괄호</p>   | `\begin{Bmatrix} 1 & 2 & 3\\ a & b & c \end{Bmatrix}` | $$\begin{Bmatrix}1 & 2 & 3\a & b & c\end{Bmatrix}$$ |
| 파이프                  | `\begin{vmatrix} 1 & 2 & 3\\ a & b & c \end{vmatrix}` | $$\begin{vmatrix}1 & 2 & 3\a & b & c\end{vmatrix}$$ |
| 이중 파이프               | `\begin{Vmatrix} 1 & 2 & 3\\ a & b & c \end{Vmatrix}` | $$\begin{Vmatrix}1 & 2 & 3\a & b & c\end{Vmatrix}$$ |

서로 다른 [구분 기호를](/latex/ko/mathematics/03-brackets-and-parentheses.md), 수동으로 일반 `matrix`예를 들면:

| LaTeX 마크업                                                                      | 다음과 같이 렌더링됨                                                                |
| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| `\left\lceil \begin{matrix} 1 & 2 & 3\\ a & b & c \end{matrix} \right\rceil`   | $$\left\lceil\begin{matrix}1 & 2 & 3\a & b & c\end{matrix}\right\rceil$$   |
| `\left\langle \begin{matrix} 1 & 2 & 3\\ a & b & c \end{matrix} \right\rvert`  | $$\left\langle\begin{matrix}1 & 2 & 3\a & b & c\end{matrix}\right\rvert$$  |
| `\left\langle \begin{matrix} 1 & 2 & 3\\ a & b & c \end{matrix} \right\rangle` | $$\left\langle\begin{matrix}1 & 2 & 3\a & b & c\end{matrix}\right\rangle$$ |

## 인라인 행렬

인라인 수학을 조판할 때, 위의 일반 `matrix` 환경들은 너무 크게 보일 수 있습니다. 다음을 사용하는 것이 더 나을 수 있습니다: `smallmatrix` 이런 상황에서는, 다만 직접 [구분 기호를](/latex/ko/mathematics/03-brackets-and-parentheses.md).

```latex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent 여기에서 인라인 행렬을 조판해 보겠습니다:
 $\begin{pmatrix}
  a & b\\
  c & d
\end{pmatrix}$,
하지만 너무 크게 보여서, 대신 다음을 시도해 봅시다
$\big(\begin{smallmatrix}
  a & b\\
  c & d
\end{smallmatrix}\big)$
대신.
\end{document}
```

[이 예제를 `smallmatrix` Overleaf의 예](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=amsmath+matrix+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cnoindent+Trying+to+typeset+an+inline+matrix+here%3A%0A+%24%5Cbegin%7Bpmatrix%7D%0A++a+%26+b%5C%5C+%0A++c+%26+d%0A%5Cend%7Bpmatrix%7D%24%2C++%0Abut+it+looks+too+big%2C+so+let%27s+try+%0A%24%5Cbig%28%5Cbegin%7Bsmallmatrix%7D%0A++a+%26+b%5C%5C%0A++c+%26+d%0A%5Cend%7Bsmallmatrix%7D%5Cbig%29%24+%0Ainstead.%0A%5Cend%7Bdocument%7D)

다음 이미지는 위 예제로 생성된 출력을 보여줍니다:

![Amsmatrix.png](/files/077d97e520ec6bff50867453455c3369a0087f80)

다음 `mathtools` 패키지는 `psmallmatrix`, `bsmallmatrix` 등의 환경을 편의를 위해 제공합니다.

## 추가 읽을거리

* [수학 표현식](/latex/ko/mathematics/01-mathematical-expressions.md)
* [대괄호와 괄호](/latex/ko/mathematics/03-brackets-and-parentheses.md)
* [amsmath를 사용한 방정식 정렬](/latex/ko/mathematics/06-aligning-equations-with-amsmath.md)
* [수학 모드의 표시 스타일](/latex/ko/mathematics/10-display-style-in-math-mode.md)
* [LaTeX2ε에 대한 그다지 짧지 않은 소개](http://www.ctan.org/tex-archive/info/lshort/)
* [amsmath 패키지 문서](http://texdoc.net/pkg/amsmath)
* [mathtools 패키지 문서](http://texdoc.net/pkg/mathtools)


---

# 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/04-matrices.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.
