up
previous
next
4.6.1 Introduction to Vectors
An object of type VECTOR in CoCoA represents a vector of
polynomials. If V is a vector and F is a polynomial, then the
following are also vectors:
+V, -V, F*V, V*F.
If V and W are vectors with the same number of components, then one
may add and subtract V and W componentwise:
V+W, V-W.
example
Use R ::= Q[x,y];
V := Vector(x+1,y,xy^2);
V;
Vector(x + 1, y, xy^2)
-------------------------------
-V;
Vector(-x - 1, -y, -xy^2)
-------------------------------
x*V;
Vector(x^2 + x, xy, x^2y^2)
-------------------------------
W := Vector(x,y,x^2y^2-y);
x*V-W;
Vector(x^2, xy - y, y)
-------------------------------