The vertical bar, |, is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke (in logic), pipe, bar, or (literally, the word "or"), vbar, and others.
Usage
Mathematics The vertical bar is used as a mathematical symbol in numerous ways. If used as a pair of brackets, it suggests the notion of size. These are:
absolute value: | x | {\displaystyle |x|} , read "the absolute value of x" cardinality: | S | {\displaystyle |S|} , read "the cardinality of the set S" or "the length of a string S" determinant: | A | {\displaystyle |A|} , read "the determinant of the matrix A". When the matrix entries are written out, the determinant is denoted by surrounding the matrix entries by vertical bars instead of the usual brackets or parentheses of the matrix, as in | a b c d | {\displaystyle {\begin{vmatrix}a&b\\c&d\end{vmatrix}}} . order: | G | {\displaystyle |G|} , read "the order of the group G", or | g | {\displaystyle |g|} , "the order of the element g ∈ G {\displaystyle g\in G} " Likewise, the vertical bar is also used singly in many different ways:
conditional probability: P ( X | Y ) {\displaystyle P(X|Y)} , read "the probability of X given Y" distance: P | a b {\displaystyle P|ab} , denoting the shortest distance between point P {\displaystyle P} to line a b {\displaystyle ab} , so line P | a b {\displaystyle P|ab} is perpendicular to line a b {\displaystyle ab}
divisibility: a ∣ b {\displaystyle a\mid b} , read "a divides b" or "a is a factor of b", though Unicode also provides special 'divides' and 'does not divide' symbols (U+2223 ∣ DIVIDES and U+2224 ∤ DOES NOT DIVIDE) function evaluation: f ( x ) | x = 4 {\displaystyle f(x)|_{x=4}} , read "f of x, evaluated at x equals 4" (see subscripts at Wikibooks) restriction: f | A {\displaystyle f|_{A}} , denoting the restriction of the function f {\displaystyle f} , with a domain that is a superset of A {\displaystyle A} , to just A {\displaystyle A}
set-builder notation: { x | x < 2 } {\displaystyle \{x|x<2\}} , read "the set of x such that x is less than two". Often, a colon ':' is used instead of a vertical bar the Sheffer stroke in logic: a | b {\displaystyle a|b} , read "a nand b" subtraction: f ( x ) | a b {\displaystyle f(x)\vert _{a}^{b}} , read "f(x) from a to b", denoting f ( b ) − f ( a ) {\displaystyle f(b)-f(a)} . Used in the context of a definite integral with variable x. A vertical bar can be used to separate variables from fixed parameters in a function, for example f ( x | μ , σ ) {\displaystyle f(x|\mu ,\sigma )} , or in the notation for elliptic integrals. The double vertical bar, ‖ {\displaystyle \|} , is also employed in mathematics.
… excerpt ends here. Continue reading the full article.

