1. <mathematics> A single number, as opposed to a vector or matrix of numbers. Thus, for example, "scalar multiplication" refers to the operation of multiplying one number (one scalar) by another and is used to contrast this with "matrix multiplication" etc.
See also superscalar.
3. <programming> Any data type that stores a single value (e.g. a number or Boolean), as opposed to an aggregate data type that has many elements. A string is regarded as a scalar in some languages (e.g. Perl) and a vector of characters in others (e.g. C).