Physics: matrices\mqty

\mqtyCommand

Used as the short physics-package command for matrix quantities, with optional parentheses, brackets, braces-as-input, or vertical bars around the matrix body.

\mqty
Available in
physics
Kind
prefix
Allowed mode
math
Frequency
Not measured
Commonality
medium
Tags
mathjax-extension
Renderer support
PackageMathJaxKaTeXXeTeX
physicsMathJax: FullKaTeX: NoneXeTeX: Full
About the test scope

Syntax#

\mqtys*stard<(,)><[,]><{,}><|,|>(a)optional math content

Argspec s d<(,)><[,]><{,}><|,|> — two optional arguments. Reading argspecs

Examples#

\mqty{a}
\mqty(a)
\mqty*(a)
\mqty[a]
\mqty|a|

In TeXForm#

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

Expands to#

\mqty(#1) \left(\begin{array}{} #1\end{array}\right)

Source constructs and reparses this macro string. Other branches use \begin{array}{} #1\end{array} for {#1}, bracket or vertical-bar \left...\right forms for [#1] and |#1|, an empty parenthesized array with no following body, and \lgroup/\rgroup for \mqty*(#1).

Equivalent forms#

  • \matrixquantity(#1)exact

    \matrixquantity is mapped to the same MatrixQuantity implementation for the same following syntax.

See also#

Test cases#

physics
InputCaseMathJaxKaTeXXeTeX
\mqtyPositive · baselinePassFailPass
\mqty*Positive · vary:s[0]PassFailPass
\mqty (a)Positive · vary:d[1]PassFailPass
\mqty*(a)Positive · maximalPassFailPass
All 27 in Physics: matrices