Jump to content

Talk:Scalar

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Lethe (talk | contribs) at 13:18, 10 July 2006 (Request for comment: reply to PAR: a list is never a scalar). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Scalars in computer programming

In computer programming, scalars are variables that can hold only one value at a time, as distinct from arrays which are variables that can hold many values at the same time. Some languages such as Pascal and Perl narrow this definition somewhat, but the underlying principal holds true.

That is of course a new concept of scalar that did not exist until the 20th century, and is still not what most people think of when they hear the word scalar. Perhaps another page could be titled scalar (computing). Michael Hardy 22:42, 16 Feb 2005 (UTC)

Hmmm. One could argue that the computer based definition above is simply an extension of the idea presented in - and corresponds closely to - the article's statement "In physics a scalar is a quantity that can be described by a single number", in contrast with the physics concept of a vector which intrinsically entails several values at the same time, viz. magnitude and direction. Hence we have vector vs. array.

I've just been going through a few disambiguations, and have found the need for a scalar (computing) page as well. I don't agree that the physical scalar is close enough to the concept behind scalar computer terms to be used. The mathematical scalar is closer (for me), but still doesn't fit well. At the moment, I'm not ready to build such a page, but perhaps at a later date, if there is more support for one. WhiteHatLurker 04:17, 11 June 2006 (UTC)[reply]

I don't know enough computer science to build that page either, but I'm going to be bold and make it anyway. It'll be better off as an independent stub than as a paragraph sitting here. --Smack (talk) 22:45, 14 June 2006 (UTC)[reply]

Discussion of scalars in physics

Several sections from this page have been moved to Talk:Scalar (physics).

Merge

There appear to be three articles on scalars, scalar (physics), scalar (mathematics) and scalar (computing), all talking about the same concept. They should be merged. Sigh. Cruft patrol is endless, isn't it? linas 03:41, 6 July 2006 (UTC)[reply]

