Vector
Vector
Vector[ a, b, ... ] represents a coordinate or vector with the given components.
Usages
Vector[ a, b, ... ] or Vector[ {a, b, ...} ]
Vector[ a, b, ... ] represents the coordinate or vector (a, b, ...). The components can also be given as a list. Any number of components is allowed.
| Example | in | rendered |
|---|---|---|
| A coordinate with two components. | Vector[ x, y ] |
|
| The components as a list. | Vector[ {x, y} ] |
Options
Name
A name that is displayed before the coordinates. The name must be text, such as Text[`A`] or BoldText[A].
| Syntax | Example | rendered |
|---|---|---|
Vector[ a, b, ..., Name=>name ] |
Vector[ x, y, Name=>BoldText[A] ] |
|
Vector[ x, y, z, Name=>Text[`A`] ] |
Orientation
Whether the vector is a row vector ('Horizontal') or a column vector ('Vertical'). For some audiences, the orientation affects how the vector is displayed and how it is used in calculations.
| Syntax | Example |
|---|---|
Vector[ a, b, ..., Orientation=>'Horizontal' ] |
Vector[ x, y, Orientation=>'Horizontal' ] |
Details
Vectoronly represents the coordinate or vector; in a script, it is not changed.- Column vectors:
CartesianVector[ a, b, ... ]represents a column vector:CartesianVector[ 3, 4 ]is displayed as . Calculations with column vectors, such asSimplify[ CartesianVector[3, 4] + CartesianVector[1, 1] ], give aVectorwithOrientation=>'Vertical', displayed as .
See also: BaseVector, PolarVector, VectorHarpoon, ComponentForm