Home

sumsquare

Sumsquare is a term used in mathematics to describe the operation of adding together the squares of numbers, vectors, or components. The basic form is the sum of squares of integers 1 through n: 1^2+2^2+...+n^2 = n(n+1)(2n+1)/6. In vector spaces, the squared Euclidean norm of a vector x = (x1,...,xk) is defined as ||x||^2 = x1^2+...+xk^2.

In number theory, sums of squares refers to representations of integers as sums of squares, such as

In computing and data analysis, the term may appear as shorthand in algorithms involving squared errors, least-squares

expressing
a
number
as
a^2+b^2.
The
two-squares
theorem
characterizes
primes
that
are
sums
of
two
squares:
a
prime
p
equals
a^2+b^2
with
integers
a,b
if
and
only
if
p=2
or
p
≡
1
(mod
4).
Lagrange's
four-square
theorem
states
that
every
natural
number
can
be
written
as
a
sum
of
four
squares.
The
study
of
sums
of
squares
connects
to
quadratic
forms
and
modular
arithmetic.
optimization,
or
norm
calculations.
Software
libraries
and
programming
projects
sometimes
adopt
the
name
SumSquare
or
sumsquare
for
modules
dealing
with
numerical
computation,
statistics,
or
data
processing.
The
exact
meaning
depends
on
context,
but
the
underlying
concept
is
consistent
with
summing
squared
quantities.