I support the merger. It seems like a section should be added to the mathy article which discusses representations; a scalar (under some group, perhaps implicit) is an element of the trivial representation. That description seems like it would subsume any use of the term in physics, right? -lethe talk + 04:21, 6 July 2006 (UTC)[reply]
Partial support. The physics version and mathematics version are probably better merged, but the computing version would need greater care as it has little to do with the algebra of vector spaces. The articles on superscalar and scalar processors may give a feel for some of the ways the term has been used in computing. Perhaps the computing article should be merged with primitive type instead of scalar, though that's awkward for the processor classification usage. Ah well, as many words as mathematics has borrowed and redefined — and in multiple ways — we can't complain if computer science does the same. --KSmrqT 05:21, 6 July 2006 (UTC)[reply]
Yes, I could back off on scalar in computing; note however, the historical origin of this term is "opposite of vector", coming into use in the 70's when "vector processors" such as the the Cray were all the craze. linas 13:57, 6 July 2006 (UTC)[reply]
They were split some time ago from a common base - see the physics talk section. The idea is that the abstract mathematical form, the physical form and the (somewhat) in between form for computing were distinct enough to require separate pages. I'm not in favour of remerging these back into one. In fact there are more terms which are to be explained - more on vector vs scalar processing, scalar particles, and probably a lot of work on scalar fields as well. WhiteHatLurker 19:15, 6 July 2006 (UTC)[reply]
I do not find a discussion at talk:scalar (physics) about a split. Can you help me find it? -lethe talk + 19:55, 6 July 2006 (UTC)[reply]
I re-wrote scalar field (quantum field theory) from scratch, so that should no longer be an issue in this debate. linas 01:18, 7 July 2006 (UTC)[reply]
Linas - Okay, and I see your comments in the physics one relating to Lorentz Scalars. WhiteHatLurker 03:52, 7 July 2006 (UTC)[reply]
Lethe, the thing I misremember on the physics page was a reference to moving from the scalar page. I may have read too much into it. I don't have time at the moment to do much on this - I was drawn in by a desire to help on the disambiguation thing and that was a page or two at a time. I still feel the differences are there, but if the consensus is to merge the scalar pages, good luck. WhiteHatLurker 03:52, 7 July 2006 (UTC)[reply]
Oppose. The three scalars are, very confusingly, identical and different at once. A physical or computer scalar is, indeed, necessarily a mathematical scalar (and, vice versa, a math scalar can be represented as a CS scalar). Furthermore, in all three cases, 'scalar' is the antonym of 'vector.'
However, vectors in math, physics, and CS are not the same! For instance, in mathematics, a function is a vector (it is a member of a vector space). However, neither physics nor computer science consider it a vector. Because the three kinds of scalars have three different antonyms, I believe they should be kept separate. --Smack (talk) 04:45, 7 July 2006 (UTC)[reply]
I'm not sure. The fact that functions are vectors is a bit abstract and far away from this discussion, where the relevant fact is that vectors in CS, physics, and math (and including functions) are lists of numbers, whereas scalars are single numbers. It takes some abstract thinking perhaps to think of a function as a list of numbers perhaps, but any CS student who's ever studied a function by looking at a table of its values will get it right away. Vectors are all the same thing. Scalars are all the same thing. Separate articles obfuscate this fact, which rather needs further explanation and clarification. -lethe talk + 05:03, 7 July 2006 (UTC)[reply]
Functions are vectors in a very concrete way, which has nothing to do with lists of numbers. Vector space gives eight properties that define a vector space, and Examples of vector spaces shows that functions fit right in. This is straightforward math, not trickery with tables of values. I learned it in an introductory course on linear algebra. --Smack (talk) 16:16, 7 July 2006 (UTC)[reply]
Being a vector by virtue of satisfying algebraic axioms is exactly what I mean when I say "in an abstract way". So you confirm the abstract way of thinking. But I want to reiterate the concrete fact that functions are lists of numbers, which is why the abstract fact that they satisfy some axioms is true. This big difference about vectors in mathematics being different that you mention as a reason not to merge is simply not true. Well, OK, it's only true in the most abstract sense, where a vector is regarded purely as an atomic element of a set satisfying axioms, and the vector space is infinite-dimensional, and the axiom of choice is not assumed. In that case, you can make an argument that vectors are not lists of numbers. But as I say, such abstract chicanery is quite far from this article, which still needs to be merged. I would really like for you to consider my argument and come around to my way of thinking. Do you really have a reason to believe that vector spaces made of functions are somehow different from vector spaces made of arrays of numbers? Please tell me what it is. -lethe talk + 16:30, 7 July 2006 (UTC)[reply]
Smack is right. Vectors are not lists of numbers, they are things that obey the eight properties. Lists of numbers may behave as vectors if the proper operations on those lists are defined. Physical vectors in particular are not lists of numbers. They are entities which, once you pick your coordinate system, may be described as a weighted sum of the coordinate vectors. These weights (components) form a list of numbers, but they are not the vector. If you change your coordinate system, the list changes, but the vector does not. A physical scalar is an entity which does not change its value under a change of coordinate system. An element of a list of vector components is a single number, but it is not a physical scalar, because its value changes when the coordinate system is changed. I also agree that functions may be treated as vectors in a very concrete way, just as lists may be treated as vectors if the proper operations are defined. Again, their vector nature has nothing to do with lists. However, since functions are infinite dimensional vectors, they are more abstract. It is "chicanery" to imply that the subset of vectors called lists are any more than one of many examples. PAR 16:50, 7 July 2006 (UTC)[reply]
About physical vectors. They are not just elements of a vector space, they are elements of a representation of some group. Thus of course you have to pay attention to how they transform. I've already mentioned how that needs to be handled. We're talking about vectors in a vector space now (what some splitter decided to call "mathematical vectors"). There is a theorem that every vector space has a basis. Thus every vector is a list of numbers. Thus, not only is it not chicanery to say that the "subset of vectors called lists" is more than an example. It's actually a theorem (as soon as I replace the notion of "subset of vectors" with a statement with meaning). I don't really appreciate having my argument referred to as "chicanery" either. It seems slightly uncivil. Just because I referred to my own arguments that way doesn't mean I want you to do it too.
Let me summarize and reiterate. I certainly agree that everyone things of vectors differently: mathematicians consider abstract elements satisfying axioms, physicists consider a list of numbers which transform in some way under coordinate changes, computer scientists think of simple lists of numbers or other scalar data. I think we all agree on that. But where we differ is whether these ideas are somehow different. I argue that they are all the same idea. Having them all in the same article emphasizes their unity. I am a mergist, and I always think that articles than can be merged should be. There are benefits to splitting (emphasize the different ways of thinking, keep information relevant to a specific kind of reader), but I think the benefits of a merged article (the article makes it clear to the reader that a vector, in any sense, is a list of numbers (group actions are just a footnote)) are more than the benefits of a split article. -lethe talk + 19:38, 7 July 2006 (UTC)[reply]
Forget the chicanery remark, I don't mean any incivility.
You say "physicists consider a list of numbers which transform in some way under coordinate changes". This is wrong. Physicists consider a physical entity and some operations which form a vector space. They then choose a coordinate system and represent that vector by a list. If they change coordinate systems, they come up with a new list to represent the vector. But they should never confuse the list with the vector.
What you said and what I said are the same thing.
To condense the argument - An element of a list of physical vector components is not a scalar, since it changes with coordinate system. This points out clearly the fact that a vector is not the same as the list of its components, while at the same time addressing the topic of this article. Do you agree?
Regarding the merge, I have no opinion. I just don't want it done or not done on the basis of wrong arguments. PAR 00:34, 8 July 2006 (UTC)[reply]
An element of a list of physical vector components is not a scalar, since it changes with coordinate system yes, I agree if we're talking about group representations. A component of a vector of a nontrivial representation does not live in the trivial representation, so is not a scalar in the physicists' sense. However, a component of a vector is a scalar in the more general sense. This points out the fact that a vector in a representation is not a list of its components (you also need transformations). It does not change the fact that a vector in a vector space is a list of numbers. I will also point out that a component can be a scalar even in the physicists' sense. For example, in Kaluza-Klein theory, one of the components of the metric tensor is a scalar field. It is of course not a scalar under the full extra-dimensional Lorentz group, but it is a scalar under the 4 dimensional Lorentz group. The point is that as far as vectors are concerned, their components are scalars, and the vectors themselves are lists of numbers. Whether they live in appropriate representations depends very much on which group we're representing, as this example shows. -lethe talk + 04:05, 8 July 2006 (UTC)[reply]
Ok, I've stated my position as clearly as I can, and my suspicion is that you have too. I am willing to let the record of our conversation speak for itself. Again, I am neutral on the merge, but I will actively oppose any description of a physical vector being defined as simply a list of numbers, or a physical scalar as a single number unless there is an unfortunate consensus to the contrary. PAR 05:32, 8 July 2006 (UTC)[reply]
Well we may not actually be in disagreement. I certainly agree that to describe a vector in a representation as "simply a list" is not sufficient. The main purpose of my argument was to demonstrate that math vectors, physics vectors, and CS vectors are all the same thing. I didn't mean that they have contain exactly equivalent information, that some couldn't have additional information (like changes under transformations), or more abstract ways of thinking. But whatever additional information or other ways of thinking, the underlying idea of a list of numbers is still there in every case. Rather, I only want to refute the idea that math vectors are somehow intrinsically different from physics or CS vectors, which Smack cites as a reason to keep the articles separate. Of course there are differences between the ways of thinking, but it is the samenesses that matter. To set your mind at ease, I promise not to write in any article that every vector is nothing more than a list of numbers. -lethe talk + 06:42, 8 July 2006 (UTC)[reply]


