Overview of Vectors
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 Ui. For example, Ui≔1Vi 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.
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.
Download Help Document