Inner product (⟨u, v⟩) in LaTeX
An inner product is written with angle brackets, ⟨u, v⟩; in LaTeX use \langle and \rangle, never the < and > keys.
Main page: Dot product / centred dot (·) in LaTeX →
LaTeX command
\langle u, v \rangleNot the symbol you meant? Draw it to find the command →
Typing up handwritten notes? Convert a whole page of handwriting to LaTeX →
< and > are relations, less than and greater than, so LaTeX puts wide gaps around them and they are the wrong shape. \langle and \rangle are the angle-bracket delimiters, built into LaTeX and KaTeX, with the spacing of brackets.
Like other delimiters they can grow: \left\langle \frac{u}{2}, v \right\rangle. The inner product also defines the norm, , and for vectors in ℝⁿ it is the dot product, written .
Quantum mechanics writes inner products in bra-ket form, . \mid gives the bar a little space; the braket package's \braket{\psi|\phi} sizes the brackets and bar together. If you write inner products often, define an \inner command once with mathtools, as below.
An \inner command (mathtools)
Declare it once in the preamble. \inner{u, v} prints ⟨u, v⟩, and the starred \inner*{\frac{u}{2}, v} grows with its contents.
\usepackage{mathtools}\DeclarePairedDelimiter{\inner}{\langle}{\rangle}Other forms
\left\langle \frac{u}{2}, v \right\ranglebrackets that grow\langle u \mid v \ranglebra-ket formu \cdot vdot productExamples
$\langle u, v \rangle = \sum_{i=1}^{n} u_i v_i$the standard inner product
$\langle f, g \rangle = \int_a^b f(x) g(x) \, dx$an inner product of functions
$\lvert \langle u, v \rangle \rvert \leq \lVert u \rVert \, \lVert v \rVert$the Cauchy-Schwarz inequality
$\left\langle \frac{u}{\lVert u \rVert}, v \right\rangle$brackets that grow
$\langle \psi \mid \phi \rangle$bra-ket notation
Tips and common mistakes
- Use
\langleand\rangle, never < and >, which are spaced as relations. - Let the brackets grow with
\left\langleand\right\ranglewhen a fraction sits inside. - Both brackets are built in; mathtools only adds an
\innershortcut, and braket adds\braket. - For vectors in ℝⁿ, is the same product written as a dot product.
- Keep one notation, ⟨u, v⟩ or (u, v), through a whole document.
Working from handwritten notes?
LatexNotes turns a photo or PDF of handwritten mathematics into LaTeX, graphs and all. It is built with real pdflatex before you see it, and the .tex file is yours to edit or take to Overleaf. Free to try, no sign-up.
See how handwriting to LaTeX works, step by step, or go from GoodNotes to LaTeX if you write on an iPad (Notability works the same way).
Convert your maths to LaTeX →FAQ
How do I write an inner product in LaTeX?
Write \langle u, v \rangle, which prints ⟨u, v⟩.
Why not use < and >?
They are relations, so LaTeX spaces them as less than and greater than. \langle and \rangle are the angle brackets.
How do I write bra-ket notation?
Write \langle \psi \mid \phi \rangle, or use the braket package's \braket{\psi|\phi}.
How do I make the angle brackets bigger?
Put \left and \right in front: \left\langle ... \right\rangle.