Double Vertical Bar in LaTeX (\|)

∥\|
LaTeX command
\|
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
∥U+2225

Where it is used

Double vertical bar, the delimiter for norms and the symbol for parallel in some contexts.

\| prints two vertical lines and is mostly used in pairs for norms, \|x\|. As a plain symbol it has ordinary spacing, so when you mean the relation is parallel to, use \parallel, which adds relation spacing. For norms, \lVert and \rVert are recommended, because they tell LaTeX which side opens and closes, giving correct spacing next to operators and minus signs. It can be sized with \left\| ... \right\| or \big\|. In text mode \| does not give the bars; use \textbardbl or switch to math.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∥x∥2=x12+x22+⋯+xn2\|x\|_2 = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2}
\documentclass{article}
\begin{document}
Double Vertical Bar: $\|$

\[ \|x\|_2 = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2} \]
\end{document}

Related symbols

All 괄호 및 구분자 →

Frequently asked questions

How do I write Double Vertical Bar in LaTeX?
Type \| in math mode, for example $\|x\|_2 = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2}$. It works in plain LaTeX without loading any package.
Which package do I need for \|?
None. \| is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \| in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\|$ in running text. If you only need the glyph in text, paste the Unicode character ∥ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기