How to write norm symbol in LaTeX like ||v||?

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 :

Use double bar for symbol

Alternatively, using a single backslash with vertical bars \|..\| produces the same result. For example:

\[ \| x \| \]
\[ \| y \| \]
\[ \| \frac{x}{y} \| \]

Output :

Use backslash single bar

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 :

Use \lVert and \rVert or \Vert commands

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 :

\newcommand simplifies complex syntax into a shorter command.

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 :

norm symbol

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 :

Big or adjustable sized symbol

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 :

In physics package, use the built-in command

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 :

use four different size commands with the built-in command

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 :

symbol of constant size

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 :

Use mathtools package for displaying double bars

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 :

Use the star modifier with the command.

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 :

Use the optional arguments \big, \Big, \bigg, and \Bigg with this command to adjust the symbol's size.

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 :

Vector magnitude

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.

Share tutorial

Leave a Comment

Your email address will not be published. Required fields are marked *