Physics: matrices\imat

\imatCommand

Short alias for generating the entries of an n×n identity matrix from a dimension argument, typically inside a matrix or array context.

\begin{matrix}\imat{2}\end{matrix}
Available in
physics
Kind
prefix
Allowed mode
math
Frequency
Not measured
Commonality
low
Renderer support
PackageMathJaxKaTeXXeTeX
physicsMathJax: FullKaTeX: NoneXeTeX: Full
About the test scope

Syntax#

\imatm:I{1}integer

Argspec m:I — one mandatory argument. Reading argspecs

In TeXForm#

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

Expands to#

\imat{n} 1 & 0 & ... \\ 0 & 1 & ... \\ ...

Expands directly into matrix rows and columns

See also#

Test cases#

physics
InputCaseMathJaxKaTeXXeTeX
\imat{1}Positive · baselinePassFailPass
\imat 1Positive · bare[0]PassFailPass
\imat{a}Negative · neg:I[0]FailFailFail
All 27 in Physics: matrices