# Matrices

Matrix environments and matrix-building commands.

https://texform.dev/latex/topics/matrices

This topic has 10 environments and 8 commands from the base, ams, and physics packages. Commands and environments show whether MathJax, KaTeX, and XeTeX render them. Entries are ordered by how often they appear in corpus formulas.

Packages: base (10), ams (8), physics (1).

| Name | Kind | Definition | Packages | MathJax | KaTeX | XeTeX | Frequency |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [array](https://texform.dev/latex/environments/array) | environment | Used for custom mathematical arrays, matrices, and piecewise-style layouts where the author supplies an explicit column preamble. | base | full | partial | partial | 3.24% |
| [pmatrix](https://texform.dev/latex/environments/pmatrix) | environment | Used for parenthesized matrices in linear algebra and systems of equations | ams | full | full | full | 0.86% |
| [bmatrix](https://texform.dev/latex/environments/bmatrix) | environment | Used for bracketed matrices in linear algebra and array notation | ams | full | full | full | 0.51% |
| [matrix](https://texform.dev/latex/environments/matrix) | environment | Used for ordinary matrices without surrounding delimiters inside equations and derivations | ams | full | full | full | 0.21% |
| [smallmatrix](https://texform.dev/latex/environments/smallmatrix) | environment | Used for compact inline matrices, often inside delimiters or larger formulas | ams, physics | full | full | full | 0.05% |
| [vmatrix](https://texform.dev/latex/environments/vmatrix) | environment | Used for determinant-style or absolute-value-style vertical-bar matrices | ams | full | full | full | 0.02% |
| [subarray](https://texform.dev/latex/environments/subarray) | environment | Creates a multi-line array of subscripts or limits, typically placed under operators like sum or prod | ams | full | full | full | 0.02% |
| [Bmatrix](https://texform.dev/latex/environments/Bmatrix) | environment | Used for matrices enclosed in curly braces, usually in specialized notational contexts | ams | full | full | full | <0.01% |
| [\\displaylines](https://texform.dev/latex/commands/displaylines) | command | Typesetting multiple centered equation lines using Plain TeX syntax | base | full | none | none | <0.01% |
| [Vmatrix](https://texform.dev/latex/environments/Vmatrix) | environment | Used for double-vertical-bar matrices, often for norms or specialized determinant-like notation | ams | full | full | full | <0.01% |
| [\\array](https://texform.dev/latex/commands/array) | command | Undocumented MathJax command alias for \matrix | base | full | none | none | <0.01% |
| [\\cases](https://texform.dev/latex/commands/cases) | command | Typesetting piecewise functions using Plain TeX syntax | base | full | none | full | 0% |
| [darray](https://texform.dev/latex/environments/darray) | environment | Used for array-style mathematical tables when displaystyle entries are desired throughout the cells, such as for larger fractions or operators inside an array. | base | full | partial | none | — |
| [\\eqalign](https://texform.dev/latex/commands/eqalign) | command | Typesetting aligned equations using Plain TeX syntax | base | full | none | none | — |
| [\\eqalignno](https://texform.dev/latex/commands/eqalignno) | command | Typesetting aligned equations with right-aligned equation numbers using Plain TeX syntax | base | full | none | none | — |
| [\\leqalignno](https://texform.dev/latex/commands/leqalignno) | command | Typesetting aligned equations with left-aligned equation numbers using Plain TeX syntax | base | full | none | none | — |
| [\\matrix](https://texform.dev/latex/commands/matrix) | command | Typesetting a matrix without delimiters using Plain TeX syntax | base | full | none | full | — |
| [\\pmatrix](https://texform.dev/latex/commands/pmatrix) | command | Typesetting a matrix with parentheses using Plain TeX syntax | base | full | none | full | — |