← Carriage return
User:Lethe claims that since any vector can be represented as a linear combination of basis vectors, it is actually a "list of numbers" (coordinates). Because I have never studied analysis, I have never seen this for myself, but there's enough information in the wiki to disprove this argument.
According to Vector space, coefficients must belong to a field. According to Field, we can have a field of functions. Thus, the "list of numbers" conception of a vector becomes a "list of functions." --Smack (talk) 01:08, 8 July 2006 (UTC)[reply]
Nothing in what you've said contradicts anything I've said, as far as I can see. So what's the point? Some sets of functions constitute fields. Vector spaces over those fields will be lists of elements of those fields. Is there any disagreement? -lethe talk + 04:05, 8 July 2006 (UTC)[reply]
I guess my last post doesn't actually disprove anything. However, I still agree with PAR that physics vectors and math vectors are not the same thing. For instance, consider the electric field vector. It's a physical entity. Physicists choose to represent it as a mathematical vector, a list of numbers, if you insist. However, the physical entity does not become the list of numbers.
Consider the way we represent abstractions in verbal language, such as English. We use a term, 'electric field,' to denote a certain physical entity. However, the physical entity and the word remain distinct. Math is a language, too. The "list of numbers" that we use to represent the electric field is not the same thing as the field itself. --Smack (talk) 22:04, 9 July 2006 (UTC)[reply]
Of course, I also agree. In physics, vectors are not just lists of numbers. We also have to know how they transform. We might call them equivalence classes of lists of numbers, whatever. The point is that the concept of a list of numbers underlies the idea and intuition of all vectors. The argument that we have to have separate scalar articles because the idea of vectors is different in each case doesn't appeal to me, because in fact the idea of vectors is not different. Each different idea of a vector (math, CS, physics), is just a variation on a theme. -lethe talk + 00:33, 10 July 2006 (UTC)[reply]
A vector is defined by the eight properties. Everything else is derived. The fact that you can pick a set of basis vectors and represent a vector by a list of field elements is derived. Again, I agree with Smack - a list of numbers is not part of my intuition about vectors any more than the english language is. The list is a description of the vector in a particular language - the chosen basis. The fact that each manipulation of a vector has a corresponding manipulation of the list is nice. It is however, less intuitive, and not fundamental.PAR 02:06, 10 July 2006 (UTC)[reply]
I think we're going in circles. I'm putting in a WP:RFC.

