Vectors
Details
- A valid dimension specification d in Vectors[d,dom] is any positive integer. It is also possible to work with symbolic dimension specifications.
- A valid component domain specification dom in Vectors[d,dom] is either Reals or Complexes.
- The domain Vectors[d] is automatically converted into Vectors[d,Complexes].
Examples
open all close allBasic Examples (1)
Scope (3)
Declare vectors of any dimension:
$Assumptions = (v | w)∈Vectors[10]Compute properties of tensors formed from those vectors:
vwv//TensorDimensionsvwv//TensorSymmetryWork with vectors in symbolic dimension:
$Assumptions = {v∈Vectors[d1], w∈Vectors[d2]};TensorContract[vwv, {{1, 3}}]//TensorRankTensorContract[vwv, {{1, 2}}]$Assumptions = v∈Vectors[3, Reals]Conjugate[v]//TensorReduceApplications (4)
Declare several objects as vectors:
$Assumptions = (a | b | c)∈Vectors[3];{TensorRank[a], TensorDimensions[b], TensorSymmetry[c]}a.(b⨯c) == b.(c⨯a)//TensorReduceCheck 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]Assuming[v∈Vectors[dim, Reals], Refine[v∈Vectors[dim, Complexes]]]$Assumptions = (a | b | c)∈Vectors[3];a.(b⨯c) == b.(c⨯a) == c.(a⨯b)%//TensorReduceCommutativity of the dot product with vectors:
a.b == b.a%//TensorReduceProperties & Relations (3)
Vectors can also be defined using 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]Possible Issues (4)
Addition of symbolic and explicit vectors is determined by the Listable attribute of 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]Vectors[0]{} is interpreted in a special way in Element, such that it returns True irrespectively of the domain used:
Element[{}, Vectors[3]]Element[{}, mydomain]See Also
Tech Notes
Related Guides
History
Text
Wolfram Research (2012), Vectors, Wolfram Language function, https://reference.wolfram.com/language/ref/Vectors.html.
CMS
Wolfram Language. 2012. "Vectors." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Vectors.html.
APA
Wolfram Language. (2012). Vectors. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Vectors.html
BibTeX
@misc{reference.wolfram_2026_vectors, author="Wolfram Research", title="{Vectors}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Vectors.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_vectors, organization={Wolfram Research}, title={Vectors}, year={2012}, url={https://reference.wolfram.com/language/ref/Vectors.html}, note=[Accessed: 13-June-2026]}