DotProduct
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.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
VectorAnalysis`
VectorAnalysis`
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.
Details and Options
- 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.
Examples
Basic Examples (3)
Needs["VectorAnalysis`"]Dot product of two Cartesian vectors:
a = {1, 2, 5};b = {2, 3, -7};DotProduct[a, b]Needs["VectorAnalysis`"]Verify that a pair of vectors are orthogonal:
a = {1, 3, -1};b = {2, 5, 17};DotProduct[a, b]Needs["VectorAnalysis`"]Dot product of vectors in cylindrical coordinates:
a = {1 / 3, 1 / 2, 7};b = {1 / 2, 1 / 5, 1};DotProduct[a, b, Cylindrical]//SimplifyCompare with the result from conversion to Cartesian coordinates:
DotProduct[CoordinatesToCartesian[a, Cylindrical], CoordinatesToCartesian[b, Cylindrical]]//Simplify