binary - Maple Help

Binary Operators

Description

 • The binary (infix) operators in Maple are:

 + addition - subtraction * multiplication / division ^ exponentiation mod modulo < less than <= less than or equal > greater than >= greater than or equal = equal <> not equal \$ sequence operator -> arrow operator @ composition @@ repeated composition || concatenation operator . non-commutative multiplication .. ellipsis , expression separator := assignment :: type operator :- module member selector assuming compute value of expression under assumptions and logical and or logical or xor exclusive or implies implication union set union subset subset intersect set intersection minus set difference in set or list membership & neutral operator

 • Most binary operators can be made to apply elementwise by appending a tilde (~).  See operators[elementwise] for details.

Examples

 > $a+b;$$2+3$
 ${a}{+}{b}$
 ${5}$ (1)
 > $a-b;$$2-3$
 ${a}{-}{b}$
 ${-1}$ (2)
 > $ab;$$2\cdot 3$
 ${a}{}{b}$
 ${6}$ (3)
 > $\frac{a}{b};$$\frac{2}{3}$
 $\frac{{a}}{{b}}$
 $\frac{{2}}{{3}}$ (4)
 > ${a}^{b};$${2}^{3}$
 ${{a}}^{{b}}$
 ${8}$ (5)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b$
 ${\mathrm{modp}}{}\left({a}{,}{b}\right)$ (6)
 > $a
 ${a}{<}{b}$ (7)
 > $a\le b$
 ${a}{\le }{b}$ (8)
 > $b
 ${b}{<}{a}$ (9)
 > $b\le a$
 ${b}{\le }{a}$ (10)
 > $a=b$
 ${a}{=}{b}$ (11)
 > $a\ne b$
 ${a}{\ne }{b}$ (12)
 > $a↦b$
 ${a}{↦}{b}$ (13)
 > $\mathrm{}\left(a,3\right)$
 ${a}{,}{a}{,}{a}$ (14)
 > $a@b$
 ${a}{@}{b}$ (15)
 > ${a}^{\left(n\right)};$${f}^{\left(2\right)}$
 ${{a}}^{\left({n}\right)}$
 ${{f}}^{\left({2}\right)}$ (16)
 > $a‖b;$$"foo"‖"bar"$
 ${\mathrm{ab}}$
 ${"foobar"}$ (17)
 > $a·b$
 ${a}{·}{b}$ (18)
 > $a..b$
 ${a}{..}{b}$ (19)
 > $a::b$
 ${a}{::}{b}$ (20)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\mathrm{true}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{false}$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$
 ${\mathrm{false}}$ (21)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\mathrm{true}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{false}$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$
 ${\mathrm{true}}$ (22)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{xor}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\mathrm{true}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{xor}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{false}$
 ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{xor}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$
 ${\mathrm{true}}$ (23)
 > $a⇒b;$$\mathrm{true}⇒\mathrm{false}$
 ${a}{⇒}{b}$
 ${\mathrm{false}}$ (24)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{subset}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\left\{2,3\right\}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{subset}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{1,2,3\right\}$
 ${a}{\subseteq }{b}$
 ${\mathrm{true}}$ (25)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{union}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\left\{1,2\right\}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{union}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{2,3\right\}$
 ${a}{\cup }{b}$
 $\left\{{1}{,}{2}{,}{3}\right\}$ (26)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{intersect}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\left\{1,2\right\}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{intersect}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{2,3\right\}$
 ${a}{\cap }{b}$
 $\left\{{2}\right\}$ (27)
 > $a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{minus}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b;$$\left\{1,2\right\}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{minus}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{2,3\right\}$
 ${a}{\setminus }{b}$
 $\left\{{1}\right\}$ (28)
 > $\mathrm{&x}≔\left(x,y\right)↦2\cdot x+3\cdot y;$$a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&x\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b$
 ${\mathrm{&x}}{≔}\left({x}{,}{y}\right){↦}{2}{\cdot }{x}{+}{3}{\cdot }{y}$
 ${2}{}{a}{+}{3}{}{b}$ (29)
 > $a,b$
 ${a}{,}{b}$ (30)
 > $a≔b;$$a$
 ${a}{≔}{b}$
 ${b}$ (31)