Error, (in rtable/Power) exponentiation operation not defined for Vectors - Maple Help

Home : Support : Online Help : System : Error Message Guide : exponentiationoperationnotdefinedforVectors

Error, (in rtable/Power) exponentiation operation not defined for Vectors

 Description This error message indicates that the exponentiation operation is not defined for Vectors, for example,  will produce an error. As such, when attempting division such as $\frac{A}{B}$,  Maple does not compute $\frac{A}{B}$  but instead tries to compute . In trying to raise B to the exponent -1, this produces an error.

Examples

In the following example, it is not clear whether element-wise division or the creation of a matrix is intended.

 > $A\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}:=\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}<1,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}2,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}3>;\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}B\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}:=\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}<4,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}5,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}6>;\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$
 ${A}{:=}\left[\begin{array}{r}{1}\\ {2}\\ {3}\end{array}\right]$
 ${B}{:=}\left[\begin{array}{r}{4}\\ {5}\\ {6}\end{array}\right]$ (2.1)
 > $\frac{A}{B}$

Solution:
To apply an operation, you must use the Zip or LinearAlgebra[Zip] commands.

 > $\mathrm{zip}(\mathrm{/},\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}A,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}B);$
 $\left[\begin{array}{c}\frac{{1}}{{4}}\\ \frac{{2}}{{5}}\\ \frac{{1}}{{2}}\end{array}\right]$ (2.2)
 > $\mathrm{LinearAlgebra}[\mathrm{Zip}](\mathrm{/},\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}A,\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}B);$
 $\left[\begin{array}{c}\frac{{1}}{{4}}\\ \frac{{2}}{{5}}\\ \frac{{1}}{{2}}\end{array}\right]$ (2.3)

For more information on the key data structures in Maple, see the User Manual, Chapter 8 and the help pages for expression sequences, sets, lists, tables, Arrays, Matrices, Vectors, functional operators, and strings.