Norm in LaTeX (\| x \|)
- LaTeX command
\| x \|- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Encloses a vector or function in double bars to denote its norm, its length or size.
Norms are everywhere in analysis and linear algebra: the Euclidean norm \|x\|_2, the sup norm \|f\|_\infty, the Frobenius norm \|A\|_F, and the triangle inequality \|x + y\| \le \|x\| + \|y\|. A subscript after the closing bar indicates which norm. Writing \lVert x \rVert instead of \| x \| gives better spacing in expressions like \|{-x}\|, since LaTeX then knows each bar's role. For tall content, such as fractions inside the norm, use \left\| ... \right\|. Single bars |x| are reserved for absolute values.
Also listed under: Linear Algebra
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Norm: $\| x \|$
\[ \|x + y\| \le \|x\| + \|y\| \]
\end{document}Related symbols
- Double Bracket Left
\llbracket - Double Vertical Bar
\| - Double Bracket Right
\rrbracket - Floor
\lfloor x \rfloor - Double Brackets
\llbracket x \rrbracket - Floor Right
\rfloor
Frequently asked questions
- How do I write Norm in LaTeX?
- Type \| x \| in math mode, for example $\|x + y\| \le \|x\| + \|y\|$. It works in plain LaTeX without loading any package.
- Which package do I need for \| x \|?
- None. \| x \| is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \| x \| in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\| x \|$ in running text.
Best AI LaTeX Editor, Overleaf Alternative
Octree helps researchers from 15+ universities write research papers faster using AI
- Generate beautiful TikZ diagrams using AI
- Upload image and convert it to LaTeX seamlessly
- Get instant assistance with writing and formatting research papers