> 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/ar/alryadhyat/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/ar/alryadhyat/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/ar/alryadhyat/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/7db5d97809aa60c8a814d57f8fdc95f89008e78e)

ال `mathtools` توفّر الحزمة `psmallmatrix`, `bsmallmatrix` وغيرها من البيئات للتسهيل.

## قراءة إضافية

* [التعابير الرياضية](/latex/ar/alryadhyat/01-mathematical-expressions.md)
* [الأقواس والقوسان](/latex/ar/alryadhyat/03-brackets-and-parentheses.md)
* [محاذاة المعادلات باستخدام amsmath](/latex/ar/alryadhyat/06-aligning-equations-with-amsmath.md)
* [النمط المعروض في وضع الرياضيات](/latex/ar/alryadhyat/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/ar/alryadhyat/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.
