VectorAngle - Maple Help

LinearAlgebra

 VectorAngle
 compute the angle between two Vectors

 Calling Sequence VectorAngle(U, V, c)

Parameters

 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

Description

 • The VectorAngle(U, V) function computes the angle between Vectors U and V by using the formula $\mathrm{arccos}\left(\frac{\mathrm{DotProduct}\left(U,V,c\right)}{\mathrm{VectorNorm}\left(U,2\right)\mathrm{VectorNorm}\left(V,2\right)}\right)$. 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](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{V1}≔⟨1,0,1⟩$
 ${\mathrm{V1}}{≔}\left[\begin{array}{c}{1}\\ {0}\\ {1}\end{array}\right]$ (1)
 > $\mathrm{V2}≔⟨1,1,0⟩$
 ${\mathrm{V2}}{≔}\left[\begin{array}{c}{1}\\ {1}\\ {0}\end{array}\right]$ (2)
 > $\mathrm{VectorAngle}\left(\mathrm{V1},\mathrm{V1}\right)$
 ${0}$ (3)
 > $\mathrm{VectorAngle}\left(\mathrm{V1},\mathrm{V2}\right)$
 $\frac{{\mathrm{\pi }}}{{3}}$ (4)