Absolute Value Symbol in LaTeX

Learn how to include the absolute value symbol in your LaTeX documents through several examples.

  1. Absolute Value Symbol
  2. Method 2: Using left vertical and right vertical commands
  3. Method 3: Using mid command
  4. Big absolute value latex
  5. Conclusion

Absolute Value Symbol

The general method to display an absolute value (or the modulus symbol) in LaTeX is by surrounding the number, variable, or expression with two vertical lines, |.

|x + y| = 1

The keyboard shortcut for the this symbol is Alt + 124. To use this shortcut, press Down the [Alt] key whilst typing 124. 

Check the following example:

% Abs symbol in LaTeX
This is an example of an absolute value symbol $|x+y|$.

Compiling of this piece of code yields:

absolute value symbol

Method 2: Using left vertical and right vertical commands

In this method, we can use the \lvert and \rvert command. These two commands require loading the amsmath package. Check this example:

% Required package
Modulus symbol for inline equations, $\lvert x + y \rvert = 1$ 

which yields the following output:

Method 3: Using mid command

Another similar command is \mid command. This will have larger spaces between the modulus symbol and other characters.

Modulus symbol for inline equations, $\mid x + y \mid = 1$ 

Big absolute value latex

The following table highlights different LaTeX commands that can be used to get big vertical line for absolute value symbol (big modulus symbol):

DescriptionLaTeX commandOutput
Absolute value symbol| \frac{e^2}{2}x | \( | \frac{e^2}{2}x | \)
Using right and left commands\left| \frac{e^2}{2}x \right|\( \left | \frac{e^2}{2}x \right | \)
Using big command\big | \frac{e^2}{2}x \big | \( \big | \frac{e^2}{2}x \big | \)
Using bigg command\bigg | \frac{e^2}{2}x \bigg | \( \bigg | \frac{e^2}{2}x \bigg | \)
Using Bigg command \Bigg | \frac{e^2}{2}x \Bigg | \( \Bigg | \frac{e^2}{2}x \Bigg | \)
Big vertical line absolute value in LaTeX

This has been considered in a previous post: “How do you make big parentheses in LaTeX?”.


In this short post, we presented different commands to typeset absolute value symbols in LaTeX.

Recent Posts