Home

Scalars

Scalars are quantities described by a single numerical value, possessing magnitude but no direction. In mathematics, a scalar is an element of a field, such as the real or complex numbers, and serves to scale other objects. In linear algebra, multiplying a vector by a scalar changes its length but not its direction in a proportional way. A scalar field assigns a scalar to every point in a space, such as a temperature distribution or gravitational potential.

In physics, a scalar quantity is defined by having only magnitude and being invariant under coordinate transformations

Relativity and tensor theory provide a more formal distinction: scalars are quantities that remain invariant under

In computing, scalar types refer to basic data types that hold a single value, such as integers,

such
as
rotations.
This
contrasts
with
vectors,
which
have
both
magnitude
and
direction.
Examples
of
scalars
include
mass,
temperature
(in
many
contexts),
energy,
and
electric
charge.
Scalars
transform
by
remaining
numerically
the
same
under
rotations,
while
vector
components
transform
according
to
the
rotation.
coordinate
changes,
whereas
higher-rank
tensors
have
components
that
transform
in
specific
ways.
Some
quantities
may
be
treated
as
scalars
in
one
theoretical
framework
but
require
a
more
general
tensor
description
in
another.
floating-point
numbers,
booleans,
or
characters.
These
are
contrasted
with
composite
data
types
like
arrays,
records,
or
objects.
Overall,
scalars
form
a
fundamental
concept
across
mathematics,
physics,
and
computer
science,
capturing
the
idea
of
magnitude
without
direction.