Talk:Unary operation

From Wikipedia, the free encyclopedia

I added a phrase on the notion of "single input" which seems not very meaningful to me. An example should be added (e.g. a "binary" (mathematical) function defined on AxB is a unary function defined on E where E=AxB ; a function proc(name,age,address) could as well be written as a function proc(person) where person = struct{name,age,address}, and of course this is already true in a hidden way for several "hidden" complex types (complex number = (real part,imag part), long int = (low word, high word), etc.))

It could be discussed whether this might not apply to functions with various types of "arguments" (in / inout / out) (where the latter are in fact an "improper" way to return the output). — MFH:Talk 12:50, 17 October 2006 (UTC)

[edit] Factorial

Isn't factorial an unary oparation?

[edit] Examples of Unary Operations

Not all of these are unary:

  • the absolute value operation is a unary operation on the real numbers
    • OK
  • the opposite operation (-x) on the real numbers
    • This is a binary operation. This is the same as multiplying by -1, which is binary operation that requires two operands, x and -1.
  • the power operation (squaring, cubing, etc) on the real numbers
    • Again, this requires two operands. x^n requires both x and n as input values.
  • the factorial operation on the real numbers
    • OK
  • the trigonometric operations (sin x, cos x, tan x, cot x, csc x) on the real numbers
    • OK
  • the natural logarithm (ln x) on the real numbers
    • A logarithm requires a base, which is another operand. In this case, the base is e. Therefore, this has two operands, x and e.
  • the logarithm of base 10 (log x) on the real numbers
    • This requires two operands, x and 10.
  • logical negation on truth values
  • A unary operation on a given set S is nothing but a function SS, also called an endomorphism of S.
    • OK

Pointlessness 16:02, 17 April 2007 (UTC)

All the operations you consider not unary are special cases of binary operations. If one operand in a binary operation is fixed, we have a unary operation on the other operand. So while all these operations can be described by binary operations, the operations as described in the article are unary operations. The negation on real numbers in particular is a good example of this - while it is the same as multiplying by -1, it is quite natural to define this unary operation (taking the additive inverse) without having any notion of multiplication. JPD (talk) 16:25, 17 April 2007 (UTC)

How about the difference operator? Can it also be considered a unary operator? Cako 23:38, 10 October 2007 (UTC)

It can be described as unary, in the sense that it produces one function from a single other function. But operator is traditional nomenclature; I would call it a unary functional. Septentrionalis PMAnderson 02:23, 11 October 2007 (UTC)