VectorCalculus
DotProduct
computes the dot product of Vectors and differential operators
Calling Sequence
Parameters
Description
Examples
DotProduct(v1, v2)
v1 . v2
v1
-
Vector(algebraic); Vector, Vector-valued procedure, or differential operator
v2
The DotProduct(v1, v2) command (scalar product) computes the dot product of v1 and v2, where v1 and v2 can be free Vectors, rooted Vectors, position Vectors, vector fields, Del or Nabla.
The function can be accessed through . or DotProduct exports.
If v2 is a VectorField, the divergence of v2 can be computed as DotProduct(Del, v2), or ∇.v2.
If v1 is a VectorField, an operator representing the directional derivative in the direction of v1 is obtained as DotProduct(v1, Del), or v1.∇.
The behavior of the dot product of two Vectors is described by the following table:
coord (v1)
coord (v2)
v1·v2
1
free Vector
cartesian
scalar
curved
any
error
2
rooted Vector (root2)
coord2
3
vector field
4
position Vector
5
rooted Vector (root1)
coord1
rooted Vector (any)
6
v1·v2⁡root1
7
8
scalar field
9
10
restart
with⁡VectorCalculus:
Take the dot product of two free Vectors in cartesian coordinates.
1,1,1·−1,−1,1
−1
v1≔Vector⁡1,−1,2,coordinates=cartesianx,y,z
v1≔1−12
v2≔Vector⁡0,1,1,coordinates=cartesianx,y,z
v2≔011
DotProduct⁡v1,v2
Take the dot product of two rooted vectors if they have the same coordinate system and root point.
vs≔VectorSpace⁡1,π3,π3,sphericalr,p,t
vs ≔ modulelocal_origin,_coords,_coords_dim;exportGetCoordinates,GetRootPoint,Vector,eval;end module
v1≔RootedVector⁡root=vs,1,1,1
v1≔111
v2≔RootedVector⁡root=vs,−1,1,0
v2≔−110
0
The dot product of a cartesian free Vector and a rooted Vector is valid.
v1≔RootedVector⁡root=1,π4,1,1,1,1,cylindricalr,p,h
v2≔Vector⁡0,0,1,coordinates=cartesianx,y,z
v2≔001
v2·v1
The dot product of two vector fields is defined if they are in the same coordinate system.
vf1≔VectorField⁡r,φ,θ,sphericalr,φ,θ
vf2≔VectorField⁡r2,φ+θ,0,sphericalr,φ,θ
DotProduct⁡vf1,vf2
r3+φ⁢φ+θ
Use differential operators to compute the divergence of a vector field.
vf1≔VectorField⁡x,−y⁢z,z,cartesianx,y,z
Del·vf1
2−z
vf2≔VectorField⁡r⁢t,φ,t,cylindricalr,φ,t
Del·vf2
2⁢r⁢t+r+1r
Construct a directional derivative operator.
V≔VectorField⁡x,−y⁢z,z,cartesianx,y,z
W≔VectorField⁡y⁢z,x⁢z,x⁢y,cartesianx,y,z
V·Del⁡W
The dot product of two position vectors is defined.
pv1≔PositionVector⁡p,p,polarr,t
pv1≔p⁢cos⁡pp⁢sin⁡p
pv2≔PositionVector⁡1,p,parabolicu,v
pv2≔12−p22p
pv1·pv2
p⁢cos⁡p⁢12−p22+p2⁢sin⁡p
The dot product of a cartesian free Vector and a cartesian vector field is defined.
vf3≔VectorField⁡y⁢z,x⁢z,x⁢y,cartesianx,y,z
v3≔Vector⁡1,2,1,coordinates=cartesianx,y,z
v3≔121
vf3·v3
x⁢y+2⁢x⁢z+y⁢z
See Also
LinearAlgebra[DotProduct]
VectorCalculus[Del]
VectorCalculus[Divergence]
VectorCalculus[Laplacian]
VectorCalculus[PositionVector]
VectorCalculus[RootedVector]
VectorCalculus[Vector]
VectorCalculus[VectorField]
Download Help Document