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: 선형대수
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.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기