# Why is the "greater than" or "less than" symbol referred to as operators?

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?

• "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. Aug 26, 2018 at 12:16
• You could say that it maps to $\{\text{true}, \text{false}\}$, I guess.
– Eff
Aug 26, 2018 at 12:17
• @amsmath 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? Aug 26, 2018 at 12:18
• @William Then Wikipedia is definitely wrong. In, e.g., functional analysis, a linear operator maps between vector spaces which might well be distinct. Aug 26, 2018 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, 2018 at 12:22

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. Aug 26, 2018 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, 2018 at 12:38
• @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, 2018 at 12:57
• @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. Aug 26, 2018 at 13:08
• @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, 2018 at 13:24

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