Recent from talks
All channels
Be the first to start a discussion here.
Be the first to start a discussion here.
Be the first to start a discussion here.
Be the first to start a discussion here.
Welcome to the community hub built to collect knowledge and have discussions related to Bracket.
Nothing was collected or created yet.
Bracket
View on Wikipediafrom Wikipedia
Not found
Bracket
View on Grokipediafrom Grokipedia
A bracket is a punctuation mark, typically used in pairs, to enclose or set off segments of text, data, or symbols for purposes such as grouping, clarification, or indicating supplementary information in writing, mathematics, and computing.[1] The term encompasses several distinct types, each with specific conventions in different contexts.[2]
The primary types of brackets include round brackets (also called parentheses, shaped as ( )), square brackets ([ ]), curly brackets (or braces, { }), and angle brackets (or chevrons, < >).[1] In standard English writing, round brackets enclose nonessential asides or additional details that do not alter the main sentence's meaning, while square brackets are reserved for editorial insertions, such as clarifications within quotations or sic notations to indicate errors in quoted material.[3][4] Curly brackets often appear in technical or stylistic contexts, like denoting sets in linguistics or alternatives in dictionaries, and angle brackets are commonly used for denoting vectors in mathematics or XML/HTML tags in computing.[5]
In mathematics, brackets play a crucial role in denoting the order of operations—solved from innermost to outermost—and in specialized notations, such as square brackets for the floor function (the greatest integer less than or equal to a number)[6] or curly brackets for sets of elements.[7] For example, in an expression like 2 \times (3 + {{grok:render&&&type=render_inline_citation&&&citation_id=4&&&citation_type=wikipedia}}), the brackets ensure precise evaluation by prioritizing the enclosed operations.[5]
In computing and programming, brackets facilitate code structure and data handling: square brackets index arrays or lists (e.g., to specify a parameterized collection type.[105] This enhances type safety without runtime overhead.[106]
A key challenge arises from the dual role of < and > as both markup delimiters and mathematical inequality symbols, necessitating entity escapes like < and > in HTML to prevent parsing errors.[107] For instance, writing 5 < 10 in plain text within an HTML document requires < to avoid misinterpretation as an unclosed tag.[108] This ambiguity occasionally overlaps with symbolic uses, such as inner products in mathematics, but is primarily managed through standardized escaping in code contexts.[107]
These assignments ensure paired mirroring, where left and right forms are distinct glyphs that reverse in certain contexts. The round, square, and curly brackets date to Unicode 1.0 but were formalized in 1.1, while floor and ceiling brackets were added in Unicode 1.1 to support mathematical notation.[119][120][121][117] Mathematical angle brackets were introduced later in Unicode 3.2 (March 2002) to distinguish them from earlier geometric variants like U+2329 (left-pointing angle bracket).[121]
For bidirectional text handling, especially in right-to-left (RTL) scripts such as Arabic or Hebrew, Unicode employs the Bidirectional Algorithm (UAX #9) to correctly pair and mirror brackets. This includes properties like Bidi_Paired_Bracket_Type (e.g., open, close) and Bidi_Paired_Bracket, which identify matching pairs and ensure they display appropriately in mixed left-to-right (LTR) and RTL contexts, preventing visual mismatches.[122][123] The full catalog of bracket-related code points from Unicode 1.1 onward is documented in the Unicode Character Database, allowing implementers to query properties for robust text rendering.[124]
array[0] in languages like Python or Java), curly brackets define blocks of code or objects (e.g., in C++ functions or JSON data), and angle brackets specify type parameters in generics (e.g., <T> in Java).[8] These uses highlight brackets' versatility across disciplines, evolving from typographic conventions in early printing to essential symbols in modern digital notation.[9]
Overview
Definition and Classification
Brackets are paired punctuation marks used to enclose additional or non-essential information within a sentence, to group elements together, or to denote specific notations in fields such as text, mathematics, and programming.[10][1] These delimiters typically consist of an opening mark and a corresponding closing mark, allowing the enclosed content to be set apart without altering the core meaning of the surrounding text if removed.[10] In writing, they facilitate clarity by isolating asides, explanations, or references, while in technical contexts, they serve to organize expressions or data.[1] The primary classification of brackets is based on their shape and conventional usage, dividing them into four main types: round brackets, also known as parentheses ( ), which are the most common for general parenthetical insertions; square brackets [ ], often employed for editorial clarifications within quotations; curly brackets, or braces { }, typically used in mathematical sets or programming; and angle brackets < >, which appear in linguistic or computational notations.[2][1] Other specialized forms, such as floor brackets ⌊ ⌋, are used in mathematics to denote the greatest integer function but are not considered standard punctuation brackets.[1] The term "bracket" derives from the Old French word braguette, a diminutive of brague meaning "codpiece" or knee-length breeches, originating from Gaulish braca possibly via Germanic roots like Old English broc.[11] By the 16th century, it had evolved in English to refer to an architectural support projecting from a wall, resembling the shape of modern brackets, and by 1750, this sense extended to typography for the paired marks due to their supportive, enclosing appearance.[11][12] Brackets are distinct from similar symbols like quotation marks, which primarily indicate direct speech, titles, or emphasis rather than non-essential enclosures, and dashes, which are unpaired linear marks used for interruptions or abrupt shifts in thought instead of symmetric grouping.[1][13] This differentiation ensures brackets maintain their role as precise delimiters without overlapping functions in standard usage.[1]Role in Punctuation and Notation
Brackets serve primary roles in punctuation and notation by grouping elements to clarify structure, inserting asides for additional explanation, denoting alternatives such as translations, and indicating revisions like changes in capitalization or emphasis within quoted material.[4] For instance, in editorial contexts, brackets insert clarifications within quotations, such as "She [Lucy] never called back," ensuring the reader understands ambiguous references without altering the original text.[4] These functions extend to denoting alternatives, as in providing translations like "je ne sais pas [I don’t know]," or marking revisions, such as "[T]his study has been widely cited" to adjust initial capitalization.[4] In complex sentences and expressions, brackets play a crucial role in disambiguating meaning, particularly in legal texts where precision prevents misinterpretation of statutes or contracts, and in formulas where they resolve operator precedence.[14] For example, in formal legal writing, brackets can clarify scope in ambiguous phrasing, such as inserting identifiers or corrections to avoid disputes over intent.[4] Similarly, in mathematical and logical notation, brackets group terms to eliminate ambiguity in hierarchical operations, as seen in expressions requiring layered enclosures to specify evaluation order.[15] Unlike commas, which separate clauses but struggle with deep nesting, or quotation marks, which enclose direct speech without easy embedding, brackets excel in their ability to nest multiple levels for hierarchical clarity.[16] This nesting capability allows for structured asides within asides, such as in "The policy covers (vehicles [including cars and trucks] but excluding (bicycles [except in urban areas]))" to organize conditional details without confusion. Various types of brackets—round, square, curly, and angle—support these roles across notations, enabling precise organization in diverse contexts.[4]History
Ancient and Medieval Origins
The concept of parenthesis as a rhetorical device for inserting explanatory asides originated in ancient Greek literature, where it was used to denote digressions or clarifications within speeches and texts, predating visual punctuation marks.[17] In Hellenistic scholarship around the 3rd century BCE, Aristophanes of Byzantium introduced the first systematic punctuation system using dots at varying heights to indicate pauses in continuous script, facilitating the reading of classical works; this system laid groundwork for marking insertions similar to later brackets.[18] By the 2nd century BCE, scholia—marginal annotations on Greek and Roman texts such as Homer's Iliad—employed symbols like the diple (a double oblique line, ›), often paired or repeated to delineate the start and end of comments, glosses, or quoted passages, serving a bracket-like function for supplementary material.[19] In Euclid's Elements (circa 300 BCE), the original Greek text lacked punctuation, relying on verbal connectors and layout for grouping axioms and propositions in scriptio continua; however, subsequent manuscripts from the Roman and early medieval periods incorporated interpuncts and marginal symbols to clarify logical structures, reflecting evolving scribal practices for mathematical notation.[20] During the medieval period, Byzantine manuscripts of liturgical texts, such as Gospel lectionaries from the 9th century onward, utilized elevated points, queries (ἐρωτηματικός), and curved marks resembling early parentheses to denote chants, rubrics, or glosses, enhancing rhythmic delivery in ecclesiastical readings.[21] These conventions drew partial influence from Semitic scripts: in Hebrew manuscripts since the 9th century, biblical quotations were marked by paired points (: :) above the text, while symbols like the inverted nun (a curved, bracket-like sign enclosing verses) indicated transpositions or special sections in Masoretic codices.[22] Similarly, medieval Arabic scripts employed paired dots or oblique lines for dividing verses and marking citations in Qur'anic and scholarly works, contributing to cross-cultural exchanges in manuscript traditions.[23]Development in Printing and Modern Typography
The invention of the movable-type printing press by Johannes Gutenberg around 1450 facilitated the widespread production of books and the gradual standardization of punctuation marks, including brackets. Round parentheses first appeared in printed legal and scholarly texts around 1500, often used to denote glosses, insertions, or parenthetical explanations, enhancing readability in complex documents such as canon law editions.[17] In the early 16th century, the scholar Desiderius Erasmus referred to these round brackets as lunulae (little moons) due to their shape and promoted their use in his editions of classical texts. Printers like Nicolas Jenson in Venice further popularized round parentheses by the late 15th century, integrating them into roman typefaces for broader use in printed works.[24] During the 16th to 18th centuries, typographers refined bracket designs to achieve greater clarity and visual balance within evolving type systems. Pierre Simon Fournier, a prominent French type designer, contributed to these advancements through his comprehensive type catalogs and punch-cutting techniques.[25] These efforts standardized bracket shapes, reducing variability seen in earlier hand-set types and ensuring consistency across European presses. By the 18th century, large curly braces (accolades) were commonly employed in scholarly encyclopedias, such as Diderot and d'Alembert's Encyclopédie (1751–1780), to structure hierarchical content like tree diagrams.[26] In the 19th and 20th centuries, national typographic styles introduced variations in bracket forms, reflecting linguistic and cultural preferences. In France, guillemets (« »)—angular variants of brackets—evolved into standard quotation marks by the late 19th century, replacing earlier rounded forms to prevent ink smearing in printing and improve legibility in dense prose. Other regions, such as Germany and Russia, developed distinct conventions, with angle brackets used for citations or omissions, while American and British styles favored straighter, more geometric square brackets in editorial contexts. These divergences were documented in typographic manuals and influenced the design of metal type families like Bodoni and Didot.[26] The advent of digital typography in the post-1980s era transformed bracket usage through vector-based fonts and encoding standards, enabling precise scaling and multi-script support. The release of Unicode 1.0 in 1991 incorporated essential bracket characters (such as U+0028 for left parenthesis and U+005B for left square bracket) into its Basic Latin block, promoting uniform rendering across computing platforms and eliminating discrepancies from proprietary code pages. This standardization supported the proliferation of brackets in digital documents, from word processors to web typography, while type designers like those behind the STIX font project extended variations for mathematical and multilingual needs.[27][26]Typography
Design Variations Across Scripts
Bracket designs exhibit significant aesthetic and structural variations across different linguistic scripts, influenced by the characteristics of the script and the typeface family. In Latin script typefaces, round brackets (parentheses) in serif fonts, such as those in Times New Roman, typically feature softly curved forms with symmetric contrast distribution and a subtle swelling toward the center, though they may appear disproportionately wide and light relative to surrounding letters.[26] In contrast, sans-serif typefaces like Helvetica present more geometric interpretations, with straighter, less organic curves that prioritize uniformity and minimalism, aligning with the overall clean lines of the font family.[28] Square brackets in Latin scripts often suffer from excessive darkness in modern fonts, requiring careful adjustment to integrate seamlessly with text flow.[26] Non-Latin scripts introduce further adaptations shaped by cultural and orthographic needs. In Cyrillic scripts, angle brackets (⟨ ⟩) serve specific functions like denoting omissions in quotations, with designs that echo the script's broader letterforms, often incorporating fuller, more robust curves to harmonize with the heavier strokes typical of Slavic typefaces.[26] East Asian scripts, particularly Japanese, employ distinctive forms such as lenticular brackets (【 】), which adopt a rounded, lens-shaped profile for enclosing titles or emphasis, contrasting with the simpler arcs of Latin parentheses; these are optimized for both horizontal and vertical writing modes, rotating seamlessly to maintain visual balance.[29] Corner brackets (「 」) in Japanese further emphasize angularity at the edges, providing a structured, book-like enclosure that reflects the script's emphasis on precise alignment in dense text layouts.[29] Proportional scaling ensures brackets align with the typeface's metrics, matching the weight and height of adjacent characters while adhering to kerning rules that account for optical illusions, such as tighter spacing around ascenders and descenders to prevent uneven visual rhythm.[26] In display typefaces, brackets may be rendered thinner and taller than in text variants, enhancing legibility at larger sizes without overwhelming the composition.[26] Historically, bracket designs have evolved from the irregular, hand-drawn lunulae and irregular curves in medieval manuscripts, where shapes varied by scribe and medium, to the standardized, low-contrast forms of Renaissance printing that appeared thinner than body text.[26] The transition to metal typesetting in the 18th century introduced composite constructions for complex braces, while 20th-century digital fonts shifted to precise vector-based outlines, enabling consistent curvature and scalability across resolutions, as seen in reconstructions like Garamond Premier Pro.[26] This progression reflects broader typographic advancements, from artisanal inconsistencies to algorithmic precision in contemporary design.[26]Spacing and Stylistic Conventions
In English typography, round brackets (parentheses) are placed without spaces immediately inside the opening or closing marks, as in (text), with a space preceding the opening mark when it follows a word and normal spacing after the closing mark depending on the sentence structure.[30] This convention ensures tight integration with the enclosed text, avoiding visual separation that could disrupt readability. Square brackets follow the same spacing rule in English, with no internal spaces, such as [example].[4] In French typography, parentheses and brackets also adhere to no-space-inside conventions, but require a non-breaking space before the opening mark and after the closing mark, exemplified by « ( texte ) » or « [ exemple ] », differing from the language's broader use of thin spaces before marks like colons, semicolons, exclamation points, and question marks.[31] These guidelines promote consistency across scripts, aligning with variations in bracket design such as curved forms in Latin alphabets. Brackets must always appear in matched pairs, with opening and closing symbols corresponding precisely to maintain structural clarity; nesting follows a hierarchical order, typically using round brackets for the outer pair and square brackets for inner content to distinguish levels, as in (outer [inner]).[10] This pairing prevents ambiguity in complex sentences and is a standard in formal writing. In academic writing, the contents of brackets adopt the formatting of the surrounding text, such as italics for emphasized phrases within italicized passages, while the brackets themselves remain in roman type unless set in italics to harmonize with enclosed italic material and avoid typographic clashes like overlapping descenders.[4] When adding emphasis to quoted material, square brackets indicate alterations, e.g., [emphasis added].[4] Regional differences in punctuation affect bracket usage indirectly; for instance, both American and British English employ round brackets for in-text citations like (Smith 2020), but American style places associated punctuation inside closing quotation marks more consistently, while British style often positions it outside, influencing citation placement within quoted text.[32]Round Brackets (Parentheses)
Uses in Language and Writing
Round brackets, also known as parentheses, are commonly employed in English writing to enclose asides, additional explanations, or clarifying details that are not essential to the main sentence structure. This usage allows writers to insert supplementary information without disrupting the primary flow of the text, such as providing context or elaboration. For instance, a sentence might read: "The conference (held annually in Chicago) attracts global experts."[3][33] Similarly, parentheses are used to include translations of foreign terms or phrases directly within the text, ensuring accessibility for readers unfamiliar with the original language, as in: "The term 'amigo' (friend) is widely used in Spanish-speaking cultures."[34] In academic, scientific, and formal writing, round brackets are standard for in-text citations in styles such as APA and MLA, providing author-date or numbered references without interrupting the narrative flow. For example, a sentence might include "(Smith, 2020)" to credit a source, allowing readers to consult the full reference list.[35] In enumerations and lists embedded within prose, round brackets facilitate clear numbering or lettering of items, particularly when the sequence is incidental to the narrative. This convention helps organize subpoints without resorting to full vertical lists, for example: "The report outlined key recommendations: (1) improve data collection; (2) enhance training programs; and (3) monitor outcomes regularly." Such formatting is standard in professional and academic writing to maintain readability.[36] In financial and accounting contexts, parentheses denote negative values or losses, a practice that originated from traditional ledger conventions to visually distinguish debits or deficits without using minus signs. For example, a balance sheet might show a net loss as ($5,000), signaling the amount as subtracted from the total. This method is widely adopted in financial statements to convey clarity and consistency, especially in electronic formats where red ink is no longer feasible.[37][38][39] Within quoted material, round brackets may appear as part of the original author's text to insert asides or parenthetical remarks, reflecting the writer's intent in literature or dialogue. However, to distinguish editorial additions by subsequent editors or transcribers from the author's original punctuation, square brackets are preferred for insertions into quotes, ensuring transparency in scholarly or journalistic reproductions. For example, an author's original quote might include "(as I recall)" in round brackets, while an editor's clarification would use [sic] in square brackets. This differentiation upholds the integrity of the source material in editorial practices.[40][41][42]Uses in Mathematics and Logic
In mathematics, round brackets, also known as parentheses, are primarily used to group terms within expressions to enforce a specific order of operations, overriding the standard precedence rules such as PEMDAS (Parentheses, Exponents, Multiplication and Division, Addition and Subtraction).[43] This grouping ensures that operations within the brackets are performed first, clarifying ambiguity in otherwise linear notations. For instance, the expression evaluates to , whereas yields , demonstrating how parentheses dictate the result and prevent misinterpretation in algebraic manipulations.[44] Parentheses also denote open intervals on the real number line, representing sets of numbers strictly between two endpoints without including them. The notation signifies all real numbers such that , contrasting with closed intervals that include the endpoints. This convention is standard in calculus and analysis for describing domains, ranges, and continuity properties, as seen in the open interval , which excludes 0 and 1.[45] In formal logic, particularly propositional logic, parentheses group atomic propositions and connectives to specify the scope and order of operations, avoiding ambiguity in compound statements. For example, indicates that the conjunction of and implies , whereas has a different truth table due to altered grouping. This nesting is essential for parsing complex formulas, following precedence rules where negation precedes conjunction and disjunction, but parentheses override such hierarchies for precision.[46] Round brackets must be distinguished from other mathematical delimiters, such as vertical bars used for absolute value, which denote a function computing distance from zero rather than mere grouping. Unlike parentheses, absolute value bars do not always behave as grouping symbols in order of operations and can alter the expression's evaluation, requiring careful differentiation in contexts like inequalities or norms.[47]Uses in Programming and Computing
In programming languages, round brackets, or parentheses, serve as essential syntactic delimiters for structuring code, a convention largely standardized by the ALGOL 60 report published in 1960.[48] This influential language defined parentheses to enclose actual parameters in function designators and to group expressions for precedence, influencing subsequent languages like C, Pascal, and Python.[48] For instance, in ALGOL 60, a function call such assin(a - b) uses parentheses to delimit the argument, ensuring unambiguous evaluation.[48]
A primary use of parentheses is in function calls and argument passing, where they enclose the list of arguments supplied to a procedure or function. In Python, for example, invoking the built-in print function requires parentheses around its arguments, as in print("hello"), which executes the function and outputs the string.[49] Similarly, in C, function prototypes and calls mandate parentheses to separate parameters, such as int add(int a, int b), promoting clear separation of function headers from bodies. This syntax traces back to ALGOL 60's parameter lists, like (actual parameter list), which separated arguments with commas for modularity in procedure calls.[48]
Parentheses also define conditions in control flow structures, particularly in conditional statements. In C-like languages, the if statement requires parentheses around the Boolean expression, as in if (x > 0) { ... }, to evaluate the condition before executing the associated block.[50] ALGOL 60 established this pattern with syntax like if ([Boolean expression](/page/Boolean_expression)) then statement, ensuring the condition is isolated for parsing.[48] While Python allows optional parentheses in if statements for readability, such as if x > 0:, the convention persists from ALGOL's influence to maintain consistency with expression grouping.
In languages like Lisp and Python, parentheses denote tuple-like structures for grouping ordered collections of values. Lisp's S-expressions use parentheses to represent lists or pairs, such as (A B) for an ordered pair, forming the basis of its homoiconic syntax where code and data share the same structure.[51] Python extends this for immutable tuples, defining them with parentheses like t = (1, 2, 3), which support unpacking and use in functions without altering the grouped elements.[52] This parallels their role in mathematics for grouping but adapts it to computational syntax for data encapsulation.
Square Brackets
Uses in Editing and Proofreading
Square brackets play a crucial role in editing and proofreading by indicating editorial interventions in quoted or reproduced text, distinguishing them from the original author's words. They are primarily used to insert clarifications, corrections, or annotations that were not present in the source material, ensuring transparency about any alterations. For instance, when quoting text with an obvious error, editors may insert [sic]—Latin for "thus"—immediately after the mistake to signal that the inaccuracy appears exactly as in the original, preventing readers from assuming it is an editorial oversight. This practice, rooted in scholarly and journalistic editing conventions, maintains the integrity of the source while providing necessary context.[53][54] In proofreading, square brackets denote proposed changes or additions to the manuscript, such as replacing a word with a suggested alternative enclosed in brackets, like [revised term], to highlight modifications without altering the original layout during review. They also facilitate the addition of explanatory notes, such as [see footnote 5] or translations like [French: explication], which guide readers or future editors without disrupting the flow of the primary text. According to the Chicago Manual of Style, square brackets are employed for substitutions within quotations, such as changing a verb tense (e.g., "approached" to [approach]) or silently correcting minor typos in brackets like (cost), offering a less intrusive alternative to [sic] for obvious errors. The Oxford University Style Guide similarly recommends square brackets for enclosing editorial comments, corrections, or references added by a subsequent editor, emphasizing their role in scholarly reproductions.[55][42][56] Unlike round brackets (parentheses), which typically enclose the author's own asides or supplementary information, square brackets explicitly mark non-original content introduced by an editor or proofreader, preserving the distinction between primary and secondary material in edited works. This convention is standard in major style guides, including the Australian Government Style Manual, which advises using square brackets for insertions in quoted material, such as paraphrased elements or added words, to indicate editorial responsibility. By employing square brackets judiciously, editors avoid misleading readers about the authenticity of the text while enhancing clarity and accuracy in publications.[10]Uses in Law and Documentation
In legal documents and legislation, square brackets are commonly employed to denote amendments, particularly for indicating deletions or repeals from existing text. For instance, in the drafting of bills, matter proposed for deletion is often enclosed in square brackets, such as [stricken language], to clearly mark changes without altering the original wording's visibility during review processes.[57] Similarly, notations like [Repealed] may appear within square brackets to signal the prospective removal of a provision, as seen in revised statutes where editorial amendments highlight such updates.[58] Inserted text in amendments is sometimes shown in square brackets to distinguish additions, akin to practices in general editing but adapted for statutory precision.[59] Square brackets also facilitate citations and references in legal writing, including case law and statutes. In case citations, they enclose the year when the law report series is organized chronologically rather than by volume, ensuring accurate identification of the source, as in R v Smith EWCA Crim 123.[60] For footnotes in judicial opinions and legal analyses, bracketed numbers like [61] or [62] may denote references to supporting authorities, providing a compact inline method distinct from superscript numbering in some styles.[63] In statutory references, such as those in the United States Code, square brackets can highlight cross-references or editorial notes, for example, 18 U.S.C. [§ 1001] in contexts emphasizing specific sections amid amendments.[64] In international treaties and diplomatic documents, square brackets have been used since the early 20th century to indicate optional or unresolved clauses during negotiation drafts. In United Nations documents, text within square brackets signifies provisions not yet agreed upon, allowing states to debate alternatives before final adoption, as in early drafts of human rights conventions where disputed language remained bracketed until consensus.[65] This practice, evident in works like the International Law Commission's Guide to Practice on Reservations to Treaties, ensures transparency in multilateral treaty formation by isolating tentative elements.[66]Uses in Mathematics, Chemistry, and Programming
In mathematics, square brackets are commonly employed to denote vectors and matrices in linear algebra and related fields. For instance, a column vector can be represented as , where the transpose symbol indicates the vertical orientation, and matrices are often enclosed in double square brackets, such as or compactly as . This notation facilitates clear representation of multi-dimensional arrays and transformations in computational and theoretical contexts.[67][68] Another significant application in mathematics is the Iverson bracket, which evaluates a logical proposition to 1 if is true and 0 otherwise, denoted . Introduced by Kenneth E. Iverson, this convention simplifies summations and indicator functions in combinatorial and probabilistic expressions, such as , which counts even integers up to . It promotes concise formulations in discrete mathematics and algorithm analysis.[69][70] In chemistry, square brackets denote the molar concentration of species, particularly ions, as in for the chloride ion concentration in solution. This standard convention is used in equilibrium expressions, rate laws, and solubility products, where represents moles of A per liter, enabling precise quantification of reaction dynamics and solution properties.[71][72] In programming, square brackets define array-like structures and enable indexing in many languages. For example, in Python, lists are created with square brackets, such asmy_list = [1, 2, 3], and elements are accessed via zero-based indexing like my_list[0], which retrieves the first item. This syntax supports data manipulation in scripts, supporting efficient handling of sequences in algorithms and data processing.[73]
Curly Brackets (Braces)
Uses in Music Notation
In music notation, curly brackets, commonly referred to as braces, serve to visually group multiple staves that represent parts performed by a single musician or instrument, such as the right-hand and left-hand staves for piano, harp, or organ. This grouping indicates that the music on those connected staves is to be played simultaneously, facilitating clear reading of polyphonic textures in keyboard or multi-voice works. For instance, in piano scores, the brace links the treble clef staff above with the bass clef staff below to form the grand staff, encompassing a wide pitch range suitable for the instrument's capabilities.[74][75] The brace is distinct from other notation elements like barlines, which are straight vertical lines marking measure divisions within individual staves, or straight brackets, which group staves for separate performers in ensemble scores such as orchestras. In organ notation, braces specifically connect staves for the manuals (hands) and pedals, emphasizing the instrument's independent lines while differentiating from simpler brackets used for sectional groupings like woodwinds. This convention ensures that performers quickly identify which staves belong to one part, avoiding confusion in complex scores.[76][77] Historically, the brace emerged in the 17th century alongside the development of figured bass practices in Baroque keyboard music, where it helped organize the continuo part's multiple lines for harpsichord or organ accompaniment. By the 18th century, composers like Johann Sebastian Bach standardized its use in works such as his Well-Tempered Clavier and organ compositions, employing braces to unite staves for hands and pedals in a cohesive visual system that supported intricate counterpoint and improvisation over the bass line.[78][79] In modern music software, tools like Finale and Sibelius automatically generate curly braces when users group staves for single-instrument parts, such as piano duets or vocal ensembles with accompaniment, and allow extension to multi-instrument sections like a conductor's piano reduction of orchestral parts. These programs enable customization of brace shape and extent, maintaining the symbol's traditional role while adapting to digital engraving needs.[74][80]Uses in Mathematics and Set Theory
In mathematics, curly brackets (braces) are primarily used in set theory to denote unordered collections of distinct elements, known as sets. This notation allows for the concise representation of mathematical objects without implying order or repetition among members. For instance, the set consisting of the first three positive integers is written as {1, 2, 3}, indicating an unordered collection where each element is unique. The use of curly brackets for this purpose was introduced by Georg Cantor in his foundational 1895 paper "Beiträge zur Begründung der transfiniten Mengenlehre," which established the rigorous framework for transfinite set theory and influenced modern mathematics profoundly.[81] Cantor's innovation enabled the formal treatment of infinite sets, such as the set of all real numbers between 0 and 1, denoted {x \mid 0 \leq x < 1, x \in \mathbb{R}}, though the basic roster form like {1, 2, 3} remains fundamental for finite sets.[82] Beyond sets, curly brackets serve to define piecewise functions, where a large left-pointing brace groups multiple expressions valid over distinct domains, providing a compact way to specify functions with conditional behavior. This is particularly useful in analysis and applied mathematics for describing functions like the absolute value or step functions. A representative example is the piecewise definition of the absolute value function: This notation emphasizes the partitioning of the domain and is widely adopted in textbooks and research for its clarity in expressing discontinuous or conditional mappings.[83] In number theory, curly brackets denote the fractional part of a real number , defined as , where is the greatest integer less than or equal to . This yields a value in the interval , capturing the non-integer remainder essential for studying uniform distribution, Diophantine approximation, and modular arithmetic. For example, if , then . The notation appears prominently in classic works on analytic number theory, facilitating proofs involving periodic functions and discrepancies in sequences.[84]Uses in Programming Languages
In programming languages, curly braces (also known as braces) serve primarily to delimit code blocks, which encapsulate groups of statements executed within control structures such as functions, loops, and conditional statements, thereby defining scope and structure. This syntax enables structured programming by clearly separating logical units of code, allowing for nested blocks and local variable declarations that are visible only within their enclosing braces.[85] The C programming language, developed in the early 1970s, employs curly braces to form compound statements or blocks, as in{ statements; }, which are essential for the bodies of functions, if-else constructs, and loops like for or while. For instance, in a function definition, the opening brace { initiates the block containing executable statements, while the closing brace } terminates it, with variables declared inside limited to that scope. This convention was inherited by many descendant languages, including C++ and Go. Java, introduced in 1995, follows a similar pattern, using braces to enclose the contents of classes, methods, and control structures, with style guidelines recommending braces even for single statements to enhance clarity and prevent errors from omitted delimiters.[85][86]
The adoption of curly braces for block delimitation traces back to BCPL (Basic Combined Programming Language), designed by Martin Richards in 1966 and first implemented in 1967, which pioneered this approach to replace keyword-based delimiters like begin/end in earlier languages such as ALGOL, promoting more concise structured programming. Due to hardware constraints on early terminals, BCPL often represented braces as ), but the conceptual use of paired delimiters for sections influenced subsequent languages like B and C. Beyond code blocks, curly braces denote objects in data serialization formats like JSON (JavaScript Object Notation), where they enclose unordered collections of name-value pairs, such as { "key": "value" }, facilitating structured data exchange in web applications and APIs.[87]
Not all languages rely on braces; Python, for example, defines blocks through consistent indentation levels using spaces (typically four per level), eschewing explicit delimiters to enforce readable, whitespace-sensitive code structure and reduce visual clutter from symbols. This indentation-based approach, while differing from brace usage, achieves similar scoping effects and has been praised for improving code maintainability in collaborative environments.[88]
Angle Brackets (Chevrons)
Physical and Geometric Description
Angle brackets, also known as chevrons and denoted as ⟨ ⟩, are punctuation marks consisting of two symmetrical, arrow-like symbols that point toward each other, forming a pair that encloses content. These symbols derive from the ancient Greek diple (⟩), an arrow-shaped marginal mark invented in the second century B.C. by Aristarchus of Samothrace, the librarian at the Library of Alexandria, to highlight repeated lines in Homeric poetry or draw attention to notable textual elements.[89] Over time, the diple and similar marks influenced variants like guillemets in typography, while modern single angle brackets ⟨ ⟩, retaining a linear, V-shaped form, are primarily used paired in mathematical and linguistic notation. In Unicode, mathematical angle brackets are encoded as U+27E8 (⟨) and U+27E9 (⟩), distinct from the inequality symbols < and >.[90] Geometrically, angle brackets exhibit bilateral symmetry, with each half comprising two straight lines meeting at an acute vertex, creating a chevron profile that converges inward. In typographic fonts, this design promotes readability by mimicking directional cues, such as arrows, while maintaining compactness within text lines; the precise angle can vary slightly across typefaces to harmonize with overall stroke weights and serifs, but the core V-form remains consistent for optical clarity.[91] [92] The term "chevron" originates from the late 14th-century Old French word chevron, meaning "rafter," derived from Vulgar Latin *capriōn-, related to Latin caper (goat), evoking the inverted V-shape of roof beams or rafters in architecture.[93] In the 17th century, this name extended to French military insignia, where chevrons denoted rank through V-shaped sleeve stripes, influencing their adoption into broader symbolic usage.[91] By the 16th century, these forms were adapted into European typography, particularly in French printing, where they transitioned from marginal annotations to structured punctuation, marking a shift from handwritten marginalia to printed enclosure symbols.[92] A key variant of angle brackets is the double form, known as guillemets (« »), which consists of two closely spaced chevrons side by side, creating a bolder, paired arrow effect. The name guillemet is a diminutive of the French name Guillaume, after the 16th-century printer Guillaume Le Bé (1525–1598), though he did not invent them. One of the earliest known uses dates to 1527 in a book printed by Josse Badius, as an innovation to denote quotations by doubling the single chevron for emphasis and nesting capability in nested text structures.[94] Unlike single angle brackets, which maintain a slender, mathematical profile, guillemets feature a wider span and are oriented outward (« ») in French and inward (› ‹) in other languages like German, adapting the geometric essence to regional typographic conventions while preserving the directional symmetry.[92][95]Uses in Mathematics and Physics
In mathematics, angle brackets denote the inner product of two vectors and in an inner product space, expressed as , which generalizes the dot product for Euclidean spaces and yields a scalar measuring their correlation or projection.[96] This notation emphasizes the bilinear, symmetric form that induces a geometry on the space, including orthogonality when .[96] In physics, angle brackets play a pivotal role in quantum mechanics through Dirac notation, where a bra vector is represented as and a ket as , with the inner product capturing the overlap between states. This formalism, introduced by Paul Dirac in 1939, abstracts quantum states from specific representations like wave functions, facilitating calculations in Hilbert spaces. The expectation value of an observable corresponding to operator in state is given by , representing the average measurement outcome over many trials.[97] This traces to the inner product's role in probability amplitudes, where normalization requires .[97] Angle brackets thus denote the inner product itself, distinct from the norm , which uses double vertical bars to signify the induced length without the bilinear structure.Uses in Linguistics and Computing
In linguistics, angle brackets ⟨ ⟩ are conventionally used to enclose orthographic representations of words or letters, distinguishing them from phonetic or phonemic transcriptions that employ slashes / / or square brackets [ ].[98] This notation highlights the written form as it appears in standard spelling, such as ⟨cat⟩ to denote the graphemes rather than their pronunciation.[99] For instance, in phonological analysis, ⟨knight⟩ might contrast with /naɪt/ to separate spelling from sound.[100] Historically, a variant known as guillemets « »—double-pointing angle brackets—has been employed in French typography to enclose titles of books and other works, such as «Le Petit Prince».[101] This practice, originating from earlier printing conventions, provides a visual cue for emphasis in formal writing without relying on italics.[102] In computing, angle brackets delimit tags in markup languages like HTML and XML, a convention adopted in the 1990s from the earlier Standard Generalized Markup Language (SGML).[103] For example, introduces a paragraph element, enabling structured document representation.[104] Similarly, in Java, angle brackets denote generic type parameters since the language's 5th edition in 2004, as in ListSpecialized Brackets
Floor, Ceiling, and Related Mathematical Brackets
In mathematics, the floor function, denoted by ⌊x⌋, maps a real number x to the greatest integer less than or equal to x. For example, ⌊3.7⌋ = 3 and ⌊−2.3⌋ = −3.[109] This function is also known as the greatest integer function and provides the integer part of x in a downward rounding manner.[109] The ceiling function, denoted by ⌈x⌉, maps a real number x to the smallest integer greater than or equal to x. For instance, ⌈3.7⌉ = 4 and ⌈−2.3⌉ = −2.[110] These notations for floor and ceiling were introduced by Kenneth E. Iverson in his 1962 book A Programming Language to distinguish them clearly from earlier notations like for the floor function, which originated with Carl Friedrich Gauss.[111] Floor and ceiling functions are fundamental in algorithms, particularly for integer division and modular arithmetic. The modulo operation for real numbers x and positive integer n can be expressed as x mod n = x − n ⌊x/n⌋, ensuring the result lies in [0, n).[112] This application is widely used in computing to handle remainders efficiently without fractional parts.[112]Rare and Historical Variants
Double square brackets, denoted as ⟦ and ⟧, are a rare variant used in the International Phonetic Alphabet (IPA) for extra-precise narrow phonetic transcriptions, indicating detailed realizations of sounds beyond standard phonetic notation. This distinguishes highly specific articulatory details from single square brackets for general phonetic transcriptions or slashes for phonemic representations.[98] Lenticular brackets, 【 and 】, known as sumitsukikakko or "ink-filled brackets" in Japanese, emerged in 19th-century printing practices during the Meiji era, when Western punctuation influences were adopted to modernize Japanese typography. They are used for emphasis, enclosing titles, headings, or key terms in advertisements, dictionaries, and promotional materials, providing a visually distinctive enclosure that fills the corners for aesthetic and structural highlighting in vertical text layouts. Their adoption coincided with the broader introduction of punctuation to Japanese writing, previously minimal, to facilitate readability in translated European texts and native publications.[113][114] Quine corners, ⌜ and ⌝, were introduced by philosopher and logician Willard Van Orman Quine in his 1940 book Mathematical Logic to denote quasi-quotation in metalogic. These symbols allow for the quoting of formulas while permitting embedded variables or expressions to be treated as part of the quoted material, avoiding the limitations of standard quotation marks in logical contexts. For example, ⌜φ(x)⌝ represents a formula with a free variable x, useful in discussions of syntax and semantics where direct substitution is required without full re-quotation. Quine continued employing them in later works, such as The Roots of Reference (1974), solidifying their role in formal philosophy and logic.[115][116] Brackets with quills, ⁅ and ⁆, are an obsolete form from 18th-century English printing, utilized for indexing and marginal references in books and manuscripts. Resembling square brackets adorned with a quill-like flourish, they served to mark entries or cross-references in indexes, aiding navigation in scholarly texts before standardized punctuation evolved. Now largely superseded, they persist in Unicode as historical artifacts of typographic tradition.[115]Unicode and Digital Representation
Code Points and Encoding
In Unicode, brackets are assigned specific code points to enable consistent digital representation across text processing systems. The standard defines these characters primarily within the Basic Latin block for common punctuation brackets and in other blocks for mathematical and technical variants. Many foundational bracket characters were introduced in Unicode 1.1, released in June 1993, which expanded the repertoire to include 34,168 characters and aligned with early ISO/IEC 10646 developments.[117][118] The most frequently used brackets—round (parentheses), square, and curly (braces)—are encoded in the Basic Latin block (U+0000–U+007F). These provide essential delimiting functions in programming, mathematics, and general text. Specialized mathematical brackets, such as floor and ceiling, appear in the Miscellaneous Technical block (U+2300–U+23FF), while angle brackets for advanced notation reside in the Miscellaneous Mathematical Symbols-A block (U+27C0–U+27EF). The following table summarizes key bracket code points:| Bracket Type | Left Character | Code Point | Right Character | Code Point |
|---|---|---|---|---|
| Round (Parentheses) | ( | U+0028 | ) | U+0029 |
| Square | [ | U+005B | ] | U+005D |
| Curly (Braces) | { | U+007B | } | U+007D |
| Angle (Mathematical) | ⟨ | U+27E8 | ⟩ | U+27E9 |
| Floor | ⌊ | U+230A | ⌋ | U+230B |
| Ceiling | ⌈ | U+2308 | ⌉ | U+2309 |
Rendering Challenges and Compatibility
One significant rendering challenge for brackets arises from font fallback mechanisms, where a font lacks the necessary glyph for a specific Unicode character, resulting in the display of a placeholder known as "tofu" (typically a square box □ or similar symbol). This issue is particularly prevalent in older systems or environments with limited font coverage, as applications may substitute a fallback glyph indicating the missing character, such as one displaying the code point value.[125] In East Asian contexts, compatibility issues emerge between full-width and half-width bracket variants, such as the full-width forms ( ) (U+FF08–U+FF09) and half-width forms 「 」 (U+FF62–U+FF63), which are compatibility characters designed for legacy encodings but can lead to inconsistent rendering across modern systems. These forms decompose to their narrow or wide equivalents, yet rendering engines may treat ambiguous-width characters differently—often as narrow in contemporary displays—contrasting with legacy East Asian systems that render them as wide, potentially causing layout shifts in mixed-script text.[126] Prior to Unicode, the ASCII standard of 1963 supported only basic bracket characters like square brackets [ ] (codes 5B–5D) and curly braces { } (codes 7B–7D), limiting representation to these half-width forms and excluding variants such as angle brackets or full-width equivalents essential for diverse typographic needs.[127] This restriction stemmed from ASCII's 7-bit design, which allocated just 128 positions primarily for English text and basic punctuation, hindering multilingual or specialized bracket usage until Unicode's introduction.[128] Modern solutions mitigate these challenges through CSS font fallbacks, where the font-family property specifies a sequence of fonts to ensure glyph availability, and variable fonts introduced in the OpenType 1.8 specification in 2016, which consolidate multiple glyph variations—including bracket widths—into single files for scalable, efficient rendering across devices.[129] These advancements, supported by browser implementations, reduce tofu occurrences and improve compatibility for Unicode bracket code points by allowing dynamic adjustments without multiple static font files.[130]References
- https://en.wikibooks.org/wiki/Unicode/Versions
- There are four types of brackets: parentheses ( ), square brackets [ ], braces { }, and angle brackets < >.
- Mar 29, 2022 · There are 4 types of brackets—parentheses and square, angle, and curly brackets. Learn how to use them in a sentence with these examples and ...
