Brackets in Mathematics, Programming and Text

Lecture 45 min.



Brackets are paired marks used in various fields. Brackets are two tall, forward-facing or backward-facing punctuation marks, usually used to set a segment of text or data apart from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a left or right bracket or, alternatively, an opening bracket or closing bracket, respectively, depending on the directionality of the context.

Specific forms of the mark include rounded brackets (also called parentheses), square brackets, curly brackets (also called braces) and angle brackets (also called chevrons), as well as various less common pairs of symbols.

Besides denoting the general class of punctuation, the word "bracket" is commonly used to refer to a specific form of bracket, which varies from region to region. In the United States, an unqualified "bracket" usually refers to the square bracket; in the United Kingdom and most other English-speaking countries, it refers to the round bracket.

Brackets in Mathematics, Programming and Text

The following kinds are distinguished:

  • round ( ) brackets;
  • square brackets;
  • curly { } brackets;
  • angle ⟨ ⟩ brackets (or < > in ASCII texts). Chevrons, or angle brackets

Usually the first bracket in a pair is called the opening bracket, and the second the closing bracket. Almost always (except for some mathematical notations) the opening and closing brackets match each other (square with square, and so on).

Chevrons ⟨⟩ were the earliest type of bracket to appear in written English. Desiderius Erasmus coined the term lunula for rounded brackets (), which resemble the shape of a crescent moon (Latin: luna).

Marks in which the opening and closing symbols are not distinguished are also used as brackets, for example:

  • slash / / brackets;
  • vertical bar | | brackets;
  • double vertical bar ‖ ‖ brackets.

They are used in mathematics, physics, chemistry and other sciences to set the order of precedence of operations in formulas.

Various brackets (like other unpaired ASCII symbols) are used in smileys (emoticons), for example, :) or :-).

Names for the various bracket symbols

Some of the following names are regional or context-specific.

  • () - round brackets, parentheses (UK, Ireland, Canada, the West Indies, New Zealand, South Africa and Australia), brackets, parens, first brackets, curved brackets or smooth brackets.
  • {} - curly brackets (UK and US), braces, definite brackets, swirly brackets, curly braces, birdie brackets, French brackets, Scottish brackets, squiggly brackets, gull wings, seagulls, wavy brackets, twirly brackets, Tuborg brackets (DK), awards (NL), pointed brackets, second brackets, fancy brackets, M brackets, moustache brackets.
  • [] - brackets (US), square brackets, closed brackets, hard brackets, third brackets, hooks.
  • ⟨⟩ - angle brackets, less-than / greater-than signs (when the ASCII approximation <> is used), pointy brackets, triangular brackets, diamond brackets, tuples, chevrons, ropes, broken brackets, booklets.
  • ⸤ ⸥ 「」 - corner brackets
  • ⟦⟧ - double square brackets, white square brackets, Scott brackets
  • 〔〕 - tortoise shell brackets, or all-square brackets

The symbols ‹› and «», known as guillemets or angle quotation marks, are actually quotation marks used in several European languages. Which of each pair is the opening quotation mark and which the closing one depends on the language.

Similarly, the corner brackets 「」 are quotation marks used in East Asian languages, although they have been adapted for other contexts (see below).

Brackets in ellipses of omission

Ellipses of omission mark gaps in quotations that make a quotation shorter but preserve its meaning. Most often they are indicated by an ellipsis wrapped in some kind of brackets or with no brackets at all. Different languages follow different logic for marking omissions. For example, in Latvian, minor omissions are marked with a two-dot ellipsis .. , while larger omissions are marked with a two-dot ellipsis enclosed in square brackets [..]. In German, an ellipsis in round brackets (…) is most common, while in the French and Czech traditions the ellipsis is wrapped in square brackets […]. In English, the ellipsis usually stands without brackets, but is often spaced out or set off with spaces on both sides.

The rulebook of the Russian language states that a plain ellipsis should be used:

Typography

In English, typographers mostly prefer not to set brackets in italics, even if the enclosed text is italicized. In other languages, however, such as German, if the text in brackets is italicized, the brackets are usually italicized as well.

Round (operator) brackets

( )

Used in mathematics to set the precedence of mathematical and logical operations. For example, (2 + 3) · 4 means that 2 and 3 must be added first, and then the sum multiplied by 4; similarly, the expression Brackets in Mathematics, Programming and Text means that logical addition (∨) is performed first,Brackets in Mathematics, Programming and Text and then logical multiplication (∧).Brackets in Mathematics, Programming and Text Along with square brackets, they are also used to write the components of vectors:

Brackets in Mathematics, Programming and Text

and matrices:

Brackets in Mathematics, Programming and Text

to write binomial coefficients:

Brackets in Mathematics, Programming and Text

Round brackets in mathematics are also used to delimit function arguments: Brackets in Mathematics, Programming and Text to denote an open interval, and in some other contexts. Sometimes round brackets denote the scalar product of vectors:

Brackets in Mathematics, Programming and Text

(three different notations found in the literature are shown here) and the mixed (scalar triple) product:

Brackets in Mathematics, Programming and Text

Round brackets in mathematics are also used to indicate the infinitely repeating period of the positional representation of a rational number, for example

Brackets in Mathematics, Programming and Text

When denoting numerical intervals, round brackets indicate that the numbers at the edges of the set are not included in it, so the interval is open on one side (a half-interval) or on both sides. For example,

  • the left-open interval (1,3] contains all numbers x such that Brackets in Mathematics, Programming and Text
  • the right-open interval [1,3) contains all numbers x such that Brackets in Mathematics, Programming and Text
  • the interval (1,3), open on both sides, contains all numbers x such that Brackets in Mathematics, Programming and Text

In the compact notation of physical quantities with measurement uncertainties, round brackets are used to give the absolute uncertainty in units of the last significant digit of the value . For example, the value of Newton's gravitational constant written as 6.67408(31)·10−11 N·m²·kg−2 is equivalent to 6.67408·10−11 N·m²·kg−2 ± 0.00031·10−11 N·m²·kg−2.

