 vector - Maple Help

Overview of Vectors Description

 • Important: The vector command has been deprecated.  Use the superseding command Vector instead. For additional information on migrating linalg code to the new packages, see LinearAlgebraMigration.
 • In Maple there are various computational representations for vectors. The old representation consists of a one dimensional array whose indices start at 1. A more modern representation consists of the Vector command based on the Array constructor, which is manipulated essentially in the same way as the old vector but has advantages regarding options and efficiency.
 Note:  The online documentation in Maple uses the convention that vector (lowercase "v") refers to an array-based vector used by routines in the linalg package, and Vector (uppercase "V") refers to an rtable-based Vector used by routines in the LinearAlgebra package. See LA_general for more information about linear algebra computations in Maple.
 • Two specialized packages for performing vector calculus are VectorCalculus, using a non-algebraic computational representation based on the Vector constructor and Arrays, and Physics/Vectors using an algebraic representation allowing also to represent abstract (not projected) vectors, equivalent to those represented in textbooks by a letter with an arrow on top. There are also tools for computing with vectors at a more abstract level in the DifferentialGeometry package. To know about VectorCalculus, Physics/Vectors, DifferentialGeometry or the Vector constructor see the respective help pages and examples. Below follows a description of the old vector representation.
 • Vectors can be input either directly, as a one dimensional array, or using the vector command in the linear algebra package. For example, array([1,x,x^2]) creates a vector of length 3 . See array and linalg[vector] for further details.
 • The ith entry of a vector U is accessed, and assigned to, using the subscript notation ${U}_{i}$. For example, ${U}_{i}≔\frac{1}{{V}_{i}}$ assigns the i^th entry of the vector U to be the inverse of the i^th entry of the vector V.
 • The linalg (linear algebra) package includes many vector operations. See linalg for further information.
 • The map function can be used to apply a function to each entry of a vector. For example, map(simplify, V) simplifies each entry of the vector V and map(diff, V, x) differentiates each entry of the vector V with respect to x.  See map for further details.
 • See type/vector for testing for a vector. For example, type(A, 'vector(integer)') tests for a vector of integers. Examples

Important: The linalg package has been superseded by the LinearAlgebra and VectorCalculus packages. For information on migrating linalg code to the new packages, see LinearAlgebraMigration.

 > $\mathrm{linalg}\left[\mathrm{vector}\right]\left(4,\left[1,x,{x}^{2},{x}^{3}\right]\right)$
 $\left[\begin{array}{cccc}{1}& {x}& {{x}}^{{2}}& {{x}}^{{3}}\end{array}\right]$ (1)
 > $\mathrm{array}\left(1..3,\left[1,2,3\right]\right)$
 $\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (2)
 > $\mathrm{type}\left(,\mathrm{vector}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{array}\left(0..2,\left[a,b,c\right]\right)$
 ${array}{}\left({0}{..}{2}{,}\left[\left({0}\right){=}{a}{,}\left({1}\right){=}{b}{,}\left({2}\right){=}{c}\right]\right)$ (4)
 > $\mathrm{type}\left(,\mathrm{vector}\right)$
 ${\mathrm{false}}$ (5)