DotProduct

As of Version 9.0, vector analysis functionality is built into the Wolfram Language

DotProduct[v1,v2]
gives the dot product of the two 3-vectors v1, v2 in the default coordinate system.

DotProduct[v1,v2,coordsys]
gives the dot product of v1 and v2 in the coordinate system coordsys.

更多信息更多信息

  • To use DotProduct, you first need to load the Vector Analysis Package using Needs["VectorAnalysis`"].
  • DotProduct[v1,v2,coordsys] is computed by converting v1 and v2 to Cartesian coordinates and then forming the dot product.

范例范例打开所有单元关闭所有单元

基本范例  (3)基本范例  (3)

In[1]:=
Click for copyable input

Dot product of two Cartesian vectors:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
In[1]:=
Click for copyable input

Verify that a pair of vectors are orthogonal:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
In[1]:=
Click for copyable input

Dot product of vectors in cylindrical coordinates:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

Compare with the result from conversion to Cartesian coordinates:

In[5]:=
Click for copyable input
Out[5]=
Translate this page: