Talk:Associativity
From Wikipedia, the free encyclopedia
| WikiProject Mathematics (Rated Start-Class) | ||||||
|---|---|---|---|---|---|---|
| This article is within the scope of WikiProject Mathematics, which collaborates on articles related to mathematics. | ||||||
| Mathematics rating: | Start Class | High Priority | Field: Basics | |||
|
||||||
Contents |
[edit] Definition
The definition should be moved to the introduction as it is in other articles such as commutative operation.
Brianjd 04:27, 2004 Nov 14 (UTC)
[edit] Operator or Operation?
I would prefer operator to operation, but as I've noticed many articles using operation I hesitate to break consistency by changing over.
—Herbee 16:09, 2004 Mar 1 (UTC)
- For the sense intended here, binary operation is the usual term. For example, binary operation is what the AMS call it in the current version of the MSC. --Zundark 17:11, 1 Mar 2004 (UTC)
[edit] Move to Associative operation?
Right now, associative operation is just a redirect to this article. I think this article should be moved to associative operation to be consistent with other articles such as commutative operation.
Brianjd 04:32, 2004 Nov 14 (UTC)
[edit] Inconsistency here ?
There appears to be an inconsistency in this page. If addition is associative, then subtraction is also associative. i.e. (a+b)+c = a+(b+c). Taking a=5, b=-3, c=-2, we have (5-3)-2 = 0 = 5 + (-3-2). If you want to put the parenthesis after the minus sign, as in the example, then you must write 5-(3+2), which is 5-3-2.
I suggest that subtraction as an example of non-associativity be removed. It could be replaced by some other example: e.g. suppose we are in New York and I tell you that you can find a buried treasure by walking 600 km north, 1000 km west and then 600 km south. You will not find the treasure if you walk 1000 km west, 600 km north and then 600 km south!
User:Philip J Kuntz 00:10 2005 Apr 17
yes you will, and you'll have walked 1200 km too much
- I'm afraid the page is correct. Adding -3 *gives the same result* as subtracting 3, but it is not the same operation. Your example uses addition, not subtraction. The example you give, with a=5, b=-3, and c=-2, should read (5 + -3) + -2 = 0 = 5 + (-3 + -2) . This is very different from (5 - 3) - 2 = 0 but 5 - (3 - 2) = 4 .
I'm not sure how well I'm explaining this. Feel free to leave a note on my talk page, and I'd be happy to talk about this. -- Creidieki 19:26, 17 July 2005 (UTC)
[edit] Disambiguation
Added reference to CPU cache which discusses associativity as it relates to computer processor architecture.
[edit] Intuitive meaning of associativity
I hate to ask such a general question, but could anyone tell me anything about how I should intuitively think about associative versus nonassociative operations? I've been staring at Category Theory for a while now, and the definition of a category requires arrows to be associative. Why? How are associative operations different from nonassociative operations? The article mentions that "order of operations is immaterial", but I don't know that I have a very good intuition for what that means, or why it's important. How do other people think about associativity? -- Creidieki 19:29, 17 July 2005 (UTC)
- It is the order of the operations that is immaterial, not the order the symbols occur. I reworded the explanation of associativity to make that clearer. Wellsoberlin (talk) 22:39, 22 November 2008 (UTC)
- Definitions are intended to be useful. Is it useful to allow composition of arrows in a category to be non-associative? Probably not, because you can't really prove much about categories without using the associativity, and in any case arrows are intended to behave like functions, and composition of functions is associative. --Zundark 20:11, 17 July 2005 (UTC)
[edit] Assignment operator
I've just removed the text
- The assignment operator in many programming languages is right-associative. For example, in the C language
-
- x = y = z; means x = (y = z); and not (x = y) = z;
- In other words, the statement would assign the value of z to both x and y.
The assignment operator is more than a binary operation, and it is beyond the scope of this article. In fact, in the C language the expression x=y does return a value, which is the value of y. In this sense = is associative after all, since "(x=y)=z" = "x=(y=z)" = z! 128.12.181.34 00:30, 23 September 2005 (UTC)
[edit] Associativity confusion
This is now a complicated issue. All I would like, is for some one to write down in plain English the meaning of: "\left. \begin{matrix} (x+y)+z=x+(y+z)=x+y+z\quad \\ (x\,y)z=x(y\,z)=x\,y\,z\qquad\qquad\qquad\quad\ \ \, \end{matrix} \right\} \mbox{for all }x,y,z\in\mathbb{R}." and other such incantations on these pages. Although I have done maths beyond secondary level, I have never seen this type of phaseology. I would be most pleased if this type of explanation could be simplified for us plain folk. I am very interested and would be most grateful.
--59.167.9.205 07:52, 6 August 2006 (UTC) Regards BobC
- It sounds like you're not seeing the images, and are therefore seeing the raw TeX from the 'alt' attributes. What web browser are you using? --Zundark 08:30, 6 August 2006 (UTC)
Thanks Zundark. I was using Firefox 1.5.0.5. I will tell Mozilla about the problem. I tried Internet Explorer 5 and now I see the light.
- Well, I'm using Firefox 1.5 too, and I don't have a problem. I suspect you have Wikipedia images blocked in Firefox for some reason. Try looking at Tools / Options / Content and make sure that "Load Images" is ticked and "for the originating web site only" isn't ticked, and that
upload.wikimedia.orgisn't listed as blocked under Exceptions. --Zundark 07:33, 7 August 2006 (UTC)
[edit] Infix notation is confusing
For some time I'm quite against infix notation in both programming languages and in mathematics, since it makes many-many confusions. Almost every time I encounter descriptions of associativity and commutativity I see explanations like here.
Here is an example of what I'm talking of, when we use the prefix notation "add(x,y)" instead of infix "x+y".
commutativity is then:
add(x,y) = add(y,x)
but associativity is:
add(add(x,y),z) = add(add(x,z),y) = add(add(y,z),x)
another bonus example of commutativity after this, with 3 variables this time:
sub(add(x,y),z) = sub(z,add(x,y))
This can be rather confusing with the infix notations. These are the same three lines as above:
x + y = y + x
(x + y) + z = (x + z) + y = (y + z) + x
(x+y)-z = z-(x+y)
I think if someone does not know what associativity is, will not understand it from the above examples as clearly as by prefix notation. Please consider my proposal.
--
No, associativity is add(add(x,y),z) = add(x, add(y,z)). Ralphmerridew (talk) 12:14, 18 August 2008 (UTC)

