Absolute value (bars)
Absolute value of a number; for a set, its size; for a matrix, sometimes its determinant.
In ML papers
A pair of single bars has three common meanings, decided by what is inside: a number gives its absolute value (); a set gives its size, for the number of examples or for the vocabulary size; a matrix may give its determinant, .
How to type it
| LaTeX | Shows |
|---|---|
|x| | |
\lvert x \rvert cleaner spacing | |
\left| x \right| tall |
A worked example
Common confusions
- A single bar between two things, , means "given" (Given (conditional bar)), not absolute value.
- Double bars are a Norm.