Brackets
Standard brackets: () and []
() and [] can both be used to delimit a subexpression. Used for this purpose, they are exactly equivalent, but they must be properly matched.
3 + [2 − (3 + 3 + 8)]/2
−3
In addition, () are used for function application:
sin(π)
0
(n ↦ n^2 + 1)(5)
26
Further, [] are also used to access subscripted values:
❨5, 1, 2, 3❩[3]
2
"Test"[1]
T
IdentityMatrix(5)[2, 2]
1
Finally, [] can be used to denote a closed interval:
[0, 2⋅π]
See [] for more details.
Ceiling and floor: ⌈⌉ and ⌊⌋
⌈⌉ and ⌊⌋ are used to compute ceiling and floor of numbers.
'(⌈π⌉, ⌊π⌋)
4 3
Curly brackets: {}
{} are used to create sets:
{1, 2, 3} ∩ {2, 3, 4}
{2, 3}
Vector brackets: ❨❩
❨❩ are used to create vectors and matrices:
❨5, 3, 0❩
⎛5⎞ e⎜3⎟ ⎝0⎠
❨❨3, 1, 2❩, ❨6, 4, 2❩❩
⎛3 1 2⎞ ⎝6 4 2⎠