Physics: bra-ket\outerproduct

\outerproductCommand

Used in quantum mechanics to denote outer products or rank-one operators such as |\psi\rangle\langle\phi|.

\outerproduct{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#

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

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

Examples#

\outerproduct*{a}
\outerproduct{a}{b}
\outerproduct*{a}{b}

In TeXForm#

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

Expands to#

\outerproduct{#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#

  • \dyad{#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
\outerproduct{a}Positive · baselinePassFailPass
\outerproduct*{a}Positive · vary:s[0]PassFailPass
\outerproduct{a}{b}Positive · vary:g[2]PassFailPass
\outerproduct*{a}{b}Positive · maximalPassFailPass
\outerproduct aPositive · bare[1]PassFailPass
All 22 in Physics: bra-ket