Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Vertical bar
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== ===Mathematics<!--'Double vertical bar' and 'Propositional truncation' redirect here-->=== The vertical bar is used as a [[table of mathematical symbols|mathematical symbol]] in numerous ways. If used as a pair of brackets, it suggests the notion of the word "size". These are: * [[absolute value]]: <math>|x|</math>, read "the ''absolute value'' of ''x''"<ref name="Weisstein">{{Cite web|last=Weisstein|first=Eric W.|title=Single Bar|url=https://mathworld.wolfram.com/SingleBar.html|access-date=2020-08-24|website=Wolfram MathWorld|language=en}}</ref> * [[cardinality]]: <math>|S|</math>, read "the ''cardinality'' of the [[set (mathematics)|set]] ''S''" or "the ''length'' of a [[String (computer science)|string]] ''S''" * [[determinant]]: <math>|A|</math>, read "the ''determinant'' of the [[Matrix (mathematics)|matrix]] ''A''".<ref name="Weisstein" /> 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 <math>\begin{vmatrix} a & b \\ c & d\end{vmatrix}</math>. * [[Order (group theory)#Class equation|order]]: <math>|G|</math>, read "the ''order'' of the [[group (mathematics)|group]] ''G''", or <math>|g|</math>, "the ''order'' of the element <math>g \in G</math>" Likewise, the vertical bar is also used singly in many different ways: * [[conditional probability]]: <math>P(X|Y)</math>, read "the [[probability]] of ''X'' ''given'' ''Y''" * [[distance]]: <math>P|ab</math>, denoting the shortest ''distance'' between point <math>P</math> to line <math>ab</math>, so line <math>P|ab</math> is perpendicular to line <math>ab</math> * [[divisibility]]: <math>a \mid b</math>, read "''a'' ''divides'' ''b''" or "''a'' is a ''factor'' of ''b''", though Unicode also provides special 'divides' and 'does not divide' symbols ({{unichar|2223}} and {{unichar|2224}})<ref name="Weisstein" /> * [[Function (mathematics)|function]] evaluation: <math>f(x)|_{x=4}</math>, read "''f'' of ''x'', evaluated at ''x'' equals 4" (see [[b:LaTeX/Advanced Mathematics#Subscripts and superscripts|subscripts]] at Wikibooks) * [[Restriction (mathematics)|restriction]]: <math>f|_{A}</math>, denoting the ''restriction'' of the function <math>f</math>, with a domain that is a superset of <math>A</math>, to just <math>A</math> * [[set-builder notation]]: <math>\{x|x<2\}</math>, read "the set of ''x'' ''such that'' ''x'' is [[less than]] two". Often, a [[colon (punctuation)|colon]] ':' is used instead of a vertical bar * the [[Sheffer stroke]] in [[logic]]: <math>a|b</math>, read "''a'' ''nand'' ''b''" * [[subtraction]]: <math>f(x) \vert _a ^b</math>, read "''f(x)'' ''from'' ''a'' ''to'' ''b''", denoting <math>f(b) - f(a)</math>. 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 <math>f(x|\mu,\sigma)</math>, or in the notation for [[elliptic integrals]]. The '''double vertical bar'''<!--boldface per WP:R#PLA-->, <math>\|</math>, is also employed in mathematics. * [[Parallel (geometry)|parallelism]]: <math>AB \parallel CD</math>, read "the line <math>AB</math> ''is parallel to'' the line <math>CD</math>" * [[Norm (mathematics)|norm]]: <math>\|A\|</math>, read "the ''norm'' (length, size, magnitude etc.) of the matrix <math>A</math>". The norm of a one-dimensional [[Vector space|vector]] is the absolute value and single bars are used.<ref>{{Cite web|last=Weisstein|first=Eric W.|title=Matrix Norm|url=https://mathworld.wolfram.com/MatrixNorm.html|access-date=2020-08-24|website=Wolfram MathWorld|language=en}}</ref> * '''Propositional truncation'''<!--boldface per WP:R#PLA-->: (a [[Type theory|type]] former that truncates a type down to a [[proposition (logic)|mere proposition]] in [[homotopy type theory]]): for any <math>a : A</math> (read "term <math>a</math> of type <math> A</math>") we have <math>|a| : \left\| A \right\|</math><ref>{{cite book|author=Univalent Foundations Program|title=Homotopy Type Theory: Univalent Foundations of Mathematics (GitHub version)|year=2013|publisher=Institute for Advanced Study|url=https://hott.github.io/book/nightly/hott-a4-1075-g3c53219.pdf|page=108|access-date=2017-07-01|archive-date=2017-07-07|archive-url=https://web.archive.org/web/20170707022332/https://hott.github.io/book/nightly/hott-a4-1075-g3c53219.pdf|url-status=dead}}</ref> (here <math>|a|</math> reads "''[[Image (mathematics)|image]]'' of <math>a : A</math> in <math>\left\| A \right\|</math>" and <math>|a| : \left\| A \right\|</math> reads "''propositional truncation'' of <math display="inline">A</math>")<ref>{{cite book|author=Univalent Foundations Program|title=Homotopy Type Theory: Univalent Foundations of Mathematics (print version)|year=2013|publisher=Institute for Advanced Study|url=https://books.google.com/books?id=LkDUKMv3yp0C|page=450}}</ref> In LaTeX [[TeX#math mode|mathematical mode]], the ASCII vertical bar produces a vertical line, and <code>\|</code> creates a double vertical line (<code>a | b \| c</code> is set as <math>a | b \| c</math>). This has different spacing from <code>\mid</code> and <code>\parallel</code>, which are [[relational operator]]s: <code>a \mid b \parallel c</code> is set as <math>a \mid b \parallel c</math>. See below about [[LaTeX]] in text mode. === Chemistry === In chemistry, the vertical line is used in [[cell notation]] of electrochemical cells. Example, Zn | Zn<sup>2+</sup> || Cu<sup>2+</sup> | Cu Single vertical lines show components of the cell which do not mix, usually being in different phases. The double vertical line ( || ) is used to represent salt bridge; which is used to allow free moving ions to move. ===Physics=== The vertical bar is used in [[bra–ket notation]] in [[quantum physics]]. Examples: * <math>|\psi\rangle</math>: the quantum physical state <math>\psi</math> * <math>\langle\psi|</math>: the [[dual space|dual state]] corresponding to the state above * <math>\langle\psi|\rho\rangle</math>: the [[inner product]] of states <math>\psi</math> and <math>\rho</math> * [[Supergroup (physics)|Supergroups in physics]] are denoted ''G''(''N''|''M''), which reads "''G'', ''M'' vertical bar ''N''"; here ''G'' denotes any supergroup, ''M'' denotes the [[bosonic dimensions]], and ''N'' denotes the [[Grassmann dimensions]].<ref>Larus Thorlacius, Thordur Jonsson (eds.), ''M-Theory and Quantum Geometry'', Springer, 2012, p. 263.</ref> ===Computing=== ==== Pipe ==== {{Main|Pipeline (Unix)}} A [[pipe (Unix)|pipe]] is an [[inter-process communication]] mechanism originating in [[Unix]], which directs the output (standard out and, optionally, standard error) of one process to the input (standard in) of another. In this way, a series of commands can be "piped" together, giving users the ability to quickly perform complex multi-stage processing from the [[Command-line interface|command line]] or as part of a [[UNIX shell script|Unix shell script]] ("bash file"). In most [[Unix shell]]s (command interpreters), this is represented by the vertical bar character. For example: <code> [[grep]] -i 'blair' filename.log | [[More (command)#Unix|more]] </code> where the output from the <kbd>grep</kbd> process (all lines containing 'blair') is piped to the <kbd>more</kbd> process (which allows a command line user to read through results one page at a time). The same "pipe" feature is also found in later versions of [[DOS]] and Microsoft Windows. This usage has led to the character itself being called "pipe". ====Disjunction==== In many programming languages, the vertical bar is used to designate the [[Logical disjunction|logic operation ''or'']], either [[Bitwise operation|bitwise]] ''or'' or [[Boolean data type|logical]] ''or''. Specifically, in [[C (programming language)|C]] and other languages following [[C syntax]] conventions, such as [[C++]], [[Perl]], [[Java (programming language)|Java]] and [[C Sharp (programming language)|C#]], <code>a | b</code> denotes a [[Bitwise operation#OR|bitwise ''or'']]; whereas a double vertical bar <code>a || b</code> denotes a ([[Minimal evaluation|short-circuited]]) [[logical disjunction|logical ''or'']]. Since the character was originally not available in all [[code page]]s and keyboard layouts, [[ANSI C]] can transcribe it in form of the [[C trigraph|trigraph]] <code>??!</code>, which, outside string literals, is equivalent to the <code>|</code> character. In [[regular expression]] syntax, the vertical bar again indicates logical ''or'' ([[alternation (formal language theory)|alternation]]). For example: the Unix command <code>[[grep]] -E 'fu|bar'</code> matches lines containing 'fu' or 'bar'. ====Concatenation==== The double vertical bar operator "||" denotes [[string (computer science)|string]] [[concatenation]] in [[PL/I]], [[Rexx|REXX]], [[Object REXX|ooRexx]], standard [[ANSI SQL]], and theoretical computer science (particularly [[cryptography]]). ====Delimiter==== Although not as common as commas or tabs, the vertical bar can be used as a [[delimiter]] in a [[flat file]]. Examples of a [[pipe delimited|pipe-delimited]] standard data format are [[LEDES]] 1998B and [[HL7]]. It is frequently used because vertical bars are typically uncommon in the data itself. Similarly, the vertical bar may see use as a delimiter for [[regular expression]] operations (e.g. in [[sed]]). This is useful when the regular expression contains instances of the more common forward slash (<code>/</code>) delimiter; using a vertical bar eliminates the need to escape all instances of the forward slash. However, this makes the bar unusable as the regular expression "alternative" operator. ====Backus–Naur form==== In [[Backus–Naur form]], an expression consists of sequences of symbols and/or sequences separated by '|', indicating a [[Alternation (formal language theory)|choice]], the whole being a possible substitution for the symbol on the left. {{sxhl|2=bnf|1=<personal-name> ::= <name> {{!}} <initial>}} ====Concurrency operator==== In calculi of communicating processes (like [[pi-calculus]]), the vertical bar is used to indicate that processes execute in parallel. ====APL==== The pipe in [[APL (programming language)|APL]] is the modulo or ''residue'' function between two operands and the absolute value function next to one operand. ====List comprehensions==== {{Main|List comprehensions}} The vertical bar is used for list comprehensions in some functional languages, e.g. [[Haskell (programming language)|Haskell]] and [[Erlang (programming language)|Erlang]]. Compare [[#Mathematics|set-builder notation]]. ====Text markup==== The vertical bar is used as a special character in [[lightweight markup language]]s, notably [[MediaWiki]]'s [[Wikitext]] (in the templates and internal links). In LaTeX text mode, the vertical bar produces an [[em dash]] (—). The <code>\textbar</code> command can be used to produce a vertical bar. ===Phonetics and orthography=== {{main|International Phonetic Alphabet#Brackets and transcription delimiters}} In the [[Khoisan languages]] and the [[International Phonetic Alphabet]], the vertical bar is used to write the [[dental click]] ({{IPA|ǀ}}). A double vertical bar is used to write the [[alveolar lateral click]] ({{IPA|ǁ}}). Since these are technically letters, they have their own [[Unicode]] code points in the [[Latin Extended-B]] range: {{unichar|01C0}} and {{unichar|01C1}}. Some [[Northwest Caucasian languages|Northwest]] and [[Northeast Caucasian languages]] written in the [[Cyrillic script]] have a vertical bar called [[palochka]] ({{langx|ru|палочка|translation=little stick}}), indicating the preceding consonant is an [[Ejective consonant|ejective]]. Longer single and double vertical bars are used to mark [[Prosody (linguistics)|prosodic]] boundaries in the IPA. ===Literature=== {{anchor|Punctuation|Period|Comma}} In medieval European manuscripts, a single vertical bar was a common variant of the [[Slash (punctuation)|virgula]] {{char|[[/]]}} used as a [[comma]],<ref name=verg>{{cite dictionary |dictionary=Oxford English Dictionary |edition=Corrected reissue |entry=Virgule |date=1933 |publisher=Oxford University Press |page=[https://archive.org/details/the-oxford-english-dictionary-1933-all-volumes/The%20Oxford%20English%20Dictionary%20Volume%2012%20-%20Variant/page/n238/mode/1up?view=theater 235] |volume=XII}}.</ref> or [[caesura]] mark.<ref name=verg /> In [[Sanskrit]] and other [[Languages of India|Indian languages]], a single vertical mark, ।, called a [[danda]], has a similar function as a period (full stop). Two bars, ॥, (a 'double danda') is the equivalent of a [[pilcrow]] in marking the end of a [[stanza]], paragraph or section. The danda has its own Unicode code point, {{unichar|0964}}; as does the double danda: {{unichar|0965}}. ====Poetry==== {{anchor|Caesura}}<!--linked-->A double vertical bar {{angle bracket|{{!}}{{!}}}} or {{angle bracket|‖}}{{Citation needed|date=February 2025 |reason=Is this actually the right Unicode character to use? Or is only correct to use two regular vertical bars?}} is the standard ''[[caesura]] mark'' in English [[literary criticism]] and analysis. It marks the strong break or [[caesura]] common to many forms of [[poetry]], particularly [[Old English poetry|Old English verse]]. It is also traditionally used to mark the division between lines of verse printed as prose (the style preferred by [[Oxford University Press]]), though it is now often replaced by the [[forward slash]].{{citation needed|date=May 2024}} {{anchor|Bible|Bibles|Biblical}} ====Notation==== In the [[Geneva Bible]] and early printings of the [[King James Version]], a double vertical bar is used to mark [[Marginalia|margin notes]] that contain an alternative translation from the original text. These margin notes always begin with the conjunction "Or". In later printings of the King James Version, the double vertical bar is irregularly used to mark any comment in the margins. A double vertical bar symbol may be used to call out a [[footnote]]. (The traditional order of these symbols in English is [[Asterisk|*]], [[Dagger (mark)|†]], [[Dagger (mark)|‡]], [[Section sign|§]], ‖, [[Pilcrow|¶]], so its use is very rare; in modern usage, numbers and letters are preferred for [[note (typography)|endnotes and footnotes]].<ref>{{cite book |first=Robert |last=Bringhurst |date=2005 |title=The Elements of Typographic Style |edition=ver. 3.1 |location=Point Roberts, Washington |publisher=Hartley and Marks |pages=68–69 |quote=But beyond the ... double dagger, this order is not familiar to most readers, and never was.}} </ref>) ====Music scoring==== {{main|Sheet music}} In music, when writing chord sheets, single vertical bars associated with a colon (|: A / / / :|) represents the beginning and end of a section (e.g. Intro, Interlude, Verse, Chorus) of music.{{citation needed|date=May 2020}} Single bars can also represent the beginning and end of measures (|: A / / / | D / / / | E / / / :|). A double vertical bar associated with a colon can represent the repeat of a given section (||: A / / / :|| - play twice).{{citation needed|date=May 2020}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)