# Can symbols like + or * be used to denote the Plus and Times functions?

Can one do something similar to +[1, 2]? The point is that with one symbol you would be able to write expressions like #/+@@# &@{1, 2, 3} and yet benefit from Mathematica's algebraic capabilities, so that expressions like 1+1*2 would output 3 not 4.

• Why would you ever want to do that? I mean, +[1,2] is not even shorter than writing 1+2. Commented Nov 15, 2015 at 22:27
• Plus[1,2] would be more functional style. Commented Nov 15, 2015 at 22:29
• It's more terse functional style. Commented Nov 15, 2015 at 22:30
• Now, if you can get rid of the brackets and go full Polish... Commented Nov 16, 2015 at 3:06
• 1+1*2 already outputs 3.
– shrx
Commented Nov 16, 2015 at 10:04

You can use the Notation package. It requires a GUI palette though.

Needs["Notation"]


Once you have this package loaded, you can use the template to define:

Notation[+[x___] ==> Plus[x___]]


and then

+[1,2,3]
(* 6 *)


Similarly,

Notation[*[x___] ==> Times[x___]]


and so

*[2,3,4]
(* 24 *)


Note: A * typed as the first character of a cell converts it to an "Item Cell."

• Quite useful edit. I also propose to write x___ to handle zero number of arguments (sometimes it is useful). Commented Nov 15, 2015 at 22:49
• @EricBrown Since Mathematica 10, typing * as the first character on the line converts it to an item cell. It's similar to how typing = as the first character is also special. Commented Nov 16, 2015 at 11:09
• @Szabolcs That's what it is! Thanks. I was confused because I had Notation working for * then not. Commented Nov 16, 2015 at 12:52

For Plus, there's this, from How would I add together any list of arguments as a pure function?:

+Sequence[1, 2, 3]
(*  6  *)


You can use any character without built-in meaning like ＋ or ＊ (they differ from standard + and *). However, it is difficult to type them. So I propose to use meaningful Greek letters Σ and Π with shortcuts EscSEsc and EscPEsc respectively

Σ = Plus;
Π = Times;
Σ[1, 2]
Π[1, 2]
(* 3 *)
(* 2 *)


You can use this notation in other syntax constructions

Π @@ {1, 2, 3, 4}
(* 24 *)

• You know, Plus is just one more keystroke and escape is far from home row. I'm rather with Sjoerd on this. Commented Nov 15, 2015 at 23:06
• Or how about p=Plus; t=Times; Fewer strokes, easier to remember. Commented Nov 16, 2015 at 2:45
• @bills It was my first thought, but I decided that it is not very intuitive. Commented Nov 16, 2015 at 3:12
• It would be most useful if what ever symbol is used to denote summation would be used for both infix notation, like 1+1, and for function Head, like +[1,1]. Could one use one of these symbols in place of the current + symbol everywhere?
– user
Commented Nov 16, 2015 at 9:33
• Sure you can write 1~Plus~1~Times~2`, but the evaluation order isn't right: the output of the previous expression is 4 not 3.
– user
Commented Nov 16, 2015 at 9:45