# \smallmatrixquantity

Used to typeset small or inline matrix quantities in physics notation, optionally with parentheses, brackets, braces-as-input, or vertical bars around the matrix body.

https://texform.dev/latex/commands/smallmatrixquantity

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Physics: matrices](https://texform.dev/latex/topics/physics-matrices) |
| Packages | physics |
| Allowed mode | math |
| Tags | mathjax-extension |
| Commonality | low |
| Kind | prefix |

## Syntax

### physics

Argument specification: `s d<(,)><[,]><{,}><|,|>`

Used to typeset small or inline matrix quantities in physics notation, optionally with parentheses, brackets, braces-as-input, or vertical bars around the matrix body.

## Examples

```latex
\smallmatrixquantity{a & b \\ c & d}
```

[Open in Playground](https://play.texform.dev/?input=%5Csmallmatrixquantity%7Ba+%26+b+%5C%5C+c+%26+d%7D)

```latex
\smallmatrixquantity(a & b \\ c & d)
```

[Open in Playground](https://play.texform.dev/?input=%5Csmallmatrixquantity%28a+%26+b+%5C%5C+c+%26+d%29)

```latex
\smallmatrixquantity[a]
```

[Open in Playground](https://play.texform.dev/?input=%5Csmallmatrixquantity%5Ba%5D)

```latex
\smallmatrixquantity|a|
```

[Open in Playground](https://play.texform.dev/?input=%5Csmallmatrixquantity%7Ca%7C)

```latex
\smallmatrixquantity*(a)
```

[Open in Playground](https://play.texform.dev/?input=%5Csmallmatrixquantity*%28a%29)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| physics | full | none | full |

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

### Expands to (physics)

```latex
\smallmatrixquantity(#1)
```

→

```latex
\left(\begin{smallmatrix}{} #1\end{smallmatrix}\right)
```

Source constructs and reparses this macro string with array='smallmatrix'. Other branches use an unfenced \begin{smallmatrix}{}... form for {#1}, bracket/vertical-bar fences for [#1] and |#1|, an empty parenthesized smallmatrix when no body follows, and \lgroup/\rgroup for the starred parenthesized form.

## Equivalent forms

```latex
\smqty(#1)
```

exact. \smqty is mapped to the same MatrixQuantity implementation with the small=true parameter.

## See also

- [\\matrixquantity](https://texform.dev/latex/commands/matrixquantity)
- [\\mqty](https://texform.dev/latex/commands/mqty)
- [\\smqty](https://texform.dev/latex/commands/smqty)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \smallmatrixquantity | Positive: baseline | Pass | Fail | Pass |
| \smallmatrixquantity* | Positive: vary:s[0] | Pass | Fail | Pass |
| \smallmatrixquantity (a) | Positive: vary:d[1] | Pass | Fail | Pass |
| \smallmatrixquantity*(a) | Positive: maximal | Pass | Fail | Pass |