In chemical formulas, round brackets are used to set off repeating functional groups, for example, (NH4)2CO3, Fe2(SO4)3, (C2H5)2O. Brackets are also used in the names of inorganic compounds to indicate the oxidation state of an element, for example, iron(II) chloride, potassium hexacyanoferrate(III).

Brackets (usually round, as in this sentence) are used as punctuation marks in natural languages. In Russian they are used to set off an explanatory word or a parenthetical sentence. For example: The Oryol village (we are speaking of the eastern part of Oryol Province) is usually situated amid plowed fields, near a ravine that has somehow been turned into a dirty pond (I. Turgenev). An unpaired closing bracket can be used when numbering items in an enumeration, for example: 1) the first item; 2) the second.

Many programming languages use round brackets to delimit constructs. For example, in Pascal and C, brackets enclose the parameters of procedure and function calls, and in Lisp they are used to describe a list.

Use in writing

Parentheses (singular, parenthesis) (also called simply brackets, round brackets, curved brackets, oval brackets, or, colloquially, parens) contain material that serves to clarify (in the form of a gloss) or is an aside from the main point. A milder effect can be achieved by using a pair of commas as delimiters, although if the sentence contains commas for other purposes, visual confusion may arise. This problem is avoided by using a pair of dashes instead of parentheses.

. In American usage, parentheses are usually regarded as distinct from other brackets and are called by that name; calling them "brackets" is unusual.

Parentheses may be used in formal writing to add supplementary information, for example: "Senator John McCain (R - Arizona) spoke at length." They can also indicate an abbreviation for "singular or plural" of nouns, for example "claim(s)". They can also be used for gender-neutral language, especially in languages with grammatical gender, for example "he(she) agreed with his (her) doctor" (with a slash in the second case, since one alternative replaces the other rather than adding to it).

Parenthetical phrases were widely used in informal writing and in stream-of-consciousness literature. Examples include the Southern American writer William Faulkner (see Absalom, Absalom! and the Quentin section of The Sound and the Fury), as well as the poet E. E. Cummings.

Parentheses were historically used where a dash is now used in alternatives such as "parenthesis (parentheses)". Examples of this usage can be seen in editions of Fowler.

Parentheses may be nested (usually with one set (such as this one) inside another set). This is generally not used in formal writing (although sometimes other brackets [especially square brackets] will be used for one or more inner sets of parentheses [in other words, secondary (or even tertiary) phrases can be found inside the main sentence enclosed in parentheses]).

Any punctuation inside parentheses or other brackets is independent of the rest of the text: "Mrs. Pennyfarthing (What? Yes, that was her name!) was my landlady." In this case the explanatory text in parentheses is a parenthesis. Text in parentheses is usually short and consists of a single sentence. Where several sentences of supplementary material are enclosed in parentheses, the final full stop is placed inside the parentheses or simply omitted. Again, parentheses imply that the meaning and sequence of the text are supplementary to the rest of the text, and the whole text would remain unchanged if the parenthetical sentences were removed.

In more formal usage, "parenthesis" can refer to the whole text enclosed in brackets, and not just to the punctuation marks used (so the whole text within this set of parentheses can be called a "parenthesis", "parenthetical", or "parenthetical phrase").

Use in enumerations

Lowercase Latin letters are used as indices, rather than bullets or numbers, followed by an unpaired bracket, in ordered lists, especially in: a) educational testing, b) technical text and diagrams, c) market research and d) elections.

Use in mathematics

Parentheses are used in mathematical notation to indicate grouping, often causing a different order of operations. For example: in the usual order of algebraic operations, 4 × 3 + 2 equals 14, since multiplication is performed before addition. However, 4 × (3 + 2) equals 20, because parentheses take precedence over the usual order of precedence, causing the addition to be performed first. Some authors follow a convention in mathematical equations that, when parentheses have one level of nesting, the inner pair is parentheses and the outer pair is square brackets. Example:

Brackets in Mathematics, Programming and Text

A related convention states that with two levels of nesting in brackets, curly brackets (braces) form the outermost pair. Following this convention, when more than three levels of nesting are required, the cycle of parentheses, square brackets and curly brackets is often continued. This helps to distinguish one such level from the next.

Parentheses are also used to delimit arguments in mathematical functions. For example, f(x) is the function f applied to the variable x. In coordinate systems, parentheses are used to denote a set of coordinates; thus, in the Cartesian coordinate system, (4, 7) may represent the point located at 4 on the x axis and 7 on the y axis.

Parentheses may be used to represent a binomial coefficient, as well as matrices.

Use in programming languages

Parentheses are part of the syntax of many programming languages. They are usually required to denote an argument, to tell the compiler which data type the method or function should look for first in order to initialize. In some cases, such as LISP, parentheses are a fundamental language construct. They are also often used for scoping functions and for arrays. In syntax diagrams they are used for grouping, for example in Extended Backus–Naur Form.

Use in other scientific fields

Parentheses are used in chemistry to denote a repeating substructure within a molecule, for example HC(CH 3)3 (isobutane), or, similarly, to indicate the stoichiometry of ionic compounds with such substructures: for example, Ca(NO 3)2 (calcium nitrate).

They can be used in various fields as a notation to indicate the amount of uncertainty in a numerical quantity. For example:

1234.453439 (11)

is equivalent to:

1234.345349 ± 0.00011

for example, the value of the Boltzmann constant can be given as 1.23534552 (79) × 10 J⋅K

Square brackets

In linguistics they are commonly used to denote transcription in phonetics or constituent boundaries in syntax.

Square brackets in quotations are used to mark the author's own text that clarifies the context of the quotation. For example, "There were about 100 of them [the hostages]." In bibliographic records, descriptions and references, square brackets mark the content of fields formulated by the compiler of the record on the basis of an analysis of the document, as well as those borrowed by the compiler from sources outside the document; for example: "Ivanov, I. I. Numerical Methods [Text] : textbook / I. I. Ivanov [et al.]; [foreword by P. P. Petrov]. — Moscow : Fizmatlit , 1995. — 313 p."

