Home

scalar

A scalar is a quantity described by a single numerical value and is invariant under changes of coordinate system. It has magnitude but no intrinsic direction. This distinguishes it from vectors, which have both magnitude and direction, and from tensors, which transform according to more complex rules.

In mathematics, scalars are elements of a field, typically real or complex numbers, used to scale vectors

In analysis and physics, scalars can define scalar fields, where a scalar is assigned to every point

In computer science, scalar types are primitive data types that store single values, such as integers, floating-point

in
a
vector
space.
Scalar
multiplication
combines
a
scalar
with
a
vector
to
produce
another
vector,
and
it
satisfies
distributive,
associative,
and
identity
properties.
Scalars
provide
the
basic
numeric
coefficients
in
linear
combinations.
of
a
space.
Examples
include
temperature,
mass
density,
and
electric
potential.
Scalar
fields
enable
the
computation
of
derivatives
such
as
gradients
and
Laplacians,
which
convey
how
the
field
changes
in
space.
numbers,
booleans,
and
characters.
They
are
contrasted
with
composite
data
types
like
arrays
and
objects.
Scalars
form
the
core
units
of
arithmetic,
logic,
and
data
representation
in
programming
languages.