Physics: matrices\identitymatrix

\identitymatrixCommand

Generates the entries of an n×n identity matrix from a dimension argument, usually inside a matrix or array context or within other physics-package matrix macros.

\begin{matrix}\identitymatrix{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#

\identitymatrixm: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#

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

Expands directly into matrix rows and columns

See also#

Test cases#

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