Question #138EasyGeneral

4 types of brackets in math?

Answer

Overview

In mathematics, there are 4 types of brackets, each with specific priority in expressions.


The 4 Types of Brackets

TypeSymbolName
1st
text
( )
Round brackets / Parentheses
2nd
text
{ }
Curly brackets / Braces
3rd
text
[ ]
Square brackets / Box brackets
4th
text
――
or `

Order in Complex Expressions

In traditional mathematics, when all types appear together:

text
Solve innermost first (round), then curly, then square:

Example:
5 × [4 + {3 × (2 + 1)}]
= 5 × [4 + {3 × 3}]        ← Solve ( ) first
= 5 × [4 + 9]               ← Solve { }
= 5 × 13                    ← Solve [ ]
= 65

In Programming (Dart)

In programming, all bracket expressions use

text
( )
for grouping — curly and square brackets serve structural purposes:

dart
// ( ) — Math grouping and function calls
double result = (2 + 3) * 4;   // Grouping
print('hello');                  // Function call

// { } — Code blocks and maps
if (x > 0) {                    // Code block
  print('positive');
}
final map = {'key': 'value'};   // Map literal

// [ ] — List indexing and list literals
final list = [1, 2, 3];         // List literal
print(list[0]);                  // Index access

// String interpolation — uses ${}
String name = 'Alice';
print('Hello ${name.toUpperCase()}');  // Expression in string

Summary

BracketMath UseDart Use
text
( )
1st priorityGrouping, function calls
text
{ }
2nd priorityCode blocks, maps, string interpolation
text
[ ]
3rd priorityLists, indexing
text
——
Over expressionNot used in programming

Programming Note: In most programming languages including Dart, only

text
( )
controls mathematical operation precedence.
text
{ }
and
text
[ ]
serve structural roles (blocks, maps, lists) rather than mathematical grouping.