1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Operators and functions

  1. Jul 2, 2009 #1
    Is there a fundamental difference between operators and functions?

    For example we could have F(x,y)=x+y or we could write SUM(x,y) where SUM is a defined operation in some program. Could operators be considered a particular type of function?
     
  2. jcsd
  3. Jul 2, 2009 #2
    Yes. Any binary operation on [itex]S[/itex] is simpy a function from [itex]S \times S \to S[/itex]. We use infix notation (that is, we write the function in between the operands as in x + y instead of +(x, y) ) out of convenience and familiarity.
     
  4. Jul 3, 2009 #3
    Thanks Moo Of Doom. I was pretty sure of this, but math texts usually use these in terms in distinct ways.
     
    Last edited: Jul 3, 2009
  5. Jul 3, 2009 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Moo of Doom talked about "operations". Your question was about "operators". Generally, an "operator" is a function defined on functions as opposed to functions on numbers.
     
  6. Jul 3, 2009 #5
    Then SUM(x,y) would not be read as an operator on (x,y), but rather as an operation on (x,y)?
     
  7. Jul 3, 2009 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Yes, that is true. The original post was ambiguous.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Operators and functions
  1. Functions vs. Operations (Replies: 12)

  2. Operator and function (Replies: 11)

Loading...