# Absolute Value Symbol in LaTeX

## 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:

## 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
\usepackage{amsmath}
%...
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):

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

## Conclusion

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