({{, (RefLink[Vectors, paclet:ref/Vectors])[d] 
represents the domain of vectors of dimension d.}, {, (RefLink[Vectors, paclet:ref/Vectors])[d,dom]
represents the domain of vectors of dimension d, with components in the domain dom.}})

OpenersNotesSection(Spacer1)Details

A valid dimension specification d in (RefLink[Vectors, paclet:ref/Vectors])[d,dom] is any positive integer. It is also possible to work with symbolic dimension specifications.

A valid component domain specification dom in (RefLink[Vectors, paclet:ref/Vectors])[d,dom] is either (RefLink[Reals, paclet:ref/Reals]) or (RefLink[Complexes, paclet:ref/Complexes]).

The domain (RefLink[Vectors, paclet:ref/Vectors])[d] is automatically converted into (RefLink[Vectors, paclet:ref/Vectors])[d,(RefLink[Complexes, paclet:ref/Complexes])].

OpenersPrimaryExamplesSection(Spacer1)Examples  (15)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

A vector in dimension 3:

$Assumptions=v∈Vectors[3]

Properties of tensor products of the vector:

v⊗v⊗v//TensorDimensions

An identity valid for any three-dimensional vector:

Cross[v,v]//TensorReduce

OpenersExampleSection1(Spacer1)Scope  (3)

Declare vectors of any dimension:

$Assumptions=(v|w)∈Vectors[10]

Compute properties of tensors formed from those vectors:

v⊗w⊗v//TensorDimensions

v⊗w⊗v//TensorSymmetry

Work with vectors in symbolic dimension:

$Assumptions={v∈Vectors[d1],w∈Vectors[d2]};

TensorContract[v⊗w⊗v,{{1,3}}]//TensorRank

TensorContract[v⊗w⊗v,{{1,2}}]

A real vector:

$Assumptions=v∈Vectors[3,Reals]

Conjugate[v]//TensorReduce

OpenersExampleSection3(Spacer1)Applications  (4)

Declare several objects as vectors:

$Assumptions=(a|b|c)∈Vectors[3];

Extract their properties:

{TensorRank[a],TensorDimensions[b],TensorSymmetry[c]}

Check identities:

a.(b\[Cross]c)==b.(c\[Cross]a)//TensorReduce

Check whether a vector belongs to a given domain:

{1,Pi,I}∈Vectors[3,Complexes]

{1,Pi,I}∈Vectors[3,Reals]

Conditions involving symbolic parameters may be converted into simpler conditions:

{1,Pi,I}∈Vectors[d,Complexes]

{(Subscript[x, 1]),(Subscript[x, 2])}∈Vectors[2,Reals]

Check a subdomain relation:

Assuming[v∈Vectors[dim,Reals],Refine[v∈Vectors[dim,Complexes]]]

Check vector identities:

$Assumptions=(a|b|c)∈Vectors[3];

a.(b\[Cross]c)==b.(c\[Cross]a)==c.(a\[Cross]b)

%//TensorReduce

Commutativity of the dot product with vectors:

a.b==b.a

%//TensorReduce

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

Vectors can also be defined using (RefLink[Arrays, paclet:ref/Arrays]) with rank 1. These two assumptions are equivalent:

$Assumptions=v∈Arrays[{4}]

$Assumptions=v∈Vectors[4]

Vectors cannot contain other lists:

Element[{{1,2},3},Vectors[2]]

Two alternative ways of checking numerical vectors:

Element[{2.,3E,I+1},Vectors[3,Complexes]]

VectorQ[{2.,3E,I+1},NumericQ]

OpenersExampleSection5(Spacer1)Possible Issues  (4)

Addition of symbolic and explicit vectors is determined by the (RefLink[Listable, paclet:ref/Listable]) attribute of (RefLink[Plus, paclet:ref/Plus]):

Assuming[v∈Vectors[2],v+{1,2}]

Hence, listability will in general affect operations that simultaneously involve both symbolic and explicit vectors.

The zero vector may be represented as 0 in symbolic computations:

Assuming[v∈Vectors[2],v-v]

Dimension 0 is not accepted:

Vectors[0]

{} is interpreted in a special way in (RefLink[Element, paclet:ref/Element]), such that it returns (RefLink[True, paclet:ref/True]) irrespectively of the domain used:

Element[{},Vectors[3]]

Element[{},mydomain]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Arrays, paclet:ref/Arrays])  ▪  (RefLink[Matrices, paclet:ref/Matrices])  ▪  (RefLink[VectorQ, paclet:ref/VectorQ])  ▪  (RefLink[TensorRank, paclet:ref/TensorRank])  ▪  (RefLink[TensorDimensions, paclet:ref/TensorDimensions])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Symbolic Tensors, paclet:tutorial/SymbolicTensors])}, {▪(RefLinkPlain[Tensor Symmetries, paclet:tutorial/TensorSymmetries])}, {▪(RefLinkPlain[Symmetrized Arrays, paclet:tutorial/SymmetrizedArrays])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Symbolic Tensors, paclet:guide/SymbolicTensors])}})}})