Physics: matrices\matrixquantity

\matrixquantityCommand

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

\matrixquantity{a & b \\ c & d}
Available in
physics
Kind
prefix
Allowed mode
math
Frequency
Not measured
Commonality
low
Tags
mathjax-extension
Renderer support
PackageMathJaxKaTeXXeTeX
physicsMathJax: FullKaTeX: NoneXeTeX: Full
About the test scope

Syntax#

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

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

Examples#

\matrixquantity(a & b \\ c & d)
\matrixquantity[a & b \\ c & d]
\matrixquantity|a & b \\ c & d|
\matrixquantity*(a & b \\ c & d)
\matrixquantity

In TeXForm#

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

Expands to#

\matrixquantity(#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}, \left[...\right] for [#1], \left|...\right| for |#1|, an empty parenthesized array when no body follows, and \lgroup/\rgroup for the starred parenthesized form.

Equivalent forms#

  • \mqty(#1)exact

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

See also#

Test cases#

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