In mathematics, square brackets can denote:

  • The operation of taking the integer part of a number. This notation was introduced by Gauss in his third proof of the law of quadratic reciprocity in 1808 . It is also used for rounding to the nearest integer.
  • To set the precedence of operations (similarly to round brackets), as "second-level" brackets — this makes it easier to tell nested brackets apart, for example: [(2+3)⋅4]2Brackets in Mathematics, Programming and Text.
  • The vector product (cross product) of vectors: Brackets in Mathematics, Programming and Text.
  • Closed intervals; the notation [1;3] means that the set includes the numbers Brackets in Mathematics, Programming and Text. In this case the rule that brackets come in matching pairs is not observed; for example, an interval closed on the left and open on the right can be denoted as Brackets in Mathematics, Programming and Text or Brackets in Mathematics, Programming and Text.
  • The commutator Brackets in Mathematics, Programming and Text and the anticommutator Brackets in Mathematics, Programming and Text although for the latter curly brackets without a subscript are sometimes used.
  • Square (more rarely curly) brackets denote an operator of a special kind called the Poisson bracket: Brackets in Mathematics, Programming and Text
  • Square brackets can be used as an alternative to round brackets when writing matrices and vectors.
  • A single square bracket combines a disjunction of equations or inequalities (for the disjunction to hold, it is enough for any one of the conditions to hold, that is, it is the vertical form of the "or" operator); for example,
    Brackets in Mathematics, Programming and Text
    means that Brackets in Mathematics, Programming and Text.
  • Iverson notation.

In mathematics, besides ordinary square brackets, their modifications are also used: the "floor" Brackets in Mathematics, Programming and Text and "ceiling" Brackets in Mathematics, Programming and Text, denoting the nearest integer not exceeding Brackets in Mathematics, Programming and Text, and the nearest integer not less than Brackets in Mathematics, Programming and Text, respectively.

In chemistry, square brackets denote complex anions and cations, for example: Na2[Fe(NO)(CN)5], [Ag(NH3)2]+. In addition, under IUPAC nomenclature, the number of atoms in the bridges between two atoms in the names of organic polycyclic compounds is enclosed in square brackets, for example: bicyclo[2,2,2]octane.

In wiki markup, double square brackets are used for internal links, redirects, categories and interwiki links, and single ones for external links.

In programming they are most often used to specify the index of an array element; in Perl they also form a reference to an anonymous array; in Basic and some other fairly old languages they are not used.

The POSIX standard defines the test utility, whose synonym is the square bracket character "[".

Square brackets are often used to denote optionality, for example, of command-line parameters (see more in the article Backus–Naur form).

Use in published text

Square brackets - also called hooks or simply brackets (US) - are often used to insert explanatory material or to mark where [a word or ] has been omitted from the original material by someone other than the original author, or to indicate changes in quotations.

A bracketed ellipsis, [...] is often used to indicate omitted material: "I would like to thank [several unimportant people] for their tolerance [...]" Bracketed comments inserted into a quotation indicate where the original has been altered for clarity: "I appreciate this [honor], but I must decline", and "the future of psionics [see definition] is in question". Or one can quote the original statement "I hate to do laundry" with an added (sometimes grammatical) modification: "He hates to do laundry."

In addition, a lowercase letter may be replaced with a capital when the beginning of the original printed text is quoted in another piece of text or when the original text is omitted for brevity - for example, when referring to a wordy original: "To the extent that policymakers and elite public opinion generally have made use of economic analysis, they have done so in the way that the drunk uses the lamppost: for support, not for illumination", one can briefly quote: "[...] policymakers [...] have made use of economic analysis [...] in the way that the drunk uses the lamppost: for support, not for illumination". When nested parentheses are needed, square brackets are sometimes used in place of the inner pair of parentheses inside the outer pair. When deeper levels of nesting are required, it is customary to alternate round and square brackets at each level.

Alternatively, empty square brackets can also indicate omitted material, usually just a single letter. The original: "Reading is also a process, and it changes you." can be rewritten in a quotation as follows: It has been suggested that reading may "[...] also change you".

The bracketed expression "[sic]" is used after a quotation or reprinted text to indicate that the passage appears exactly as in the original source, where otherwise it might seem that a mistake had been made in the reproduction.

In translated works, brackets are used to give the same word or phrase in the original language in order to avoid ambiguity. For example: He is trained in the open palm [karate].

Use in proofreading

Brackets (called move-left or move-right symbols) are added at the sides of text in proofreading to indicate changes in indentation:

