BaseVector

BaseVector

BaseVector[ a, b ] represents a vector in basis form, ai + bj.

Usages

BaseVector[ a, b ] and BaseVector[ a, b, c ]

BaseVector[ a, b ] represents the vector ai + bj, where a is the horizontal component and b the vertical component. With three arguments, BaseVector[ a, b, c ] represents ai + bj + ck. The components can be numbers or expressions.

Example in rendered
A vector in two dimensions. BaseVector[ 1, 2 ] i+2j\mathbf{i}+2\mathbf{j}
A vector in three dimensions. BaseVector[ 1, 2, 3 ] i+2j+3k\mathbf{i}+2\mathbf{j}+3\mathbf{k}
Components equal to 0 are left out. BaseVector[ -4, 0 ] -4i\text{-}4\mathbf{i}
Components can be expressions. BaseVector[ a, -b ] ai−bja\mathbf{i}-b\mathbf{j}
Details
  • BaseVector only represents the vector; in a script, it is not changed. Calculations with vectors, such as BaseVector[1, 2] + BaseVector[3, -1], are done by Simplify; the result is displayed as 4i+j4\mathbf{i}+\mathbf{j}.
  • Use ComponentForm to convert other vectors to basis form, and Magnitude and PolarForm to calculate the length and direction.

See also: Vector, PolarVector, ComponentForm, Magnitude