3

My understanding of operators is it works on elements of a set and produces another element of the same set.

I don't see how or why the "$>,≥,<,≤$" would be referred to as "operators" on some pages as it doesn't map to another element. (I think I've also seen it on Wikipedia as well)

I've always thought of it as a "relation" though. Can anyone shed some light?

William
  • 4,893
  • 1
    "My understanding of operators is it works on elements of a set and produces another element of the same set." That is not correct. Neither your highlighted "another" nor "the same set". An operator is a map. That's all. It performs an operation. – amsmath Aug 26 '18 at 12:16
  • 1
    You could say that it maps to ${\text{true}, \text{false}}$, I guess. – Eff Aug 26 '18 at 12:17
  • 1
    @amsmath https://en.m.wikipedia.org/wiki/Operator_(mathematics) I think Wikipedia kinda agrees with me. Let's say I agree with you for a sec, but then what does it map to if it's a mapping? – William Aug 26 '18 at 12:18
  • 1
    @William Then Wikipedia is definitely wrong. In, e.g., functional analysis, a linear operator maps between vector spaces which might well be distinct. – amsmath Aug 26 '18 at 12:20
  • Mathematically, the symbols are usually relations: a < b says "$a$ is less than $b$". However, sometimes the symbols are operators that return a yes or no answer: a < b asks "Is $a$ less than $b$?" The latter is the usage in computer code. Occasionally (rarely?), mathematicians also incorporate these kinds of "logical operators" into formulas (in particular, in summations, where terms are added (or excluded) according to whether they satisfy certain criteria). – Blue Aug 26 '18 at 12:22
  • @William I just saw that Wikipedia contradicts itself in this article. See here: https://en.m.wikipedia.org/wiki/Operator_(mathematics)#Linear_operators – amsmath Aug 26 '18 at 12:22
  • According to ISO 80000, a =, <, or ≤ is not a (dyadic or monadic) operator; it's a (sign denoting a) relation. –  Aug 26 '18 at 17:24

2 Answers2

8

In mathematics, you generally won't see inequality signs referred to as "operators" at all.

In programming languages, "operator" means generally any syntactic construct that can be used to build expressions from other simpler expressions. In most programming languages, inequality signs count as operators, because they are used to build expressions with Boolean values.

Note that most programming languages do not follow the tradition in mathematical logic of distinguishing syntactically between terms (which denote mathematical objects) and formulas (which have truth values). They're all just expressions, and whatever primitives they're built with are operators.

  • So I was right? They aren't operators. At least in Math. Cool Idk programming tho. – William Aug 26 '18 at 12:24
  • @William: It's not so much that "they aren't operators" in math, as "they almost-always aren't operators". It's not unheard-of for someone to use a relation as a "true/false (or zero/one) operator" in a formula; however, it's probably safe to say that, when that happens, the author takes a moment to explain such usage to readers, who are likely to be unfamiliar with it. – Blue Aug 26 '18 at 12:38
  • @Blue: Usually the word "operator" would not be used for that, unless the author is influenced by programming-language jargon, though. – hmakholm left over Monica Aug 26 '18 at 12:40
  • @Blue I'd like to keep Maths and Programming seperated. Idk what programming is, but I don't want it to corrupt the definitions of Maths. – William Aug 26 '18 at 12:50
  • 1
    @HenningMakholm: I vaguely recall that a famous-ish combinatorist liked using "logical operators" in summations. For instance, choosing to write $$\sum_{k=1}^{100} \frac{1}{k^2} \cdot \left(\text{$k$ is prime}\right)$$ (where "$k$ is prime" is an operator that returns $0$ or $1$) instead of something like this $$\sum_{k=0\ \text{$k$ is prime}}^{100}\frac{1}{k^2}$$ (which I can't even seem to typeset properly! :), not so much out of programming-jargon influence as from a desire to de-clutter the summation symbol itself and to highlight the inclusion criterion. – Blue Aug 26 '18 at 12:57
  • 1
    @Blue: The Iverson bracket is a thing that some people are using in mathematical notation. That does not have much to do with whether your "famous combinatorist" uses the word "operator" to refer to inequality symbols, however. – hmakholm left over Monica Aug 26 '18 at 13:08
  • @HenningMakholm: I may be conflating Iverson with the combinatorist (perhaps because those vague recollections of mine involve combinatorial summations). I clearly can't trust my memory to speak with any authority about whether anyone has explicitly referred to inequality symbols using the term "operator", but I posit that using something like the Iverson bracket is effectively the same thing. – Blue Aug 26 '18 at 13:19
  • @Blue: Using the Iverson bracket implies absolutely nothing about how one uses the word "operator". Your memories might be from some of Knuth's work, perhaps Concrete Mathematics? Knuth is certainly influenced by programming-language jargon. – hmakholm left over Monica Aug 26 '18 at 13:19
  • 1
    @HenningMakholm: I didn't mean to start an argument, what with the end of civilization being imminent and all ... I'll stop typing now. Best regards ... – Blue Aug 26 '18 at 13:24
  • @William computer science is close enough to mathematics that that choice isn't very smart, at least in my opinion (and plus, Mathematica is great) – Stephen S Aug 26 '18 at 18:26
2

This is just a case of infix notation: $$ a < b \quad = \quad <(a, b) $$

mvw
  • 34,562