single field element, e.g. real number, in the context of linear algebra
A scalar is a single number (like a real number) that can be multiplied by vectors or matrices to change their size or direction. Scalars matter in linear algebra because they're the basic building blocks used to perform fundamental operations like scaling and combining vectors.
AI-generated from the Wikipedia summary — may contain errors.
In mathematics, more specifically in linear algebra, a scalar is an element of a field which is used to define a vector space through the operation of scalar multiplication: a vector (denoted v) multiplied by a scalar (denoted a) produces another vector (av). Real numbers and complex numbers may be used as scalars in real and complex vector spaces, respectively. A scalar product operation – not to be confused with scalar multiplication – may be defined on a vector space, allowing two vectors to be multiplied in the defined way to produce a scalar. A vector space equipped with a scalar product is called an inner product space.
A scalar may also have other roles in terms of vector components, in normed vector spaces, in modules, and in transformations. A quantity described by multiple scalars, such as having both direction and magnitude, is called a vector. The term scalar is also sometimes used informally to mean a vector, matrix, tensor, or other, usually, "compound" value that is actually reduced to a single component. Thus, for example, the product of a 1 × n matrix and an n × 1 matrix, which is formally a 1 × 1 matrix, is often said to be a scalar. The real component of a quaternion is also called its scalar part.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).