Norm in LaTeX (\| x \|)

∥x∥\| 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.

∥x+y∥≤∥x∥+∥y∥\|x + y\| \le \|x\| + \|y\|
\documentclass{article}
\begin{document}
Norm: $\| x \|$

\[ \|x + y\| \le \|x\| + \|y\| \]
\end{document}

Related symbols

All الأقواس والمحددات →

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.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث