LinearAlgebra
VectorAngle
compute the angle between two Vectors
Calling Sequence
Parameters
Description
Examples
VectorAngle(U, V, c)
U, V
-
Vectors with the same dimension
c
(optional) equation of the form conjugate=true or false; specifies if the result uses the Hermitian transpose
The VectorAngle(U, V) function computes the angle between Vectors U and V by using the formula arccos⁡DotProduct⁡U,V,cVectorNorm⁡U,2⁢VectorNorm⁡V,2. The default value for the conjugate option c is true.
This function is part of the LinearAlgebra package, and so it can be used in the form VectorAngle(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[VectorAngle](..).
with⁡LinearAlgebra:
V1≔1,0,1
V1≔101
V2≔1,1,0
V2≔110
VectorAngle⁡V1,V1
0
VectorAngle⁡V1,V2
π3
See Also
LinearAlgebra[DotProduct]
LinearAlgebra[VectorNorm]
Vector
Download Help Document