Physics: bra-ket\dyad

\dyadCommand

Used in bra-ket notation for dyads or projector-like operators in quantum mechanics.

\dyad{a}
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#

\dyads*starm{a}math contentg{b}optional math content

Argspec s m g — two optional and one mandatory argument. Reading argspecs

Examples#

\dyad*{a}
\dyad{a}{b}
\dyad*{a}{b}

In TeXForm#

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

Expands to#

\dyad{#1}{#2} \left\vert{#1}\middle\rangle\!\middle\langle{#2}\right\vert

This is the unstarred two-argument branch. If the second argument is omitted, MathJax reuses #1 in its place; the starred form instead reparses \vert{#1}\rangle\!\langle{#2}\vert without \left/\middle/\right sizing.

Equivalent forms#

  • \outerproduct{#1}{#2}exact

    Same MathJax parser behavior, including the optional star and the omitted-second-argument default to the first argument.

  • \ketbra{#1}{#2}exact

    Same MathJax parser behavior, including the optional star and the omitted-second-argument default to the first argument.

  • \op{#1}{#2}exact

    Same MathJax parser behavior, including the optional star and the omitted-second-argument default to the first argument.

See also#

Test cases#

physics
InputCaseMathJaxKaTeXXeTeX
\dyad{a}Positive · baselinePassFailPass
\dyad*{a}Positive · vary:s[0]PassFailPass
\dyad{a}{b}Positive · vary:g[2]PassFailPass
\dyad*{a}{b}Positive · maximalPassFailPass
\dyad aPositive · bare[1]PassFailPass
All 22 in Physics: bra-ket