Request for comment

To summarize: Lethe wants to merge Scalar (mathematics), Scalar (physics), and Scalar (computing), because he (she?) thinks that they're really all the same thing. Smack (talk) and PAR disagree, based on a (somewhat nuanced) argument that the three alleged kinds of scalars are actually different. --Smack (talk) 05:13, 10 July 2006 (UTC)[reply]

I endorse this summary and confirm that it summarizes my position. (PS, feel free to use the pronoun "he" with reference to me). -lethe talk + 05:17, 10 July 2006 (UTC)[reply]
I don't understand the argument Smack and PAR make. I think they basically say: "Vector" has different meanings in mathematics, physics and computing. Therefore, by analogy, "scalar" (the opposite) also has a different meaning. Pardon me, but this is a logical fallacy. If I am not right, why is then 90% of the previous discussion about vectors? Samohyl Jan 05:52, 10 July 2006 (UTC)[reply]

I would disagree with a merger. But I would think that it would be a good idea to not have scalar as a disambig, rather a small or medium size article describing how the concepts of scalar are similar/different in mathematics/physics/compsi. Oleg Alexandrov (talk) 06:43, 10 July 2006 (UTC)[reply]

Not sure about the scalars point, but on the idea of a vector being 'a list of numbers', I would have to say, that despite being a pure mathematician, I tend to agree with the scientists that a vector is not just a list of numbers. In particular, when dealing with infinite dimensional topological vector spaces, very few mathematicians would think of the elements (which are often functions) as lists of numbers, and since the dimension might be uncountable, a 'list' isn't the right concept anyway! Madmath789 06:54, 10 July 2006 (UTC)[reply]


