Home

sqrtw2

sqrtw2 is the shorthand for the expression sqrt(w^2), the square root of the square of a variable w. In real-number contexts, this quantity equals the absolute value of w, denoted |w|, and is therefore always nonnegative. This makes sqrtw2 a convenient way to express a nonnegative magnitude derived from w.

For real w, the value is determined by the sign of w: if w is nonnegative, sqrtw2

In complex analysis, the situation is more subtle. The square root is a multivalued operation, and sqrt(w^2)

Computational notes: many computer algebra systems simplify sqrt(w^2) to Abs(w) (the absolute value) rather than w,

Relation to norms: for a real scalar, sqrt(w^2) is the Euclidean norm of a one-dimensional vector and

=
w;
if
w
is
negative,
sqrtw2
=
-w.
In
other
words,
sqrt(w^2)
equals
w
when
w
≥
0
and
equals
-w
when
w
<
0.
is
not
generally
equal
to
w.
The
principal
square
root
function
introduces
a
branch
cut,
so
sqrt(z^2)
can
differ
from
z
depending
on
z’s
position
in
the
complex
plane.
Consequently,
algebraic
simplifications
like
sqrt(w^2)
→
w
are
not
universally
valid
in
complex
arithmetic.
reflecting
its
real-number
interpretation.
In
programming,
expressions
like
sqrt(w*w)
typically
yield
a
nonnegative
result
for
real
w.
When
w
represents
a
matrix
or
higher-dimensional
object,
sqrt(w^2)
becomes
ambiguous
and
a
separate
concept—the
matrix
square
root—must
be
used,
with
different
properties
from
the
scalar
case.
equals
|w|.
More
generally,
sqrt(x^T
x)
represents
the
L2
norm,
||x||_2.