Vectors and matrices

∣x∣|x| 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 (∣−3∣=3|-3| = 3); a set gives its size, ∣D∣|\mathcal{D}| for the number of examples or ∣V∣|\mathcal{V}| for the vocabulary size; a matrix may give its determinant, ∣A∣=det⁡A|A| = \det A.

How to type it

LaTeXShows
|x|∣x∣|x|
\lvert x \rvert cleaner spacing∣x∣\lvert x \rvert
\left| x \right| tall∣x∣\left| x \right|

A worked example

∣−3∣=3,∣{a,b,c}∣=3|-3| = 3, \quad |\{a, b, c\}| = 3

Common confusions

Related

∥x∥2\|\mathbf{x}\|_2Normp(y∣x)p(y \mid x)Given (conditional bar)det⁡(A)\det(A)DeterminantD={(xi,yi)}i=1N\mathcal{D} = \{(\mathbf{x}_i, y_i)\}_{i=1}^{N}Set braces

Decode this example →