LaTeX offers several ways to display the norm symbol, but its size doesn’t always adjust automatically to match the expression.
This guide covers the best and most recommended approach.
To display the norm symbol in LaTeX, use double vertical bars ||
around an expression or variable, which can be typed directly from your keyboard.
\[ || x || \] \[ || x^{2} || \] \[ || \frac{x}{y} || \]
Output :
Alternatively, using a single backslash with vertical bars \|..\|
produces the same result. For example:
\[ \| x \| \] \[ \| y \| \] \[ \| \frac{x}{y} \| \]
Output :
You can use \lVert
and \rVert
, or simply \Vert
, for double bar symbols. Remember, the V
must be capitalized, as LaTeX is case-sensitive.
\[ \Vert x \Vert \] \[ \lVert y \rVert \] \[ \lVert \frac{x}{y} \rVert \]
Output :
Writing the same symbol repeatedly can be tedious. To simplify the process, create a custom command using \newcommand
, which will save time and make your work more efficient.
\documentclass{article} \usepackage{amsmath} \newcommand\nm[1]{\lVert#1\rVert} \newcommand\nmx[1]{\Vert#1\Vert} \begin{document} \[ \nm{x }\] \[ \nmx{y} \] \[ \nmx{\frac{x}{y}} \] \end{document}
Output :
Big or adjustable Size Norm Symbol
So far, the norm symbol’s size remains fixed and does not automatically adjust to match the expression.
\documentclass{article} \usepackage{amsmath} \newcommand\nm[1]{\lVert#1\rVert} \newcommand\nmx[1]{\Vert#1\Vert} \begin{document} \[ \nm{\frac{x}{y}} \] \[ \nm{\sum_{i=1}^{n}x_{i}} \] \[ \nmx{\frac{w}{v}} \] \[ \nmx{w} \] \end{document}
Output :
To make the norm symbol adjust automatically to the expression, add \left
and \right
to your norm command. Here’s an example:
\documentclass{article} \usepackage{amsmath} \begin{document} \[ \left\lVert \frac{x}{y} \right\lvert \] \[ \left\lVert \sum_{i=1}^{n}x_{i} \right\lvert \] \[ \left\Vert \frac{w}{v} \right\Vert \] \[ \left\Vert w \right\Vert\] \end{document}
Output :
Using the physics package for the norm symbol
The physics
package includes a built-in \norm
command that automatically adjusts the symbol to the expression’s size.
\documentclass{article} \usepackage{physics} \begin{document} \[ \norm{\frac{x}{y}} \] \[ \norm{A_{i,j}} \] \[ \norm{\frac{w}{v}} \] \[ \norm{\sum_{i=1}^{n}\frac{x_i}{\abs{x}}} \] \end{document}
Output :
You can use four different big
commands with the norm command to adjust the symbol’s size as needed.
\documentclass{article} \usepackage{physics} \begin{document} \[ \norm\big{\frac{v}{w}} \; \norm\Big{\frac{v}{w}} \; \norm\bigg{\frac{v}{w}} \; \norm\Bigg{\frac{v}{w}} \] \end{document}
Output :
If you want a norm symbol with a fixed size, add an asterisk (*) to the command, like \norm*
.
\documentclass{article} \usepackage{physics} \begin{document} \[ \norm*{w} \] \[ \norm*{\frac{v}{w}} \] \[ \norm*{V_{i,j}} \] \[ \norm*{\sum_{i=1}^{n}x_{i}} \] \end{document}
Output :
Using mathtools package
The mathtools
package does not include a built-in norm command like the physics
package. but you can define it using \DeclarePairedDelimiter
.
\documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter\nm{\lVert}{\rVert} \begin{document} \[ \nm{w} \] \[ \nm{\frac{v}{w}} \] \[ \nm{\sum_{i=1}^{n}(x_{i})^2} \] \[ \sum_{i=1}^{n}\frac{w}{\nm{w_i}} \] \end{document}
Output :
In the output above, the norm symbol does not automatically scale to match the expression’s size. To ensure proper resizing, use the asterisk (*
) with the \nm
command.
\documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter\nm{\lVert}{\rVert} \begin{document} \[ \nm*{w} \] \[ \nm*{\frac{v}{w}} \] \[ \nm*{\sum_{i=1}^{n}(x_{i})^2} \] \[ \sum_{i=1}^{n}\frac{w}{\nm*{w_i}} \] \end{document}
Output :
You can use \big
, \Big
, \bigg
, and \Bigg
as optional arguments to adjust the command’s size. Here’s an example.
\documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter\nm{\lVert}{\rVert} \begin{document} \[ \nm[\big]{\frac{x}{y}} \; \nm[\Big]{\frac{x}{y}} \; \nm[\bigg]{\frac{x}{y}} \; \nm[\Bigg]{\frac{x}{y}} \] \end{document}
Output :
Norm of vector
This symbol is commonly used with vectors. For example, you can define the norm of a vector as follows.
\documentclass{article} \usepackage{physics,amsmath} \begin{document} \[ \norm{k\vec{a}}=\abs{k}\norm{\vec{a}} \] \[ \vu*{a}=\frac{\vec{a}}{\norm{\vec{a}}} \] \[ \norm{\vec{u}} = \sqrt{u^2_1 + u^2_2 + \cdots + u^2_n} \] \end{document}
Output :
Why Use the Physics Package?
In LaTeX, it is recommended to use the physics
package for the norm symbol. This package provides predefined commands, reducing the need for lengthy syntax.
This tutorial includes multiple examples to help you understand the concept better. Hope this answers your question.