linalg(deprecated)/normalize - Maple Help

linalg(deprecated)

 normalize
 normalize a vector

 Calling Sequence normalize(A)

Parameters

 A - vector

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Normalize], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The normalize function normalizes the specified vector with the 2-norm.
 • Use map(linalg[normalize], linalg[GramSchmidt]({v1, v2, .., vk}), to compute the orthonormal basis for a set $\left\{\mathrm{v1},\mathrm{v2},\mathrm{vk},..\right\}$ of vectors.
 • This function is part of the linalg package, and so can be used in the form normalize(..) only after performing the command with(linalg) or with(linalg, normalize).  The function can always be accessed in the long form linalg[normalize](..).

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Normalize], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $\mathrm{normalize}\left(\mathrm{array}\left(\left[1,-I\right]\right)\right)$
 $\left[\begin{array}{cc}\frac{\sqrt{{2}}}{{2}}& {-}\frac{{I}}{{2}}{}\sqrt{{2}}\end{array}\right]$ (1)
 > $\mathrm{norm}\left(,2\right)$
 ${1}$ (2)
 > $\mathrm{normalize}\left(\mathrm{array}\left(\left[1,-2,2\right]\right)\right)$
 $\left[\begin{array}{ccc}\frac{{1}}{{3}}& {-}\frac{{2}}{{3}}& \frac{{2}}{{3}}\end{array}\right]$ (3)
 > $\mathrm{norm}\left(,2\right)$
 ${1}$ (4)