# Levels of mathematical operators

**URL:** <https://boards.straightdope.com/t/levels-of-mathematical-operators/112532>\
**Category:** Factual Questions\
**Created:** [June 5, 2002, 9:06pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532 "2002-06-05T21:06:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enola\_Straight](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Enola\_Straight](https://boards.straightdope.com/u/Enola_Straight)\
**Post date:** [June 5, 2002, 9:06pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/1 "2002-06-05T21:06:35Z")

</div>

Suppose addition is level one. (5+2)  
Multiplication is level two. (5\*2)  
Exponents are level three. (5^2)

Are there higher levels? In-between levels?

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [June 5, 2002, 9:12pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/2 "2002-06-05T21:12:05Z")

</div>

I don’t think there are a clearly-defined complete set of mathematical operators, but if you include programming operators, I would put increment (++) at level zero.

---

<div class="post-metadata">

**Author:** ![bup](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bup](https://boards.straightdope.com/u/bup)\
**Post date:** [June 5, 2002, 9:21pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/3 "2002-06-05T21:21:46Z")

</div>

Parens are level 4, in your scheme.

---

<div class="post-metadata">

**Author:** ![Qwertyasdfg](https://avatars.discourse-cdn.com/v4/letter/q/ecc23a/32.png) [@Qwertyasdfg](https://boards.straightdope.com/u/Qwertyasdfg)\
**Post date:** [June 5, 2002, 9:34pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/4 "2002-06-05T21:34:56Z")

</div>

Well, theres things like factorials, (ex: 5! = 5_4_3_2_1) which would be somewhere between exponents and multiplication. But then, all that exponents are is the multiplcation of a number by itself X number of times. Then theres calculus, with derivatives and intergrals etc. Everything I know of so far is based on addition though. Theres also logrithims, which I dont know where they’d fall.

---

<div class="post-metadata">

**Author:** ![Jabba](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@Jabba](https://boards.straightdope.com/u/Jabba)\
**Post date:** [June 5, 2002, 9:37pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/5 "2002-06-05T21:37:55Z")

</div>

Without further information I don’t think we can answer your questions. On what basis did you allocate those particular levels to those operations? For example, what level would you give to the factorial function?

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [June 5, 2002, 9:46pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/6 "2002-06-05T21:46:46Z")

</div>

I answered your first question about four hours before you asked it, [over here](http://boards.straightdope.com/sdmb/showthread.php?s=&postid=2160998#post2160998).

In-between levels I hadn’t thought about.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [June 5, 2002, 11:08pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/7 "2002-06-05T23:08:00Z")

</div>

I don’t think that this question can be well-defined mathematically, so don’t expect anything along those lines. Here’s a thought, though, that maybe is along the same lines as the OP. What about taking the limit of a ratio as x → ∞?

For instance, lim x[sup]2[/sup] / e[sup]x[/sup] = 0, so you could say that exp() is a higher level than squaring. Eventually, almost all ratios of operations will go to 0 or ∞, so you could, in a sense, sort them.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [June 5, 2002, 11:21pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/8 "2002-06-05T23:21:16Z")

</div>

It is very dangerous and error-prone to take those precedence levels seriously. Yes, lacking parens, you first apply exponents, then products, then sums. This is by standard convention. After that and with any other operators you must use parens. For example, you might think that by analogy, a / b /\ c ought to be  
a / (b /\ c), but I would never, ever use it that way. Clarity is more important than concision.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 6, 2002, 1:18am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/9 "2002-06-06T01:18:17Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> \*\*I don’t think that this question can be well-defined mathematically, so don’t expect anything along those lines. Here’s a thought, though, that maybe is along the same lines as the OP. What about taking the limit of a ratio as x → ∞?
> 
> For instance, lim x[sup]2[/sup] / e[sup]x[/sup] = 0, so you could say that exp() is a higher level than squaring. Eventually, almost all ratios of operations will go to 0 or ∞, so you could, in a sense, sort them. \*\*

A partial order by asymptotic growth, eh? You’ll get a lot that go to something in between, as well.

To the OP, there is a tower operation. I used to be able to define it, but I forget now. Search on Google, perhaps?

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [June 6, 2002, 1:22am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/10 "2002-06-06T01:22:10Z")

</div>

> [@](#):
>
> \*Originally posted by ultrafilter \ ***A partial order by asymptotic growth, eh? You’ll get a lot that go to something in between, as well.**

Um, really? Like what? I know that (x[sup]2[/sup] + 1) / x[sup]2[/sup] will not go to 0 or ∞, but those aren’t really different operations.

---

<div class="post-metadata">

**Author:** ![KellyM](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@KellyM](https://boards.straightdope.com/u/KellyM)\
**Post date:** [June 6, 2002, 1:32am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/11 "2002-06-06T01:32:52Z")

</div>

I believe the “tower” operator (repeated exponentiation) is defined as x tower 0 = 1, x tower 1 = x, x tower 2 = x^x, x tower 3 is x^x^x, and so forth. It is possible, using some fancy analytic techniques in function spaces, to define it for x^y where y is any positive real number. I am not aware of any practical use for this function, and the only theoretic use that I am aware of is extremely esoteric.

---

<div class="post-metadata">

**Author:** ![Netbrian](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@Netbrian](https://boards.straightdope.com/u/Netbrian)\
**Post date:** [June 6, 2002, 1:42am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/12 "2002-06-06T01:42:29Z")

</div>

KellyM: That sounds actually fairly interesting… Are there ways for fractions/negative numbers to be used with the tower operator?

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 6, 2002, 4:20am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/13 "2002-06-06T04:20:43Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> \*\*Um, really? Like what? I know that (x[sup]2[/sup] + 1) / x[sup]2[/sup] will not go to 0 or ∞, but those aren’t really different operations. \*\*

log(n!)/(n_log(n)) will go to 1, by Stirling’s approximation. Even worse, there are pairs of functions which aren’t comparable under your scheme–take n_sin(n) and n\*cos(n), for instance.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [June 6, 2002, 6:29am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/14 "2002-06-06T06:29:30Z")

</div>

I see what you’re saying, **ultrafilter**. However, the OP was asking not about functions, but about operators, which are more limited in scope. While I admit that the distinction is rather ill-defined, I don’t think the OP had things like n·sin(n) in mind.

---

<div class="post-metadata">

**Author:** ![John\_Kentzel-Griffin](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@John\_Kentzel-Griffin](https://boards.straightdope.com/u/John_Kentzel-Griffin)\
**Post date:** [June 6, 2002, 6:38am UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/15 "2002-06-06T06:38:54Z")

</div>

> [@](#):
>
> \*Originally posted by \*\*\*bup \*\*  
> Parens are level 4, in your scheme.

Parens alter the priority of operations; they are not operators. They are punctuation marks

---

<div class="post-metadata">

**Author:** ![muttrox](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@muttrox](https://boards.straightdope.com/u/muttrox)\
**Post date:** [June 6, 2002, 12:50pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/16 "2002-06-06T12:50:19Z")

</div>

The question was poorly phrased, I still can’t tell if the OP wanted to know about operators or priority of operations.

---

<div class="post-metadata">

**Author:** ![Enola\_Straight](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Enola\_Straight](https://boards.straightdope.com/u/Enola_Straight)\
**Post date:** [June 6, 2002, 2:17pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/17 "2002-06-06T14:17:39Z")

</div>

I figured, what kind of mathematical procedure produced a greater mathematical result due to operation.

Looks like summation comes in between addition and multiplication, and factorials between multiplication and exponents, so there’s your in-between levels there.

The tower repeated exponation looks like a good candidate for level four in my sceme of things.

---

<div class="post-metadata">

**Author:** ![Jabba](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@Jabba](https://boards.straightdope.com/u/Jabba)\
**Post date:** [June 6, 2002, 2:49pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/18 "2002-06-06T14:49:50Z")

</div>

In Murray S Klamkin, _International Mathematical Olympiads 1978 - 1985_, problem 6 from 1981 is  
The function f(x,y) satisfies  
(1) f(0,y) = y+1  
(2) f(x+1,0) = f(x,1)  
(3) f(x+1,y+1) = f(x,f(x+1,y))  
for all non-negative integers x, y. Determine f(4,1981).

In his notes to the solution ( which I won’t give for the sake of anyone who wants to try it) he writes:  
“This function, defined by a double recursion, is called _Ackermann’s function_. Ackermann, a student of Hilbert’s, showed that it grows faster than any function that can be defined recursively in terms of a single variable. It has been of interest to computer scientists because it grows faster than anything programmable by simple loops. See [Z A Melzak, _Companion to Concrete Mathematics_, Vol I, pp 76-78].”

---

<div class="post-metadata">

**Author:** ![Allen\_Parine](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Allen\_Parine](https://boards.straightdope.com/u/Allen_Parine)\
**Post date:** [June 6, 2002, 3:03pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/19 "2002-06-06T15:03:33Z")

</div>

> [@](#):
>
> _Originally posted by Enola Straight_  
> Looks like summation comes in between addition and multiplication, and factorials between multiplication and exponents, so there’s your in-between levels there.
> 
> The tower repeated exponation looks like a good candidate for level four in my sceme of things.

I think the whole hierarchy you have in mind (at least from exponentiation onward) was expressed by Knuth with his arrow notation (pretend the ^'s are arrows pointing upward):  
m^n = m \* … \* m (n m’s) = m[sup]n[/sup]  
m^^n = m ^ … ^ m (n m’s) = m[sup]m[sup]…[sup]m[/sup][/sup][/sup], the exponential tower **ultrafilter** mentioned  
m^^^n = m ^^ … ^^ m (n m’s),  
and so forth. I don’t know if anyone’s ever used single-character operators for ^^, ^^^, etc.

---

<div class="post-metadata">

**Author:** ![Allen\_Parine](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Allen\_Parine](https://boards.straightdope.com/u/Allen_Parine)\
**Post date:** [June 6, 2002, 3:06pm UTC](https://boards.straightdope.com/t/levels-of-mathematical-operators/112532/20 "2002-06-06T15:06:30Z")

</div>

Oops, forgot to mention, the arrow operators are right-associative, so e.g. m^^3 = m^(m^m), not (m^m)^m.
