官术网_书友最值得收藏!

Dot product

A dot product is a type of vector multiplication in which the resultant vector is a scalar. It is also referred to as a scalar product for the same reason. Scalar product of two vectors is the sum of the products of the corresponding components.

If you have two vectors A = (ax, ay, az) and B = (bx, by, bz), then  is given as:

 = ax ×bx + ay × by + az ×bz --- (1)

The dot product of two vectors is also equal to the cosine of the angle between the vectors multiplied by the magnitudes of both vectors. Notice the dot product is  represented as a dot between the vector.

θ is always between 0 and π. By putting an equation of 1 and 2 together, we can figure out the angle between 2 vectors:

* )

Consequently,

This form has some unique geometric properties:

If = 0 then  is perpendicular to  as cos 90 = 0.

 =   then the 2 vectors are parallel to each other as cos 0 = 1.

If > 0 then the angle between the vectors is less than 90 degrees.

If < 0 then the angle between the vectors is greater than 90 degrees.

Let us see an example of a dot product:

If = (3, -5, 7) and   = (2, 4 , 1)

Then  = 9.110 and

Next, we calculate = ax *bx + ay * by + az * bz

 = 3 * 2 + (-5) * 4 + 7 * 1

          = 6 - 20 + 7

          = -7

cos θ = -7/ (9.110 * 4.582) = -7/ 41.74

θ = cos-1(-7/41.74) = cos-1(0.26770) = 99.65° (approx)

主站蜘蛛池模板: 灌阳县| 斗六市| 河津市| 武强县| 苍梧县| 南汇区| 沧州市| 理塘县| 民权县| 佳木斯市| 瑞金市| 丹巴县| 永泰县| 成都市| 宁河县| 阳东县| 和田市| 尚志市| 博罗县| 泰顺县| 玉门市| 乌拉特前旗| 巴彦淖尔市| 芜湖县| 徐闻县| 油尖旺区| 潜山县| 亳州市| 望城县| 德格县| 获嘉县| 益阳市| 化州市| 闽清县| 平利县| 大悟县| 虎林市| 报价| 西和县| 美姑县| 阳曲县|