Physics: bra-ket\innerproduct

\innerproductCommand

Used in quantum-mechanical bra-ket notation to typeset inner products such as ⟨\psi|\phi⟩ or ⟨\psi|\psi⟩.

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

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

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

Examples#

\innerproduct{a}{b}
\innerproduct*{a}
\innerproduct*{a}{b}

In TeXForm#

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

Expands to#

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

When unstarred. If #2 is omitted, expands to \left\langle{#1}\middle\vert{#1}\right\rangle. Starred forms use unscaled \langle and \rangle.

Equivalent forms#

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

    Alias implemented by the same parse method; the same optional star and optional second braced group are also accepted.

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

    Alias implemented by the same parse method; if the second braced group is omitted, MathJax duplicates #1 as the ket.

See also#

Test cases#

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