Vertical bar (|): symbol, mathematical and typographic uses
Overview of the vertical bar glyph (|): names, mathematical meanings, computing uses, typographic variants, examples and distinctions.
The vertical bar is the simple straight glyph represented as "|" and often called the pipe, vertical slash, or simply bar. It is used in many domains — from handwriting and printed text to mathematical notation and computer programming — where its meaning depends on context. The plain symbol itself can be referenced as the vertical bar, while discussions of its formal roles are common in mathematics and technical writing.
Image gallery
1 ImageMathematical meanings
In mathematics the vertical bar has several standard interpretations. When a single bar is placed on each side of a real or complex number it denotes absolute value, written as |x| for a real number and extended to complex numbers to indicate magnitude; the notion is often discussed under the heading absolute value. When the same single bars surround a square array they are frequently used to indicate the determinant of a matrix rather than the matrix itself; the determinant is a scalar summarizing certain linear properties of the matrix and is sometimes written with bars instead of brackets (determinant).
Placed between two integers the symbol denotes the divisibility relation: for integers a and b the notation a | b means "a divides b" — that is, b is a multiple of a. This usage is familiar in elementary number theory and is sometimes explained with simple examples such as 3 | 12.
Double bars and related constructions
Double vertical bars (‖ ... ‖) are used for different but related concepts. One common use is to denote a vector norm, a generalization of length that assigns a non‑negative size to a vector; this is often written as ‖v‖ for a vector v. Double bars can also appear in geometry to indicate that two lines or segments are parallel, written as ℓ1 ∥ ℓ2 in many textbooks.
Computing, programming and piping
Outside mathematics the vertical bar has a prominent role in computing. In command‑line environments and many programming languages it is called the pipe and is used to pass the output of one process as input to another. In logic and set notation it can serve as a separator or condition marker (for example, {x | property(x)}), where the bar reads "such that". In typesetting and markup it sometimes functions as a delimiter because its thin, vertical shape is visually unobtrusive.
Typography, history and distinctions
Typographically the vertical bar is distinct from similar characters such as the broken bar (¦), the lowercase letter l (l), and the numeral one (1); careful fonts and spacing help avoid confusion. Historically the exact origin of the modern keyboard vertical bar is tied to typewriter and early computer character sets that adopted a small set of printable symbols and assigned vertical bar its current code positions. Variants include single and double bars, each carrying different conventional meanings depending on discipline.
Summary and examples
- Absolute value: |z| for a complex or real z.
- Determinant: |A| for a square matrix A, sometimes written to mean det(A).
- Divisibility: a | b reads "a divides b".
- Norm and parallelism: ‖v‖ and ℓ1 ∥ ℓ2.
The vertical bar is a compact, versatile symbol whose interpretation depends strongly on surrounding notation. For quick reference see introductory texts on algebra, linear algebra, or command‑line programming for examples of how the bar is used in practice; more detailed discussions are found in subject‑specific sources and style guides.
Related topics: the pipe operator in shells and programming, typographic differences between bar and similar glyphs, and norms versus absolute values are common points of comparison for readers who wish to explore further.
For further reading consult general references on symbols and notation in mathematics and computing; entries on the glyph and its variants appear in many symbol tables and typography guides (glyph, notation).
Usage
Mathematics
- The single vertical line stands for
- the relation "divides" between integers
- the conditional probability in probability theory
- the restriction of the domain of definition of a given function: if are
two sets and
a function with domain of definition
, then
denotes the function which on
coincides with and is otherwise undefined.
- the function evaluation at one point.
- the difference of two function values at two points, for example in integral calculus:
- "with the property:" or "to which applies:" in the intensional notation of sets:
is the set of even integers,
is the unit circle
- the Sheffer's line in logic
- A pair of simple vertical strokes (like parentheses) denotes
- the absolute amount of a number
- the determinant of a matrix
- the power of a set
- The double vertical line denotes parallelism:
- A pair of double vertical bars (like brackets) denotes a standard
Physics
- In Dirac notation in physics, ⟨is
a matrix element.
Data processing and programming languages
- In shells, a vertical line indicates a pipe. Pipes can be used to chain the input and output streams of two programs. (Ex.: ls | more)
- In some markup languages, the vertical bar represents the border of a table cell
- In various databases (e.g. Informix) the vertical bar is used as a default separator of data fields for exported tables.
- In some search engines, such as Google, the vertical bar - placed without spaces between search terms - can replace the OR function (the operator "OR")
- In many programming languages (e.g. C, Perl, PHP, and Java), two vertical bars in a row denote the logical OR, and a single vertical bar denotes the bitwise OR.
- Two vertical bars one after the other denote the concatenation of two strings in various programming languages (e.g. Rexx)
Other uses
- In lexicons and dictionaries, such as the Duden, the vertical line indicates possible separators of a word; alternatively, a midpoint is sometimes used.
- In textual sciences, the vertical stroke is often used to mark a page turn.
- On the menus of gourmet restaurants, the vertical line is used when only the three main ingredients are indicated by the dishes to separate them.
- In the International Phonetic Alphabet (IPA) and in Khoisan languages, a similar click sound letter indicates the dental click.
Since the vertical stroke is not used in normal text, it is not considered a punctuation mark.
Coding
The vertical bars are defined and coded as follows:
| International character encoding standard Unicode | |||||||
| Characters | Unicode | German designation | HTML |
| |||
| Position | Name | hexadecimal | decimal | named |
| ||
| | | U+007C | Vertical line | Vertical stroke | | | | | (not available) |
|
| ¦ | U+00A6 | Broken bar | Interrupted stroke | ¦ | ¦ | & brvbar; |
|
| ∣ | U+2223 | Divides | Divide-Stroke | ∣ | ∣ |
| |
| ⎮ | U+23AE | Integral extension | Integral line | ⎮ | ⎮ |
| |
| │ | U+2502 | Box drawings light vertical | Element thin top-bottom | │ | │ |
| |
| ┃ | U+2503 | Box drawings heavy vertical | Element thick top-bottom | ┃ | ┃ |
| |
| ┆ | U+2506 | Box drawings light triple dash vertical | Element thin dashed top-bottom | ┆ | ┄ |
| |
| ┇ | U+2507 | Box drawings heavy triple dash vertical | Element thick dashed top-bottom | ┇ | ┇ |
| |
| ┊ | U+250A | Box drawings light quadruple dash vertical | Element thin dotted top-bottom | ┊ | ┊ |
| |
| ┋ | U+250B | Box drawings heavy quadruple dash vertical | Element thick dotted top-bottom | ┋ | ┋ |
| |
| ╎ | U+254E | Box drawings light double dash vertical | Element thin large dashed top-bottom | ╎ | ╎ |
| |
| ╏ | U+254F | Box drawings heavy double dash vertical | Element thick large dashed top-bottom | ╏ | ╏ |
| |
| ǀ | U+01C0 | Latin letter dental click | Latin letter Dental click | ǀ | ǀ |
| |
The current version of the ASCII character set contains the vertical stroke, but not the interrupted stroke. This occurs, however, in equally old character sets of the company IBM. However, the ASCII extensions ISO 6937 and ISO 8859-1 (also known as Latin-1) already contain both stroke variants in 1986. Almost all modern computers with Latin fonts use an ISO 8859 variant or the Unicode standard and can therefore process and display both characters without any problems.
There was originally a reason for the two variants of the vertical stroke (continuous and interrupted): In the older fonts, there were those which represented the vertical stroke confusingly in the same way as the lowercase letter l (small L) and the uppercase letter I (capital i). In more sophisticated documents, this resulted in three characters with an (almost) identical representation.
Related articles
Author
AlegsaOnline.com Vertical bar (|): symbol, mathematical and typographic uses Leandro Alegsa
URL: https://en.alegsaonline.com/art/104757