Recall that Hamilton, who gave us the original "scalar" and "vector" as aspects of a quaternion, was a mathematical physicist. Further recall that it was the physicists Heaviside and (especially) Gibbs who revolted and began to give us vectors in a more modern sense. This suggests that separating the mathematics from the physics is somewhat artificial. Computer science is a different matter.

In linear algebra, a vector space comes with a field of scalars. The algebra of the scalars is an important part of the definition. For example, if we have only a ring of scalars, we can make a module but not a vector space. The most commonly encountered vector spaces use real numbers or complex numbers as scalars; but we also make a module of polynomials, which themselves form a vector space! Or consider matrices as modules; the idea of a block matrix depends on using matrices themselves as the scalars.

Such examples of fancy scalars are violently at odds with the computer science meaning of scalar (and perhaps with the way many physicists conceive the term as well). Also, it is simplistic to say that computer science contrasts scalars with vectors; it also distinguishes arrays (which may be multidimensional) and structures and other composite types, as well as function objects. Note especially that the elements of a composite type can themselves be composite, but they do not therefore become "scalars"!

It is dangerous to talk of (mathematical) vectors as lists, because that implies a countable basis. It is a mathematical mistake to say that an arbitrary function (from what to what?) is a vector, without reference to a vector space. Consider, for example, the function that maps rational numbers to 0 and irrational numbers to 1. Or consider a function from the family of functions mapping natural numbers to their residue modulo n.

Let’s be kind to our readers. The typical computer science reader wants a scalar to be something that can be fetched from memory in constant time, and has no interest in algebraic issues. The typical mathematics reader cares only about algebraic issues. The typical physics reader will be somewhat confused by the abstract algebra, but it's good for them (!) and we can begin more concretely. (And don't forget pseudoscalars, in both physics and geometric algebra.)

Therefore I (again) support merging mathematics and physics, but not computer science. And if we do this, the mathematicians must tolerate the concrete needs of the physicists and the physicists must tolerate the abstract needs of the mathematicians. Be prepared for grumbling! If these camps cannot achieve mutual satisfaction, then I would support Oleg's proposal of a "springboard" page. --KSmrqT 09:02, 10 July 2006 (UTC)[reply]

Yes. Both the mathematicians and the physicists view of a vector is contained in the "eight properties". The fact a "list" can sometimes be used to specify a vector by choosing a particular basis is also common to the mathematician and physicist. I'm not sure what a mathematician would call a scalar, but to a physicist the idea that a scalar does not change under a coordinate transformation is fundamental. This is what makes it "real" rather than an artifact of one's arbitrary choice of coordinate system. The clearest difference between a physical scalar and a computer science scalar is the fact that an element of a "list" representing a physical vector is not a scalar, while (I believe) in computer science it is. PAR 12:51, 10 July 2006 (UTC)[reply]
A list is never a scalar. -lethe talk + 13:18, 10 July 2006 (UTC)[reply]

Comment
Suprisingly (to me), I understood both the physics article and have a good idea of where the programming stub is going. The math article, on the other hand, seemed (to me) to lack a certain "plain English quality", though after reading the physics article I had a better grasp of it on a second read. If the meanings really are more or less the same, combining might help clarify the mathematics part, since it "paints a picture" which (again, for me) helps explain the more abstract language of the math usage. Hope that helps a bit. SB Johnny 10:40, 10 July 2006 (UTC)[reply]

Oppose merger, particularly merging the computer science version with the other two. Even if I grant that the concepts described by the three articles are really "the same", the articles are aimed at three different audiences and need to have different emphases. I think scalar should remain a disambiguation page, and that the three articles should link to each other more prominently than what is presently there. Dmharvey 11:08, 10 July 2006 (UTC)[reply]

Oppose any merger (different audiences). I like the idea of expanding Scaler to s short stub which explains the conection between the three in language accessable to all readers. --Salix alba (talk) 12:42, 10 July 2006 (UTC)[reply]