Move left [I sue for fate, deprived of other means, the only refuge of the remaining unfortunates.
Center ] Paradise Lost [
Move up Brackets in Mathematics, Programming and Text

Use in scientific fields

Square brackets are used in mathematics in various notations, including the standard notations for commutators, the floor function, Lie brackets, equivalence classes, Iverson brackets, and matrices. Square brackets can also denote closed intervals; Brackets in Mathematics, Programming and Text, for example, represents the set of real numbers from 0 to 5 inclusive.

Square brackets can also be used in chemistry to represent the concentration of a chemical substance in solution and to denote the charge of a Lewis structure ion (in particular, the distributed charge in a complex ion), repeating chemical units (especially in polymers) and transition-state structures, among other things.

Use in programming languages

Square brackets are used in many computer programming languages, primarily to define the order of evaluation, as well as for parameter lists and array indexing. But they are also used to denote general tuples, sets and other structures, as in mathematics. There may also be several other uses, depending on the language used. In syntax diagrams they are used to mark optional elements, for example in Extended Backus–Naur Form.

Use in linguistics

In linguistics, phonetic transcriptions are usually enclosed in square brackets, often using the International Phonetic Alphabet, whereas phonemic transcription usually uses paired slashes. Pipes (| |) are often used to denote a morphophoneme rather than a phonemic representation. Other conventions are the double slash (// //), the double vertical bar (|| ||) and curly brackets ({}). In lexicography, square brackets usually enclose the section of a dictionary entry that contains the etymology of the word defined by that entry.

Other

Square brackets are used to mark parts of text that need to be checked when preparing drafts before a document is finalized. They often mark points that have not yet been agreed in bills, and the year in which a report of certain court decisions was compiled.

Curly brackets

{ }

Curly brackets in some mathematical texts denote the operation of taking the fractional part, while in others they are used to indicate precedence of operations, as the third level of nesting (after round and square brackets). Curly brackets are used to denote sets. A single curly bracket combines systems of equations or inequalities and is used to denote a piecewise-defined function. As already mentioned above, curly brackets sometimes denote the anticommutator and Poisson brackets.

In wiki markup and in some web template markup languages (Django, Jinja), double curly brackets {{…}} are used for templates and built-in functions and variables, and single ones in certain cases form tables.

In programming, curly brackets are either statement delimiters (C, C++, Java, Perl and PHP) or a comment (Pascal), and may also serve to form a list (in Mathematica), an anonymous hash (in Perl, and in other positions for accessing a hash element), a dictionary (in Python) or a set (SETL).

Curly brackets { and }, also known as braces (UK and US) or simply curly brackets, flower brackets (India) and squiggly brackets (colloquially), are rarely used in prose and are not widespread in formal writing, but may be used to denote words or sentences that should be treated as a group, to avoid confusion when other types of brackets are already in use, or for a special purpose specific to a publication (for example, in a dictionary). More often they are used to denote a group of lines that should be taken together, for example, when referring to several lines of verse that are to be repeated.

In music they are known as "accolades" or "braces" and join two or more musical lines (staves) that are played simultaneously.

In mathematics they delimit sets, and in writing they can be used in a similar way: "Choose your animal {goat, sheep, cow, horse} and follow me." Curly brackets are also often used to denote the Poisson bracket between two quantities.

Use in programming languages

In many programming languages, curly brackets enclose groups of statements and create a local scope. Such languages (C, C#, C++ and many others) are therefore called curly-brace languages. They are used for the enumerated type, for example in C. In syntax diagrams they are used for repetition, for example in extended Backus–Naur form.

Phonetics

As an extension of the International Phonetic Alphabet, curly brackets are used for prosodic notation.

Angle brackets

⟨…⟩

In mathematics, angle brackets denote the scalar product in a pre-Hilbert space, for example:

Brackets in Mathematics, Programming and Text

In quantum mechanics, angle brackets are used in the so-called bra and ket (from the English bracket — bracket), introduced by P. A. M. Dirac to denote quantum states (vectors) and matrix elements. Quantum states are denoted as Brackets in Mathematics, Programming and Text (ket vector) and Brackets in Mathematics, Programming and Text (bra vector), their scalar product as Brackets in Mathematics, Programming and Text and the matrix element of an operator A in a particular basis as Brackets in Mathematics, Programming and Text

In addition, in physics angle brackets denote averaging (over time or another continuous argument), for example, Brackets in Mathematics, Programming and Text — the time average of the quantity f.

In textual criticism and the publication of literary monuments, angle brackets mark lacunae in the text — ⟨...⟩ .

In linguistics, angle brackets denote graphemes, for example, "the phoneme /a/ is represented by the letter ⟨a⟩" .

Typography

In ASCII texts (including HTML/XML and programming), similar-looking paired signs of the arithmetic inequality relations < and > are used to write angle brackets.

In typography, however, angle brackets are independent symbols. They can be distinguished from < and > by the larger angle between the sides — ⟨⟩ and <> .

In ΤΕΧ, the commands "\langle" and "\rangle" are used to write angle brackets.

The standard punctuation of Chinese, Japanese[ja] and Korean uses several additional kinds of brackets, including chevrons, similar in appearance to angle brackets — 〈 and 〉 or 《 and 》 for horizontal printing (in Japanese, 「」 may also be used as quotation marks) and ︿ and ﹀ or ︽ and ︾ for traditional vertical printing. In modern Japanese printing, European-style brackets () are widely used, as are Arabic numerals. In one of the Japanese language reform proposals it was even suggested to introduce European brackets in place of the traditional ones, but the proposal was rejected.

ASCII texts

In some markup languages, for example HTML and XML, angle brackets are used to delimit tags.

In wiki markup you can also use HTML markup, for example comments: , which are visible only when editing the article.

In programming, angle brackets are rarely used, so as not to create confusion between them and the relation signs ("<" and ">"). For example, in C, angle brackets are used in the #include preprocessor directive instead of quotation marks to show that the included header file must be searched for in one of the standard directories for header files, as in the following example:

 #include 
 #include "myheader.h"

the file stdio.h is located in the standard directory, and myheader.h in the current directory (the directory where the program source text is stored).

In addition, angle brackets are used in the programming languages C++, Java and C# when using generic programming facilities: templates and generics.

In some texts, doubled paired "<" and ">" are used to write guillemets (angle-style quotation marks), for example — <<quote>>.

Angle brackets ⟨⟩(often informally replaced by the less-than <and greater-than >signs or by "single" guillemets ‹›) are often used to enclose highlighted material.

In the physical sciences, angle brackets are used to denote an average over time or over another continuous parameter. For example,

Brackets in Mathematics, Programming and Text

the inner product of two vectors is usually written as ⟨a, b⟩, but other notations exist.

In mathematical physics, especially in quantum mechanics, the inner product between elements is customarily written as ⟨a | b⟩, as a short form of ⟨a | · | b⟩, or ⟨a | Ô | b⟩, where Ô is an operator. This is known as Dirac notation or bra–ket notation.

In set theory, chevrons or parentheses are used to denote ordered pairs and other tuples, while curly brackets are used for unordered sets.

In linguistics, angle brackets denote graphemes (that is, letters of the alphabet) or spelling, as in "The English word /kæt/ is spelled 'cat'."

In epigraphy, they may be used for the mechanical transliteration of text into the Latin alphabet.

In textual criticism, and consequently in many editions of works from before the modern period, chevrons mark sections of text that are illegible or otherwise lost; the editor often inserts his or her own reconstruction inside them where possible.

In HTML, chevrons (in fact the "greater than" and "less than" symbols) are used to bracket metatext. For example, it means that the following text should be shown in bold. Pairs of metatext tags are required — just as the brackets themselves usually come in pairs. The end of the bold text segment will be marked by . This usage is sometimes extended as an informal mechanism for conveying mood or tone in digital formats such as messaging, for example by adding "" at the end of a sentence.

Chevrons are infrequently used to denote words that are thought rather than spoken, for example:

⟨What an unusual flower! ⟩

The mathematical or logical symbols for "greater than>" and "less than < are inequalities"; when either symbol is bisected by a vertical line, it represents "not greater than" or "not less than" respectively. These symbols are not punctuation marks when used as intended to denote inequality. However, since true chevrons are not present on computer keyboards, the available "less than" and "greater than" symbols are often used instead. In this case they are loosely called angle [d] brackets or chevrons, but more correctly — and less confusingly — pointy brackets (see the Names section above).

Single and double pairs of comparison operators <<,>>(meaning much less than and much greater than, although the single characters ≪ and ≫ should be used for this purpose) are sometimes used as a fallback instead of guillemets «, »(used as quotation marks in many languages) when the proper characters are not available on the keyboard or in the encoding. Similarly, early Internet messaging conventions used the greater-than sign >, available in the ASCII character set, to mark quoted lines. This format, known as Usenet quoting, is used by mail clients when working in plain-text mode.

In comics, chevrons are often used to mark dialogue that has been notionally translated from another language; in other words, if a character speaks another language, instead of writing in that language and providing a translation, the author writes the translated text inside chevrons. Since no foreign language is actually written, this is translated only notionally.

In continuum mechanics, chevrons may be used as Macaulay brackets.

In East Asian punctuation, angle brackets are used as quotation marks. Chevron symbols are part of standard Chinese, Japanese and Korean punctuation, where they usually enclose book titles: ﹀ or ︽ and ︾ for traditional vertical printing and 〈 and 〉 or 《 and 》 for horizontal printing.

Slash brackets

/…/

They appeared on typewriters to save keys.

In programming in C and many languages with similar syntax, slashes together with the additional sign "*" mark the beginning and end of a comment:

/* Comment
   in C source code */

In JavaScript, slashes denote a regular expression:

var regular = /[a-z]+/;

Sometimes the surname that deciphers a signature is written in slashes. For example: signature …. /Ivanov I. I./

Vertical bars

|…|

Used in mathematics to denote the absolute value of a number or vector, or the determinant of a matrix:

Brackets in Mathematics, Programming and Text

Double vertical bars

‖…‖

Used in mathematics to denote the norm of an element of a linear space: ‖x‖; sometimes also for matrices:

Brackets in Mathematics, Programming and Text

History

Parentheses appeared in 1556 in Tartaglia (for a radical expression) and later in Girard. At the same time Bombelli used as an opening bracket a corner in the shape of the letter L, and as the closing one the same corner inverted (1560); this notation became the forerunner of square brackets. Curly brackets were proposed by Viète (1593). Still, most mathematicians at that time preferred to draw a bar over the expression being grouped instead of using brackets. Leibniz introduced brackets into general use.

Support in computers

Unicode codes and the like are assigned not to left and right brackets but to opening and closing ones, so when text containing brackets is displayed in right-to-left mode, each bracket reverses its visual direction. Thus the character ( is assigned to the opening parenthesis, which looks like a left ( in left-to-right text but like a right ) in right-to-left text. However, the keys on the keyboard are assigned to left and right brackets; for example, the ( key is assigned to the left parenthesis, which in left-to-right typing is the opening one and gets code 40, while in right-to-left typing (in layouts intended for languages written right to left, such as Arabic or Hebrew) it is the closing one and gets code 41.

Writing direction: Text in Russian (left to right). Text in Hebrew (right to left).
Sample text: This is text in Russian (left to right). ‏זה מלל בעברית (מימין לשמאל).‏‎
Opening bracket: The left bracket is typed with the ( key and has code 40. The right bracket is typed with the ) key and has code 40.
Closing bracket: The right bracket is typed with the ) key and has code 41. The left bracket is typed with the ( key and has code 41.

Lenticular brackets (biconvex brackets)

Some East Asian languages use lenticular brackets 【】, a combination of square and round brackets, called 方頭括號 (fāngtóu kuòhào) in Chinese and すみ付き (sumitsuki) in Japanese. They are used for output in Chinese and in titles and headings in Japanese.

Floor and ceiling corners ⌊ ⌋ or ⌈ ⌉

Floor corner brackets ⌊ and ⌋, and ceiling corner brackets ⌈ and ⌉ (U+2308, U+2309) are used to denote the integer-valued floor and ceiling functions.

Quine corners and half brackets ⌜ ⌝

Quine corners ⌜ and ⌝ have at least two uses in mathematical logic: either as quasi-quotation marks, as a generalization of quotation marks, or to denote the Gödel number of the enclosed expression.

Half brackets are used in English to mark added text, for example in translations: "Bill saw ⸤her⸥".

In editions of papyrological texts, half square brackets, ⸤ and ⸥ or ⸢ and ⸣, enclose text that is missing from the papyrus because of damage but can be restored with the help of another source, for example an ancient quotation of the text transmitted by the papyrus. For example, Callimachus Iamb 1.2 reads: ἐκ τῶν ὅκου βοῦν κολλύ⸤βου π⸥ιπρήσκουσιν. A hole in the papyrus has erased βου π, but these letters are supplied by an ancient commentary on the poem. The second broken source may range from to ⸣. Sometimes Quine corners are used instead of half brackets.

Double brackets ⟦⟧

Double brackets (or white square brackets), ⟦⟧, are used to denote the semantic evaluation function in formal semantics for natural language and in denotational semantics for programming languages. The brackets denote a function that maps a linguistic expression to its "denotation" or semantic value. In mathematics, double brackets may also be used to denote intervals of integers or, less often, the floor function. In papyrology, following the Leiden Convention, they are used to enclose text that was deleted in antiquity.

Quill brackets ⁅ ⁆

Known as "quill parentheses" (Swedish: piggparenteser), ⁅and ⁆ are used in Swedish bilingual dictionaries to enclose optional constructions.

Areas of use

Computing

Various bracket symbols are often used in many programming languages as operators or for other syntax markup. For example, in C-like languages, {and }are often used to delimit a block of code, while the parameters of method calls are usually enclosed in (and ).

In C, C++, Java and other languages derived from C, as well as in languages influenced by Scheme that adopted the C/Java syntax, such as JavaScript, the symbols "{}" are referred to as "curly brackets" or "braces" rather than brackets. Since the term "brace" is documented in the definitive programming specifications for these languages, it is preferable to use the proper term brace, so that there is no confusion between braces (used to denote compound statements) and brackets used to denote other concepts, such as array indices.

Mathematics

In addition to using parentheses to indicate the order of operations, brackets and parentheses are used to denote an interval, also called a half-open range. The notation [a, c) is used to denote the interval from a to c that includes a but does not include c. That is, [5, 12) would be the set of all real numbers from 5 to 12, including 5 but not 12. Numbers can be arbitrarily close to 12, including 11.999 and so on (with any finite number of nines), but 12.0 is not included. In some European countries, the notation [5, 12 [ is also used for this. The endpoint adjacent to a bracket is called closed, and the endpoint adjacent to a parenthesis is called open. If both types of brackets are the same, the whole interval may be called closed or open, as appropriate. Whenever +∞ or -∞ is used as an endpoint, it is usually considered open and is enclosed in parentheses. See Interval (mathematics) for a fuller treatment.

In quantum mechanics, chevrons are also used as part of Dirac's formalism, bra–ket notation, to denote vectors from the dual spaces to Bra ⟨A | and Ket | B⟩. Mathematicians also commonly write ⟨a, b⟩ for the inner product of two vectors. In statistical mechanics, chevrons denote an ensemble or time average. Chevrons are used in group theory to write group presentations and to denote the subgroup generated by a set of elements. Note that obtuse chevrons are not always (and not for all users) distinguished from the pair of "less than" and "greater than" signs <>, which are sometimes used as a typographic approximation of chevrons.

In group theory and ring theory, brackets denote the commutator. In group theory, the commutator [g, h] is usually defined as g h g h. In ring theory, the commutator [a, b] is defined as a b - b a. In addition, in ring theory, curly brackets denote the anticommutator, where {a, b} is defined as a b + b a. The bracket is also used to denote the Lie derivative or, more generally, the Lie bracket in any Lie algebra.

. Various notations, such as the vinculum, have a similar effect to square brackets in indicating the order of operations or otherwise grouping several symbols for a common purpose.

In the Z formal specification language, curly brackets define a set and chevrons define a sequence.

Accounting

Traditionally in accounting, totals are placed in parentheses. A debit balance account in a series of credit balances will have parentheses, and vice versa.

Quotations

If quoted material is altered in some way, the changes are enclosed in square brackets inside the quotation to show that the quotation is not exactly as given, or to add an annotation. For example: The plaintiff argued that his cause is just, stating that

[m] y cause is [sic] just.

In the original quoted sentence, the word "my" was capitalized: it was changed in the quotation given, and this change is indicated by brackets. Likewise, when the quotation contained a grammatical error (is / are), the quoting author signaled that the error was in the original by using "[sic]" (Latin for "thus").

Law

Square brackets are used in some countries when citing law reports to indicate parallel references to unofficial reporters. For example: Chronicle Pub. Co. v. Superior Court, (1918) 54 Cal.2d 5123, [7 Cal.Rptr. 129]. In some other countries (for example, England and Wales) square brackets are used to indicate that the year is part of the citation, while parentheses are used to indicate the year in which the decision was handed down. For example, the case "National Coal Board v England" [1954] AC 403 is contained in the 1914 volume of the Appeal Cases reports, although the decision may have been made in 1913 or earlier, whereas (1914) 98 Sol Jo 1236 reports a decision of 1914, in volume 98 of the Solicitor's Journal, which may be published in 1935 or later.

Sports

A tournament bracket, a schematic representation of a series of games played during a tournament, usually resulting in a single winner, is so named because of its resemblance to brackets or braces.

Unicode codes

Symbols Codes
(, ) 28, 29
[, ] 5B, 5D
{, } 7B, 7D
⟨, ⟩ 27E8, 27E9
<, > 3C, 3E
Symbols Codes
﹝, ﹞ FE5D, FE5E
⁅, ⁆ 2045, 2046
❨, ❩ 2768, 2769
❪, ❫ 276A, 276B
❬, ❭ 276C, 276D
Symbols Codes
❮, ❯ 276E, 276F
❰, ❱ 2770, 2771
❴, ❵ 2774, 2775
⦗, ⦘ 2997, 2998
❲, ❳ 2772, 2773

Representations of various types of brackets in Unicode and HTML are given below.

Uses Unicode SGML / HTML / XML entities Sample
general purpose U + 0028 Left parenthesis (lparen; (parentheses)
U+0029 Right parenthesis ) rparen;
U+005B Left square bracket [ [sic]
U+005D Right square bracket ]
Technical / mathematical. (general) U+003C Less-than sign <<
U + 003E Greater-than sign >>
U+007B Left curly bracket { {round, square, curly }
U+007D Right curly bracket }
Quotation. (Western texts) U + 00AB Left -pointing double angle quotation mark « « French quote » or »German quote«
U+00BB Right-pointing double angle quotation mark »
U+2039 Single left-pointing angle quotation mark ‹ ‹ x ›
U+203A Single right-pointing angle quotation mark ›
U+201C Left double quotation mark “ “English quote”
U+201D Right double quotation mark ”
U+2018 Left single quotation mark ' ‘English quote’
U+2019 Right single quotation mark ’
U+201A Single low-9 quotation mark ‚ ‚ ‚German quote‘ or ‚Polish quote’
U+201E Double low-9 quotation mark „ „ „German quote“ or „Polish quote”
Floor and ceiling functions U+2308 Left ceiling ⌈ ⌈ceiling⌉
U+2309 Right ceiling ⌉
U+230A Left floor ⌊ ⌊floor⌋
U+230B Right floor ⌋
Quine corners U+231C Top left corner ⌜ ⌜quasi-quotation⌝. ⌜editorial notation⌝
U+231D Top right corner ⌝
U+231E Bottom left corner ⌞ ⌞editorial notation⌟
U+231F Bottom right corner ⌟
Technical/mathematical. (specialized)
U+207D Superscript left parenthesis ⁽ X⁽²⁾
U+207E Superscript right par enthesis ⁾
U+208D Subscript left parenthesis ₍ X₍₂₎
U+208E Subscript right parenthesis ₎
U+239B Left parenthesis upper hook ⎛

⎛. ⎜. ⎝ large.. parentheses ⎞. ⎟. ⎠

U+239C Left parenthesis extension ⎜
U+239D Left parenthesis lower hook ⎝
U+239E Right parenthesis upper hook ⎞
U+239F Right parenthesis extension ⎟
U+23A0 Right parenthesis lower hook ⎠
U+23A1 Left square bracket upper corner ⎡

⎡. ⎢. ⎣ large. square. brackets ⎤. ⎥. ⎦

U+23A2 Left square bracket extension ⎢
U+23A3 Left square bracket lower corner ⎣
U+23A4 Right square bracket upper corner ⎤
U+23A5 Right square bracket extension ⎥
U+23A6 Right square bracket lower corner ⎦
U+23A7 Left cu rly bracket upper hook ⎧

⎧. ⎨. ⎩ large. curly. brackets ⎫. ⎬. ⎭

U+23A8 Left curly bracket middle piece ⎨
U+23A9 Left curly bracket lower hook ⎩
U+23AB Right curly bracket upper hook ⎫
U+23AC Right curly bracket middle piece ⎬
U+23AD Right curly bracket lower hook ⎭
U+23AA Curly bracket extension ⎪ ⎪
U+23B0 Upper left or lower right curly bracket section ⎰

⎰. ⎱ more curly. brackets ⎱. ⎰

U+23B1 Upper right or lower left curly bracket section ⎱
U+23B4 Top square bracket ⎴

⎴. horizontal square. ⎶. brackets. ⎵

U+23B5 Bottom square bracket ⎵
U+23B6 Bottom square bracket over top square bracket ⎶
U+23B8 Left vertical box line ⎸ ⎸boxed text⎹
U+23B9 Right vertical box line ⎹
U+23DC Top parenthesis ⏜

⏜. horizontal parentheses. ⏝

U+23DD Bottom parenthesis ⏝
U+23DE Top curly bracket ⏞

⏞. horizontal curly brackets. ⏟

U+23DF Bottom curly bracket ⏟
U+23E0 Top tortoise shell bracket ⏠

⏠. tortoise shell brackets. ⏡

U+23E1 Bottom tortoise shell bracket ⏡
U+27C5 Left s-shaped bag delimiter ⟅ ⟅...⟆
U+27C6 Right s-shaped bag delimiter ⟆
U+27D3 Lower right corner with dot ⟓ ⟓pullback...pushout⟔
U+27D4 Upper left corner with dot ⟔
U+27E6 Mathematical left white square bracket ⟦ ⟦white square brackets⟧
U+27E7 Mathematical right white square bracket ⟧
U + 27E8 Mathematical left angle bracket ⟨⟨ ⟨a, b⟩
U+27E9 Mathematical right angle bracket ⟩⟩
U + 27EA Mathematical left double angle bracket ⟪ ⟪A, B⟫
U + 27EB Mathematical right double angle bracket ⟫
U+27EC Mathematical left white tortoise shell bracket ⟬ ⟬ white tortoise shell brackets
U+27ED Mathematical right white tortoise shell bracket ⟭
U+27EE Mathematical left flattened parenthesis ⟮ "flattened parentheses"
U+27EF Mathematical right flattened parenthesis ⟯
U+2983 Left white curly bracket ⦃ "white curly brackets"
U+2984 Right white curly bracket ⦄
U + 2985 Left white parenthesis ⦅ "white / double parentheses"
U+2986 Right white parenthesis ⦆
U +2987 Z notation left image bracket ⦇ R⦇S⦈
U+2988 Z notation right image bracket ⦈
U + 2989 Z notation left binding bracket ⦉ ⦉x: ℤ⦊
U+298A Z notation right binding bracket ⦊
U+298B Left square bracket with underbar ⦋ ⦋underlined square brackets⦌
U + 298C Right square bracket with underbar ⦌
U+298D Left square bracket with tick in top corner ⦍ ⦍square brackets with tick⦐
U+2990 Right square bracket with tick in top corner ⦐
U+298E Right square bracket with tick in bottom corner ⦎ square brackets with tick
U+298F Left square bracket with tick in bottom corner ⦏
U + 2991 Left angle bracket with dot ⦑ "Dotted angle brackets"
U+2992 Right angle bracket with dot ⦒
U+2993 Left arc less-than bracket ⦓ ⦓inequality brackets
U+2994 Right arc greater-than bracket ⦔
U + 2995 Double left arc greater-than bracket ⦕ inequality sign brackets⦖
U+2996 Double right arc less-than bracket ⦖
U+2997 Left black tortoise shell bracket ⦗ Black tortoise shell bracket
U + 2998 Right black tortoise shell bracket ⦘
U+29D8 Left wiggly fence ⧘ ⧘...⧙
U + 29D9 Right wiggly fence ⧙
U+29DA Left double wiggly fence ⧚ ⧚...⧛
U+29DB Right double wiggly fence ⧛
U+29FC Left-pointing curved angle bracket ⧼ ⧼...⧽
U+29FD Right-pointing curved angle bracket ⧽
Half brackets U + 2E22 Top left half bracket ⸢ editorial mark⸣
U+2E23 Top right half bracket ⸣
U+2E24 Bottom left half bracket ⸤ editorial mark4
U + 2E25 Bottom right half bracket ⸥
Dingbats U+2768 Medium left parenthesis ornament ❨ ❨Medium parenthesis ornament❩
U+2769 Medium right parenthesis ornament ❩
U+276A Medium flattened left parenthesis ornament ❪ "medium flattened parenthesis ornament"
U+276B Medium flattened right parenthesis ornament ❫
U+276C Medium left-pointing angle bracket ornament ❬ ❬ Medium angle bracket ornament+
U+276D Medium right-pointing angle bracket ornament ❭
U + 2770 Heavy left-pointing angle quotation mark ornament ❰ "Heavy angle quotation mark ornament"
U+2771 Heavy right-pointing angle quotation mark ornament ❱
U+276E Heavy left-pointing angle bracket ornament ❮ "Heavy angle bracket ornament"
U+276F Heavy right-pointing angle bracket ornament ❯
U +2772 Light left tortoise shell bracket ornament ❲ "Light tortoise shell bracket ornament"
U+2773 Light right tortoise shell bracket ornament ❳
U+2774 Medium left curly bracket ornament ❴ Medium curly bracket ornament
U + 2775 Medium right curly bracket ornament ❵
Arabic U+FD3E Ornate left parenthesis ﴾ ﴿العربية﴾
U+FD3F Ornate right parenthesis ﴿
N'Ko U+2E1C Left lower paraphrase bracket ⸜ ⸜ߒߞߏ⸝
U+2E1D Right lower paraphrase bracket ⸝
Ogham U + 169B Ogham feather mark ᚛ ᚛ᚑᚌᚐᚋ᚜
U + 169C Ogham reversed feather mark ᚜
Old Hungarian U + 2E42 Double low reversed quote-9 mark ⹂ ⹂
Tibetan U + 0F3A Tibetan mark gug rtags gyon ༺ ༺ དབུ་ ཅན་ ༻
U + 0F3B Tibetan mark gug rtags gyas ༻
U+0F3C Tibetan mark ang khang gyon ༼ ༼ ༡༢༣ ༽
U+0F3D Tibetan mark ang khang gyas ༽
New Testament editorial marks U + 2E02 Left square bracket ⸂ ⸂... ⸃
U+2E03 Right square bracket ⸃
U + 2E04 Left dotted substitution bracket ⸄ ⸄... ⸅
U+2E05 Right dotted substitution bracket ⸅
U + 2E09 Left transposition bracket ⸉ ⸉... ⸊
U+2E0A Right transposition bracket ⸊
U+2E0C Left raised omission bracket ⸌ ⸌... ⸍
U+2E0D Right raised omission bracket ⸍
Medieval studies U + 2045 Left square bracket with quill ⁅ ⁅... ⁆
U + 2046 Right square bracket with quill ⁆
U+2E26 Left sideways u bracket ⸦ ⸦crux⸧
U + 2E27 Right sideways u bracket ⸧
U+2E28 Left double bracket ⸨ ⸨...⸩
U+2E29 Right double bracket ⸩
Quotation. (East Asian texts) U + 3014 Left tortoise shell bracket 〔 〔...〕
U+3015 Right tortoise shell bracket 〕
U + 3016 Left white lenticular bracket 〖 〖...〗
U+3017 Right white lenticular bracket 〗
U+3018 Left white tortoise shell bracket 〘 〘...〙
U + 3019 Right white tortoise shell bracket 〙
U+301A Left white square bracket 〚 〚...〛
U + 301B Right white square bracket 〛
U+301D Reversed double prime quotation mark 〝 〝...〞
U + 301E Double prime quotation mark 〞
Quotation. (half-width East Asian texts) U + 2329 Left-pointing angle bracket 〈⟨ 〈deprecated〉
U+232A Right-pointing angle bracket 〉⟩
U + FF62 Half-width left angle bracket 「 「 カ タ カ ナ 」
U+FF63 Half-width right angle bracket 」
Quotation. (full-width East Asian texts) U + 3008 Left angle bracket 〈 〈한〉
U + 3009 Right angle bracket 〉
U+300A Left double angle bracket 《 《한》
U + 300B Right double angle bracket 》
U+300C Left angle bracket 「 「表 題」
U+300D Right angle bracket 」
U+300E Left white angle bracket 『 『表 題』
U+300F Right white angle bracket 』
U+3010 Left black lenticular bracket 【 【表 題】
U+3011 Right black lenticular bracket 】
General purpose. (East Asian full-width) U + FF08 Full-width left parenthesis ( (Wiki)
U+FF09 Full-width right parenthesis )
U + FF3B Full-width left square bracket [ [sic]
U+FF3D Full-width right square bracket ]
Technical / mathematical. (East Asian full-width) U + FF1C Full-width less-than sign < <HTML>
U+FF1E Full-width greater-than sign >
U+FF5B Full-width left curly bracket { {1、2}
U+FF5D Full-width right curly bracket }
U+FF5F Full-width left white parenthesis ⦅ ⦅... ⦆
U+FF60 Full-width right white parenthesis ⦆
  1. ^ ⟨ and ⟩ were linked to the deprecated symbols U+2329 and U+232A in HTML4 and MathML2, but are moved to U+27E8 and U+27E9 for HTML5 and MathML3, as defined in the XML Entity Definitions for Characters.
  2. ^This is the full-width version of U+2033 DOUBLE PRIME. In vertical texts, LOW DOUBLE PRIME QUOTATION MARK U+301F is preferred.

Curly brackets first became part of a character set with the 8-bit IBM 7030 Stretch code.

Angle brackets or chevrons at U+27E8 and U+27E9 are intended for mathematical use and Western languages, whereas U+3008 and U+3009 are intended for East Asian languages. Chevrons at U+2329 and U+232A are deprecated in favor of the East Asian angle brackets U+3008 and U+3009. Unicode does not recommend using them for mathematics and in Western texts, because they are canonically equivalent to the CJK code points U+300x and may therefore be displayed as double-width characters. The "less than" and "greater than" signs are often used instead of chevrons.

See also

  • Accolade (music)
  • History of mathematical notation
  • Emoticon
  • Japanese typographic symbols
  • Order of operations

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "HANDBOOK ON MATHEMATICS, SCHOOL MATHEMATICS, HIGHER MATHEMATICS"

Terms: HANDBOOK ON MATHEMATICS, SCHOOL MATHEMATICS, HIGHER MATHEMATICS