# Encyclopedia

.In mathematics, the dot product is an algebraic operation that takes two equal-length sequences of numbers (usually coordinate vectors) and returns a single number obtained by multiplying corresponding entries and adding up those products.^ The Dot Product of two vectors .

^ Using a Dot Product, we can obtain the angle between two vectors A and B as follows: .
• GameDev.net - Game Dictionary 31 January 2010 12:38 UTC www.gamedev.net [Source type: General]

^ We'll take the dot product of PQ with PR, and then we'll divide by the lengths.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

.The name is derived from the dot that is often used to designate this operation; the alternative name scalar product emphasizes the scalar (rather than vector) nature of the result.^ Using the vector dot product for back-face culling.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ Because the dot product converts from a vector to a scalar.
• Maths - Vectors - Martin Baker 31 January 2010 12:38 UTC www.euclideanspace.com [Source type: FILTERED WITH BAYES]

^ And the resulting vector dot-product is easily calculated with Microsoft Excel.
• Vector Dot-Product in Microsoft Excel | NeoHide 31 January 2010 12:38 UTC www.neohide.com [Source type: General]

.The principal use of this product is the inner product in a Euclidean vector space: when two vectors are expressed on an orthonormal basis, the dot product of their coordinate vectors gives their inner product.^ Also called dot product , inner product .
• Dot product | Definition of Dot product at Dictionary.com: 31 January 2010 12:38 UTC dictionary.reference.com [Source type: General]

^ Definition: In any inner product space we can define the magnitude of a vector, v by .
• Mathematical Structure -- Inner Product Spaces 31 January 2010 12:38 UTC www.math.montana.edu [Source type: Academic]

^ The Dot Product of two vectors .

.For this geometric interpretation, scalars must be taken to be real numbers; while the dot product can be defined in a more general setting (for instance with complex numbers as scalars) many properties would be different.^ For any two vectors, the dot product is defined as: .

^ It is easy to show that the dot product we have defined for R n has the following properties, called the dot product properties .
• Mathematical Structure -- Inner Product Spaces 31 January 2010 12:38 UTC www.math.montana.edu [Source type: Academic]

^ The dot product is also called the scalar product and inner product .
• Dot Product -- from Wolfram MathWorld 31 January 2010 12:38 UTC mathworld.wolfram.com [Source type: Academic]

.The dot product contrasts (in three dimensional space) with the cross product, which produces a vector as result.^ The Dot Product of two vectors .

^ Dot product is zero if vectors are perpendicular.
• FORUM.CPP4U.COM :: View topic - Dot product and cross product 31 January 2010 12:38 UTC forum.cpp4u.com [Source type: FILTERED WITH BAYES]
• FORUM.CPP4U.COM :: View topic - Dot product and cross product 31 January 2010 12:38 UTC forum.cpp4u.com [Source type: FILTERED WITH BAYES]

^ For any two vectors, the dot product is defined as: .

## Definition

.The dot product of two vectors a = [a1, a2, ...^ When writing down two vectors multiplied in this way, you must include the dot between them.
• The scalar or dot product 31 January 2010 12:38 UTC www.netcomuk.co.uk [Source type: FILTERED WITH BAYES]

^ Next, you learned how to use the dot product to find six of the infinite set of vectors that are perpendicular to a given vector as shown in Figure 3.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ Notice, the dot product is a scalar (i.e., a number as opposed to a vector quantity).
• vector 31 January 2010 12:38 UTC www.mecca.org [Source type: Reference]

, an] and b = [b1, b2, ... , bn] is defined as:
$\mathbf{a}\cdot \mathbf{b} = \sum_{i=1}^n a_ib_i = a_1b_1 + a_2b_2 + \cdots + a_nb_n$
where Σ denotes summation notation and n is the dimension of the vectors.
.In dimension 2, the dot product of vectors [a,b] and [c,d] is ac + bd.^ Next, you learned how to use the dot product to find six of the infinite set of vectors that are perpendicular to a given vector as shown in Figure 3.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ Topic Title : Vector Dot Product Topic Summary : Created On : 11/16/2009 11:06 PM Status : Post and Reply .
• AMD Developer Forums Forums - Vector Dot Product 31 January 2010 12:38 UTC forums.amd.com [Source type: General]
• AMD Developer Forums Forums - Vector Dot Product 31 January 2010 12:38 UTC forums.amd.com [Source type: General]

^ The dot product of vectors A and B will have the following relationship to these values: .
• Understanding the Dot Product 31 January 2010 12:38 UTC www.mvps.org [Source type: Academic]

.Similarly, in a dimension 3, the dot product of vectors [a,b,c] and [d,e,f] is ad + be + cf.^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Next, you learned how to use the dot product to find six of the infinite set of vectors that are perpendicular to a given vector as shown in Figure 3.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ Topic Title : Vector Dot Product Topic Summary : Created On : 11/16/2009 11:06 PM Status : Post and Reply .
• AMD Developer Forums Forums - Vector Dot Product 31 January 2010 12:38 UTC forums.amd.com [Source type: General]
• AMD Developer Forums Forums - Vector Dot Product 31 January 2010 12:38 UTC forums.amd.com [Source type: General]

For example, the dot product of two three-dimensional vectors [1, 3, −5] and [4, −2, −1] is
$[1, 3, -5] \cdot [4, -2, -1] = 1 imes4 + 3 imes-2 + -5 imes-1 = 3.$
The dot product can also be obtained via transposition and matrix multiplication as follows:
$\mathbf{a} \cdot \mathbf{b} = \mathbf{a}^\mathrm{T}\,\mathbf{b},$
where both vectors are interpreted as .column vectors, and aT denotes the transpose of a, in other words the corresponding row vector.^ We can transpose a matrix by switching its rows with its columns.
• Dot product in matrix notation 31 January 2010 12:38 UTC www.math.umn.edu [Source type: Academic]

^ When you multiply a two-dimensional column vector with this matrix, you take two dot-products, one with the upper row and one with the lower row.
• dot product@Everything2.com 31 January 2010 12:38 UTC everything2.com [Source type: General]

^ Vectors are strongly related to matrices, they can be considered as a one directional matrix, or conversely, we could construct a matrix from a vector (drawn as a column) whose elements are themselves vectors (drawn as a row) : .
• Maths - Vectors - Martin Baker 31 January 2010 12:38 UTC www.euclideanspace.com [Source type: FILTERED WITH BAYES]

## Geometric interpretation

AB = |A| |B| cos(θ).
|A| cos(θ) is the scalar projection of A onto B.
.In Euclidean geometry, the dot product, length, and angle are related.^ Dot product > Related Articles .
• Dot product - Related Articles - Citizendium 31 January 2010 12:38 UTC en.citizendium.org [Source type: Academic]

^ Dot product - Related Articles - Citizendium .
• Dot product - Related Articles - Citizendium 31 January 2010 12:38 UTC en.citizendium.org [Source type: Academic]

^ Using a Dot Product, we can obtain the angle between two vectors A and B as follows: .
• GameDev.net - Game Dictionary 31 January 2010 12:38 UTC www.gamedev.net [Source type: General]

For a vector a, the dot product a · a is the square of the length of a, or
$|\mathbf{a}| = \sqrt{\mathbf{a} \cdot \mathbf{a}}$
where |a| denotes the length (magnitude) of a. More generally, if b is another vector
$\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| \, |\mathbf{b}| \cos heta \,$
where |a| and |b| denote the length of a and b and θ is the angle between them.
Thus, given two vectors, the angle between them can be found by rearranging the above formula:
$heta = \arccos \left( \frac {\bold{a}\cdot\bold{b}} {|\bold{a}||\bold{b}|}\right).$
.The cosine of the angle is returned because each vector a and b become unit vectors when we divide by the length.^ If we divide the x, y and z component of a vector with the length of the vector we can create a unit vector from any vector : .
• Dot product & cross product in 3D - un knol de Koen Samyn 31 January 2010 12:38 UTC knol.google.com [Source type: Reference]

^ A vector with length 1 is called a unit vector.
• Dot product & cross product in 3D - un knol de Koen Samyn 31 January 2010 12:38 UTC knol.google.com [Source type: Reference]

^ Any vector can be made into a unit vector by dividing it by its length.
• Vector Algebra: 31 January 2010 12:38 UTC emweb.unl.edu [Source type: Reference]

$\boldsymbol{\hat{a}} = \frac{\bold{a}}{|\bold{a}|}$ is the unit vector.
.The terminal points of both unit vectors lie on the unit circle.^ The projection is then the vector that is parallel to , starts at the same point both of the original vectors started at and ends where the dashed line hits the line parallel to .
• http://tutorial.math.lamar.edu/Classes/CalcII/DotProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Dot products are negative whenever both vectors don't lie in the same half-space the angle between the vectors is more than 90º.
• xkcd • View topic - Norm of a dot product 31 January 2010 12:38 UTC forums.xkcd.com [Source type: General]

^ Length Deﬁnition Given a vector v, its length is the distance between its initial and terminal points.
• Lesson 2: Vectors and the Dot Product 31 January 2010 12:38 UTC www.slideshare.net [Source type: Reference]

The unit circle is where the trigonometric values for the six trig functions are found. After substitution, the first vector component is cosine and the second vector component is sine, i.e. (cos x, sin x) for some angle x. .The dot product of the two unit vectors then takes <cos x, sin x><cos y, sin y> for angles x, y and returns (cos x)(cos y) + (sin x)(sin y) = cos(xy) where xy = theta.^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Next, you learned how to use the dot product to find six of the infinite set of vectors that are perpendicular to a given vector as shown in Figure 3.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ Recall that in R 2 we had In this vector space the Cauchy-Schwartz Inequality is immediately evident because |cos theta| <= 1 .
• Mathematical Structure -- Inner Product Spaces 31 January 2010 12:38 UTC www.math.montana.edu [Source type: Academic]

.As the cosine of 90° is zero, the dot product of two orthogonal vectors is always zero.^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ The condition of two perpendicular vectors in terms of dot product is given by : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Vector dot product - MATLAB Home .
• Vector dot product - MATLAB 31 January 2010 12:38 UTC www.mathworks.com [Source type: Academic]

.Moreover, two vectors can be considered orthogonal if and only if their dot product is zero, and they have non-null length.^ Given two vectors A and B each with n components, the dot product is calculated as: .
• Understanding the Dot Product 31 January 2010 12:38 UTC www.mvps.org [Source type: Academic]

^ The condition of two perpendicular vectors in terms of dot product is given by : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Dot product is zero if vectors are perpendicular.
• FORUM.CPP4U.COM :: View topic - Dot product and cross product 31 January 2010 12:38 UTC forum.cpp4u.com [Source type: FILTERED WITH BAYES]
• FORUM.CPP4U.COM :: View topic - Dot product and cross product 31 January 2010 12:38 UTC forum.cpp4u.com [Source type: FILTERED WITH BAYES]

.This property provides a simple method to test the condition of orthogonality.^ This is very important for people like us: it means that the dot product provides a test for orthogonality.

.Sometimes these properties are also used for defining the dot product, especially in 2 and 3 dimensions; this definition is equivalent to the above one.^ Next suppose that , then from the definition of the dot product we have, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Dot product definitions and examples at Texas A&M .

^ That is the problem with this definition of the dot product.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

.For higher dimensions the formula can be used to define the concept of angle.^ In cartesian coordinates of dimension n> 3 it has to be defined in a different way because it is no longer possible to visualize an "angle" between two vectors and there is no "natural" definition for it.
• Dot product - encyclopedia article - Citizendium 31 January 2010 12:38 UTC en.citizendium.org [Source type: Academic]

^ The formula from this theorem is often used not to compute a dot product but instead to find the angle between two vectors.
• http://tutorial.math.lamar.edu/Classes/CalcII/DotProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ This demo allows the instructor to tie together the concepts of dot product and a function—we use dot products to define a function that can be graphed in the plane.
• Making Connections: Functions from Dot Products 31 January 2010 12:38 UTC mathdemos.gcsu.edu [Source type: Reference]

The geometric properties rely on the basis being orthonormal, i.e. composed of pairwise perpendicular vectors with unit length.

### Scalar projection

If both a and b have length one (i.e. they are unit vectors), their dot product simply gives the cosine of the angle between them.
If only b is a unit vector, then the dot product a · b gives |a| cos(θ), i.e. the magnitude of the projection of a in the direction of b, with a minus sign if the direction is opposite. .This is called the scalar projection of a onto b, or scalar component of a in the direction of b (see figure).^ If one were to take the dot product of a unit vector A and a second vector B of any non-zero length, the result is the length of vector B projected in the direction of vector A (see illustration to left).
• Understanding the Dot Product 31 January 2010 12:38 UTC www.mvps.org [Source type: Academic]

^ And if we normalize B before computing the dot product the scalar projection of A onto B is equal to A â€¢ B .
• Path Following + Dot Product at daniel shiffman 31 January 2010 12:38 UTC www.shiffman.net [Source type: FILTERED WITH BAYES]

^ So, one additional application I think we'll see actually tomorrow is to find the components of a vector along a certain direction.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

.This property of the dot product has several useful applications (for instance, see next section).^ Next suppose that , then from the definition of the dot product we have, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ I see this even in a plain dot product.
• Sun Studio C - Sun CC with SSE intrinsics, compared to GCC (dot product test attached) 31 January 2010 12:38 UTC forums.sun.com [Source type: FILTERED WITH BAYES]

^ So, what are the applications of dot product?
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

.If neither a nor b is a unit vector, then the magnitude of the projection of a in the direction of b, for example, would be a · (b / |b|) as the unit vector in the direction of b is b / |b|.^ The base vectors of a rectangular coordinate system are given by a set of three mutually orthogonal unit vectors denoted by , , and that are along the x , y , and z coordinate directions, respectively, as shown in the figure.
• Vector Algebra: 31 January 2010 12:38 UTC emweb.unl.edu [Source type: Reference]

^ The rule for vectors given in terms of magnitude and direction (in either 2 or 3 dimensions), where θ denotes the angle between them, is: .
• SparkNotes: Vector Multiplication: The Dot Product 31 January 2010 12:38 UTC www.sparknotes.com [Source type: General]

^ In order that magnitude of resultant does not change even after reversing direction of one of the vectors, it is required that the included angle between the vectors is not changed.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

### Rotation

.A rotation of the orthonormal basis in terms of which vector a is represented is obtained with a multiplication of a by a rotation matrix R.^ Let B be any orthonormal basis, and let u, v be vectors.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ When vectors are represented in terms of base vectors and components, addition of two vectors results in the addition of the components of the vectors.
• Vector Algebra: 31 January 2010 12:38 UTC emweb.unl.edu [Source type: Reference]

.This matrix multiplication is just a compact representation of a sequence of dot products.^ We’ve already got computed so we just need to do a couple of dot products and according to Theorem 6 both u and v are orthogonal to and so we should get zero out of both of these.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Since the basis vectors are orthonormal, eiei=ei dot ei=1 and, if i and j are not equal eiej=ei/\ej, so that the pseudoscalar I is just the exterior product.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ So, in the second one there isn't a cosine theta because I'm just expanding a dot product.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

For instance, let
• B1 = {x, y, z} and B2 = {u, v, w} be two different orthonormal bases of the same space R3, with B2 obtained by just rotating B1,
• a1 = (ax, ay, az) represent vector a in terms of B1,
• a2 = (au, av, aw) represent the same vector in terms of the rotated basis B2,
• u1, v1, w1 be the rotated basis vectors u, v, w represented in terms of B1.
Then the rotation from B1 to B2 is performed as follows:
$\bold a_2 = \bold{Ra}_1 = \begin{bmatrix} u_x & u_y & u_z \\ v_x & v_y & v_z \\ w_x & w_y & w_z \end{bmatrix} \begin{bmatrix} a_x \\ a_y \\ a_z \end{bmatrix} = \begin{bmatrix} \bold u_1\cdot\bold a_1 \\ \bold v_1\cdot\bold a_1 \\ \bold w_1\cdot\bold a_1 \end{bmatrix} = \begin{bmatrix} a_u \\ a_v \\ a_w \end{bmatrix} .$
.Notice that the rotation matrix R is assembled by using the rotated basis vectors u1, v1, w1 as its rows, and these vectors are unit vectors.^ Each of these have a magnitude of 1 and so are unit vectors.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Notice that any vector in 3-space, say , can be written in terms of these three vectors as follows, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ The standard basis , which we use to represent vectors in 3-D space, has e 1 pointing forward, e 2 left and e 3 up.

.By definition, Ra1 consists of a sequence of dot products between each of the three rows of R and vector a1.^ Next suppose that , then from the definition of the dot product we have, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ This means that the angle between them is and so from the definition of the dot product we have, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ That is the problem with this definition of the dot product.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

.Each of these dot products determines a scalar component of a in the direction of a rotated basis vector (see previous section).^ Because the dot product converts from a vector to a scalar.
• Maths - Vectors - Martin Baker 31 January 2010 12:38 UTC www.euclideanspace.com [Source type: FILTERED WITH BAYES]

^ The cross product and dot product of vectors .
• dot product or cross product? 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ The scalar or dot product of vectors measures the angle between them, in a way.
• Lesson 2: Vectors and the Dot Product 31 January 2010 12:38 UTC www.slideshare.net [Source type: Reference]

If a1 is a row vector, rather than a column vector, then R must contain the rotated basis vectors in its columns, and must post-multiply a1:
$\bold a_2 = \bold a_1 \bold R = \begin{bmatrix} a_x & a_y & a_z \end{bmatrix} \begin{bmatrix} u_x & v_x & w_x \\ u_y & v_y & w_y \\ u_z & v_z & w_z \end{bmatrix} = \begin{bmatrix} \bold u_1\cdot\bold a_1 & \bold v_1\cdot\bold a_1 & \bold w_1\cdot\bold a_1 \end{bmatrix} = \begin{bmatrix} a_u & a_v & a_w \end{bmatrix} .$

## Physics

In physics, magnitude is a scalar in the physical sense, i.e. a physical quantity independent of the coordinate system, expressed as the product of a numerical value and a physical unit, not just a number. .The dot product is also a scalar in this sense, given by the formula, independent of the coordinate system.^ Given the two vectors and the dot product is, .
• http://tutorial.math.lamar.edu/Classes/CalcII/DotProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Sometimes the dot product is called the scalar product .
• http://tutorial.math.lamar.edu/Classes/CalcII/DotProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ The dot product of vectors A and B results in a scalar given by the relation .
• Vector Algebra: 31 January 2010 12:38 UTC emweb.unl.edu [Source type: Reference]

.The formula in terms of coordinates is evaluated with not just numbers, but numbers times units.^ So, the vector you can try to decompose terms of unit vectors directed along the coordinate axis.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

.Therefore, although it relies on the basis being orthonormal, it does not depend on scaling.^ It's not too hard to check that this makes w a well-defined (i.e., it doesn't depend on the original choice of orthonormal basis) pseudovector.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

Example:

## Properties

.The following properties hold if a, b, and c are real vectors and r is a scalar.^ Properties Theorem Given vectors a, b, and c and scalars c and d, we have 1.
• Lesson 2: Vectors and the Dot Product 31 January 2010 12:38 UTC www.slideshare.net [Source type: Reference]

^ (Scalar Multiplication Property) For any two vectors A and B and any real number c, (cA) .

^ (But there really is a distinction between a scalar and a one dimensional vector.
• xkcd • View topic - Norm of a dot product 31 January 2010 12:38 UTC forums.xkcd.com [Source type: General]

The dot product is commutative:
$\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}.$
The dot product is distributive over vector addition:
$\mathbf{a} \cdot (\mathbf{b} + \mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}.$
The dot product is bilinear:
$\mathbf{a} \cdot (r\mathbf{b} + \mathbf{c}) = r(\mathbf{a} \cdot \mathbf{b}) +(\mathbf{a} \cdot \mathbf{c}).$
When multiplied by a scalar value, dot product satisfies:
$(c_1\mathbf{a}) \cdot (c_2\mathbf{b}) = (c_1c_2) (\mathbf{a} \cdot \mathbf{b})$
.(these last two properties follow from the first two).^ The first two properties deserve some closer inspection.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ L(a+b) = L(a) + L(b) and L(s*a) = s * L(a) The first of these relates to vector addition, which has the following properties: .
• Maths - Vectors - Martin Baker 31 January 2010 12:38 UTC www.euclideanspace.com [Source type: FILTERED WITH BAYES]

Two non-zero vectors a and b are perpendicular if and only if ab = 0.
Unlike multiplication of ordinary numbers, where if ab = ac, then b always equals c unless a is zero, the dot product does not obey the cancellation law:
If a.b = ac and a0, then we can write: a • (bc) = 0 by the distributive law; the result above says this just means that a is perpendicular to (bc), which still allows (bc) ≠ 0, and therefore bc.^ OK, so orthogonality is just a complicated word from Greek to say things are perpendicular.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

^ The conceptualization of physical laws in vector form, however, provides us with powerful means to arrive at the result in relatively simpler manner.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

.Provided that the basis is orthonormal, the dot product is invariant under isometric changes of the basis: rotations, reflections, and combinations, keeping the origin fixed.^ Since the basis vectors are orthonormal, eiei=ei dot ei=1 and, if i and j are not equal eiej=ei/\ej, so that the pseudoscalar I is just the exterior product.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ If the vectors are expressed in coordinates, relative to an orthonormal basis (ie a basis where all the basis vectors are orthogonal and have length 1), then the formula for the dot product in n-dimensional space can be shown to be: .

^ The dot products of combination of different unit vectors evaluate to zero.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

The above mentioned geometric interpretation relies on this property. .In other words, for an orthonormal space with any number of dimensions, the dot product is invariant under a coordinate transformation based on an orthogonal matrix.^ Dot Product (aka Scalar Product) in 2 Dimensions .
• 5. Dot Product (aka Scalar Product) - in 2 Dimensions 31 January 2010 12:38 UTC www.intmath.com [Source type: Academic]

^ If the vectors are expressed in coordinates, relative to an orthonormal basis (ie a basis where all the basis vectors are orthogonal and have length 1), then the formula for the dot product in n-dimensional space can be shown to be: .

^ The purpose is to accept // x, y, and z coordinate values and transform those // values into a pair of coordinate values suitable for // display in two dimensions.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

This corresponds to the following two conditions:
• The new basis is again orthonormal (i.e., it is orthonormal expressed in the old one).
• The new base vectors have the same length as the old ones (i.e., unit length in terms of the old basis).
If a and b are functions, then the derivative of ab is a'b + ab'

## Triple product expansion

.This is a very useful identity (also known as Lagrange's formula) involving the dot- and cross-products.^ Re: dot product or cross product?
• dot product or cross product? 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ Similar Threads for: dot product or cross product?
• dot product or cross product? 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ The cross product and dot product of vectors .
• dot product or cross product? 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

It is written as
$\mathbf{a} imes (\mathbf{b} imes \mathbf{c}) = \mathbf{b}(\mathbf{a}\cdot\mathbf{c}) - \mathbf{c}(\mathbf{a}\cdot\mathbf{b})$
which is easier to remember as ."BAC minus CAB", keeping in mind which vectors are dotted together.^ Yearg, what is true is that each vector defines a half space (those vectors who dot with it to be nonnegative), but of course, any two vectors lie in SOME half space together.
• xkcd • View topic - Norm of a dot product 31 January 2010 12:38 UTC forums.xkcd.com [Source type: General]

.This formula is commonly used to simplify vector calculations in physics.^ This is highly efficient for operating on 4 by 4 matrices and 4-element vectors, but efficiency is reduced when operating on 3 by 3 and 5 by 5 matrices, which are commonly used in image processing algorithms.
• SIMD DOT PRODUCT OPERATIONS WITH OVERLAPPED OPERANDS - Patent application 31 January 2010 12:38 UTC www.faqs.org [Source type: Reference]

^ Vector multiplication (cross and dot product) can be very useful in physics but it also has its limitations and Geometric Algebra defines a new, more general, type of multiplication.
• Maths - Vectors - Martin Baker 31 January 2010 12:38 UTC www.euclideanspace.com [Source type: FILTERED WITH BAYES]

^ First we use the Pythagorean formula to calculate the length a : .
• Dot product & cross product in 3D - un knol de Koen Samyn 31 January 2010 12:38 UTC knol.google.com [Source type: Reference]

## Proof of the geometric interpretation

Consider the element of Rn
$\mathbf{v} = v_1 \mathbf{\hat{e}}_1 + v_2 \mathbf{\hat{e}}_2 + ... + v_n \mathbf{\hat{e}}_n. \,$
Repeated application of the Pythagorean theorem yields for its length |v|
$|\mathbf{v}|^2 = v_1^2 + v_2^2 + ... + v_n^2. \,$
But this is the same as
$\mathbf{v} \cdot \mathbf{v} = v_1^2 + v_2^2 + ... + v_n^2, \,$
so we conclude that taking the dot product of a vector .v with itself yields the squared length of the vector.^ So, what this tells us is we should get the same thing as multiplying the length of A with itself, so, squared, times the cosine of the angle.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

^ Since the dot product results in the length of the vectors squared, could the length not be seen as a single dimensional vector?
• xkcd • View topic - Norm of a dot product 31 January 2010 12:38 UTC forums.xkcd.com [Source type: General]

^ OK, so the general formula, if you follow it with it, in general if we have a vector with components a1, a2, a3, then the length of A is the square root of a1^2 plus a2^2 plus a3^2.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

Lemma 1
$\mathbf{v} \cdot \mathbf{v} = |\mathbf{v}|^2. \,$
.Now consider two vectors a and b extending from the origin, separated by an angle θ.^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ OK, now, what about two different vectors?
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

^ If you don’t have the angles between two vectors you can’t easily compute the dot product and sometimes finding the correct angles is not the easiest thing to do.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

A third vector c may be defined as
$\mathbf{c} \ \stackrel{\mathrm{def}}{=}\ \mathbf{a} - \mathbf{b}. \,$
creating a triangle with sides a, b, and c. According to the law of cosines, we have
$|\mathbf{c}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2 |\mathbf{a}||\mathbf{b}| \cos heta. \,$
Substituting dot products for the squared lengths according to Lemma 1, we get
$\mathbf{c} \cdot \mathbf{c} = \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} - 2 |\mathbf{a}||\mathbf{b}| \cos heta. \,$                   (1)
But as cab, we also have
$\mathbf{c} \cdot \mathbf{c} = (\mathbf{a} - \mathbf{b}) \cdot (\mathbf{a} - \mathbf{b}) \,$,
which, according to the distributive law, expands to
$\mathbf{c} \cdot \mathbf{c} = \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} -2(\mathbf{a} \cdot \mathbf{b}). \,$                     (2)
Merging the two cc equations, (1) and (2), we obtain
$\mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} -2(\mathbf{a} \cdot \mathbf{b}) = \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} - 2 |\mathbf{a}||\mathbf{b}| \cos heta. \,$
Subtracting aa + bb from both sides and dividing by −2 leaves
$\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}| \cos heta. \,$

## Generalization

.The inner product generalizes the dot product to abstract vector spaces and is usually denoted by $\langle\mathbf{a}\, , \mathbf{b}\rangle$.^ So, in general, we indeed can consider vectors in abstract spaces that have any number of coordinates.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

^ Definition 1 If u and v are two vectors in 2-space or 3-space and is the angle between them then the dot product , denoted by is defined as, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Inner products (of which the usual 'dot product' is one), are defined on inner-product spaces, which are vector spaces which have (unsurprisingly) an inner product.
• Dot Product In Many Programming Languages 31 January 2010 12:38 UTC c2.com [Source type: FILTERED WITH BAYES]

Due to the geometric interpretation of the dot product the norm ||a|| of a vector a in such an inner product space is defined as
$\|\mathbf{a}\| = \sqrt{\langle\mathbf{a}\, , \mathbf{a}\rangle}$
such that it generalizes length, and the angle θ between two vectors a and b by
$\cos{ heta} = \frac{\langle\mathbf{a}\, , \mathbf{b}\rangle}{\|\mathbf{a}\| \, \|\mathbf{b}\|}.$
In particular, two vectors are considered orthogonal if their inner product is zero
$\langle\mathbf{a}\, , \mathbf{b}\rangle = 0.$
.For vectors with complex entries, using the given definition of the dot product would lead to quite different geometric properties.^ Using the vector dot product for back-face culling.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ So the definition of the dot product is not at all arbitrary.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ This program demonstrates how the dot product can be used to find vectors that are perpendicular to a given vector.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

.For instance the dot product of a vector with itself can be an arbitrary complex number, and can be zero without the vector being the zero vector; this in turn would have severe consequences for notions like length and angle.^ So the definition of the dot product is not at all arbitrary.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ The dot products of combination of different unit vectors evaluate to zero.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ We know that the dot product of a vector with itself is equal to the square of the magnitude of the vector.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

Many geometric properties can be salvaged, at the cost of giving up the symmetric and bilinear properties of the scalar product, by alternatively defining
$\mathbf{a}\cdot \mathbf{b} = \sum{a_i \overline{b_i}}$
where bi is the complex conjugate of bi. .Then the scalar product of any vector with itself is a non-negative real number, and it is nonzero except for the zero vector.^ In any case, the dot product is really a scalar, and not a vector.
• xkcd • View topic - Norm of a dot product 31 January 2010 12:38 UTC forums.xkcd.com [Source type: General]

^ Well, dot product as a way of multiplying two vectors to get a number, a scalar.
• MIT OpenCourseWare | Mathematics | 18.02 Multivariable Calculus, Fall 2007 | Video Lectures | detail 31 January 2010 12:38 UTC ocw.mit.edu [Source type: Original source]

^ In order to enable a geometric interpretation of the ensuing algebra, it is taken as an axiom that the product of a vector by itself is a scalar.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

However this scalar product is not linear in b (but rather conjugate linear), and the scalar product is not symmetric either, since
$\mathbf{a} \cdot \mathbf{b} = \overline{\mathbf{b} \cdot \mathbf{a}}$.
.This type of scalar product is nevertheless quite useful, and leads to the notions of Hermitian form and of general inner product spaces.^ Scalar product in component form .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Note that the dot product is sometimes called the scalar product or the Euclidean inner product .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ Backface culling is incorporated using the dot product between a vector that is parallel to the viewpoint of the viewer and a vector that is perpendicular to the line being drawn to form the outline of a circle.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

.The Frobenius inner product generalizes the dot product to matrices.^ Note that the dot product is sometimes called the scalar product or the Euclidean inner product .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ A dot product is a specific case of a thing we normally refer to as inner product.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

^ Field [0002] This disclosure relates generally to data processing systems, and more specifically, to SIMD dot product operations with overlapped operands within a data processing system.
• SIMD DOT PRODUCT OPERATIONS WITH OVERLAPPED OPERANDS - Patent application 31 January 2010 12:38 UTC www.faqs.org [Source type: Reference]

.It is defined as the sum of the products of the corresponding components of two matrices having the same size.^ In one embodiment, the same five vector elements of rA are used for both of the simultaneous dot product operations while two different subsets of five vector elements of rB are used for the two simultaneous dot product operations.
• SIMD DOT PRODUCT OPERATIONS WITH OVERLAPPED OPERANDS - Patent application 31 January 2010 12:38 UTC www.faqs.org [Source type: Reference]

^ These intermediate products are sign-extended to 32 bits and added together to produce two sums.
• SIMD DOT PRODUCT OPERATIONS WITH OVERLAPPED OPERANDS - Patent application 31 January 2010 12:38 UTC www.faqs.org [Source type: Reference]

^ Scalar product of two vectors a and b is a scalar quantity defined as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

### Generalization to tensors

.The dot product between a tensor of order n and a tensor of order m is a tensor of order n+m-2. The dot product is calculated by multiplying and summing across a single index in both tensors.^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ We’ve already got computed so we just need to do a couple of dot products and according to Theorem 6 both u and v are orthogonal to and so we should get zero out of both of these.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ In one embodiment, the same five vector elements of rA are used for both of the simultaneous dot product operations while two different subsets of five vector elements of rB are used for the two simultaneous dot product operations.
• SIMD DOT PRODUCT OPERATIONS WITH OVERLAPPED OPERANDS - Patent application 31 January 2010 12:38 UTC www.faqs.org [Source type: Reference]

If $\mathbf{A}$ and $\mathbf{B}$ are two tensors with element representation $A_{ij\dots}^{k\ell\dots}$ and $B_{mn\dots}^{p{\dots}i}$ the elements of the dot product $\mathbf{A} \cdot \mathbf{B}$ are given by
$A_{ij\dots}^{k\ell\dots}B_{mn\dots}^{p{\dots}i} = \sum_{i=1}^n A_{ij\dots}^{k\ell\dots}B_{mn\dots}^{p{\dots}i}$
.This definition naturally reduces to the standard vector dot product when applied to vectors, and matrix multiplication when applied to matrices.^ Next suppose that , then from the definition of the dot product we have, .
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ That is the problem with this definition of the dot product.
• http://tutorial.math.lamar.edu/classes/linalg/Dot_CrossProduct.aspx 31 January 2010 12:38 UTC tutorial.math.lamar.edu [Source type: FILTERED WITH BAYES]

^ So the definition of the dot product is not at all arbitrary.
• Dot product cross product, where did they come from? [Archive] - Physics Forums 31 January 2010 12:38 UTC www.physicsforums.com [Source type: FILTERED WITH BAYES]

.Occasionally, a double dot product is used to represent multiplying and summing across two indices.^ For, dot product of any two vectors is a scalar.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ Finally, you learned how to use the dot product to perform back-face culling to convert the left image in Figure 1 to the right image in Figure 1.
• Applications of the Vector Dot Product, Math for Java Game Programmers — Developer.com 31 January 2010 12:38 UTC www.developer.com [Source type: FILTERED WITH BAYES]

^ The cosine of the angle between two vectors can be obtained in terms of dot product as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

.The double dot product between two 2nd order tensors is a scalar.^ Component as scalar (dot) product .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ The dot product evaluates to scalar terms as : .
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

^ For, dot product of any two vectors is a scalar.
• Scalar (dot) product 31 January 2010 12:38 UTC cnx.org [Source type: FILTERED WITH BAYES]

# Simple English

In mathematics, the dot product is an algebraic operation that takes two equal-length sequences of numbers (usually coordinate vectors) and returns a single number obtained by multiplying corresponding entries and adding up those products. The name is derived from the centered dot "·" that is often used to designate this operation; the alternative name scalar product emphasizes the scalar (rather than vector) nature of the result.

The dot product contrasts (in three dimensional space) with the cross product, which produces a vector as result.

## Definition

The dot product of two vectors a = [a1, a2, ... , an] and b = [b1, b2, ... , bn] is defined as:

$\mathbf\left\{a\right\}\cdot \mathbf\left\{b\right\} = \sum_\left\{i=1\right\}^n a_ib_i = a_1b_1 + a_2b_2 + \cdots + a_nb_n$

where Σ denotes summation notation ( the sum of all the terms) and n is the dimension of the vector space.

In dimension 2, the dot product of vectors [a,b] and [c,d] is ac + bd. The same way, in a dimension 3, the dot product of vectors [a,b,c] and [d,e,f] is ad + be + cf. For example, the dot product of two three-dimensional vectors [1, 3, −5] and [4, −2, −1] is



[1, 3, -5] \cdot [4, -2, -1] = (1 \times 4) + (3 \times (-2)) + ((-5) \times (-1)) = (4) - (6) + (5) = 3.

## Geometric interpretation

File:Dot
AB = |A| |B| cos(θ).
|A| cos(θ) is the scalar projection of A onto B.

In Euclidean geometry, the dot product, length, and angle are related. For a vector a, the dot product a · a is the square of the length of a, or

$\left\{\mathbf\left\{a\right\} \cdot \mathbf\left\{a\right\}\right\}=\left\|\mathbf\left\{a\right\}\right\|^2$

where ||a|| denotes the length (magnitude) of a. More generally, if b is another vector

$\mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\}=\left\|\mathbf\left\{a\right\}\right\| \, \left\|\mathbf\left\{b\right\}\right\| \cos \theta \,$

where ||a|| and ||b|| denote the length of a and b and θ is the angle between them.

This formula can be rearranged to determine the size of the angle between two nonzero vectors:

$\theta=\arccos \left\left( \frac \left\{\bold\left\{a\right\}\cdot\bold\left\{b\right\}\right\} \left\{\left\|\bold\left\{a\right\}\right\|\left\|\bold\left\{b\right\}\right\|\right\}\right\right)$

One can also first convert the vectors to unit vectors by dividing by their magnitude:

$\boldsymbol\left\{\hat\left\{a\right\}\right\} = \frac\left\{\bold\left\{a\right\}\right\}\left\{\left\|\bold\left\{a\right\}\right\|\right\}$

then the angle θ is given by

$\theta = \arccos \left( \boldsymbol\left\{\hat a\right\}\cdot\boldsymbol\left\{\hat b\right\}\right)$

As the cosine of 90° is zero, the dot product of two orthogonal(perpendicular) vectors is always zero. Moreover, two vectors can be considered orthogonal if and only if their dot product is zero, and they both have a nonzero length. This property provides a simple method to test the condition of orthogonality.

Sometimes these properties are also used for defining the dot product, especially in 2 and 3 dimensions; this definition is equivalent to the above one. For higher dimensions the formula can be used to define the concept of angle.

The geometric properties rely on the basis being orthonormal, i.e. composed of pairwise perpendicular vectors with unit length.

### Scalar projection

If both a and b have length one (i.e., they are unit vectors), their dot product simply gives the cosine of the angle between them.

If only b is a unit vector, then the dot product a · b gives |a| cos(θ), i.e., the magnitude of the projection of a in the direction of b, with a minus sign if the direction is opposite. This is called the scalar projection of a onto b, or scalar component of a in the direction of b (see figure). This property of the dot product has several useful applications (for instance, see next section).

If neither a nor b is a unit vector, then the magnitude of the projection of a in the direction of b, for example, would be a · (b / |b|) as the unit vector in the direction of b is b / |b|.

### Rotation

A rotation of the orthonormal basis in terms of which vector a is represented is obtained with a multiplication of a by a rotation matrix R. This matrix multiplication is just a compact representation of a sequence of dot products.

For instance, let

• B1 = {x, y, z} and B2 = {u, v, w} be two different orthonormal bases of the same space R3, with B2 obtained by just rotating B1,
• a1 = (ax, ay, az) represent vector a in terms of B1,
• a2 = (au, av, aw) represent the same vector in terms of the rotated basis B2,
• u1, v1, w1 be the rotated basis vectors u, v, w represented in terms of B1.

Then the rotation from B1 to B2 is performed as follows:

$\bold a_2 = \bold\left\{Ra\right\}_1 =$

\begin{bmatrix} u_x & u_y & u_z \\ v_x & v_y & v_z \\ w_x & w_y & w_z \end{bmatrix} \begin{bmatrix} a_x \\ a_y \\ a_z \end{bmatrix} = \begin{bmatrix} \bold u_1\cdot\bold a_1 \\ \bold v_1\cdot\bold a_1 \\ \bold w_1\cdot\bold a_1 \end{bmatrix} = \begin{bmatrix} a_u \\ a_v \\ a_w \end{bmatrix} .

Notice that the rotation matrix R is assembled by using the rotated basis vectors u1, v1, w1 as its rows, and these vectors are unit vectors. By definition, Ra1 consists of a sequence of dot products between each of the three rows of R and vector a1. Each of these dot products determines a scalar component of a in the direction of a rotated basis vector (see previous section).

If a1 is a row vector, rather than a column vector, then R must contain the rotated basis vectors in its columns, and must post-multiply a1:

$\bold a_2 = \bold a_1 \bold R =$

\begin{bmatrix} a_x & a_y & a_z \end{bmatrix} \begin{bmatrix} u_x & v_x & w_x \\ u_y & v_y & w_y \\ u_z & v_z & w_z \end{bmatrix} = \begin{bmatrix} \bold u_1\cdot\bold a_1 & \bold v_1\cdot\bold a_1 & \bold w_1\cdot\bold a_1 \end{bmatrix} = \begin{bmatrix} a_u & a_v & a_w \end{bmatrix} .

## Physics

In physics, magnitude is a scalar in the physical sense, i.e. a physical quantity independent of the coordinate system, expressed as the product of a numerical value and a physical unit, not just a number. The dot product is also a scalar in this sense, given by the formula, independent of the coordinate system. Example:

## Properties

The following properties hold if a, b, and c are real vectors and r is a scalar.

The dot product is commutative:

$\mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\} = \mathbf\left\{b\right\} \cdot \mathbf\left\{a\right\}.$

The dot product is distributive over vector addition:

$\mathbf\left\{a\right\} \cdot \left(\mathbf\left\{b\right\} + \mathbf\left\{c\right\}\right) = \mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\} + \mathbf\left\{a\right\} \cdot \mathbf\left\{c\right\}.$

The dot product is bilinear:

$\mathbf\left\{a\right\} \cdot \left(r\mathbf\left\{b\right\} + \mathbf\left\{c\right\}\right)$
   = r(\mathbf{a} \cdot   \mathbf{b}) +(\mathbf{a} \cdot \mathbf{c}).


When multiplied by a scalar value, dot product satisfies:

$\left(c_1\mathbf\left\{a\right\}\right) \cdot \left(c_2\mathbf\left\{b\right\}\right) = \left(c_1c_2\right) \left(\mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\}\right)$

(these last two properties follow from the first two).

Two non-zero vectors a and b are perpendicular if and only if ab = 0.

Unlike multiplication of ordinary numbers, where if ab = ac, then b always equals c unless a is zero, the dot product does not obey the cancellation law:

If ab = ac and a0, then we can write: a • (bc) = 0 by the distributive law; the result above says this just means that a is perpendicular to (bc), which still allows (bc) ≠ 0, and therefore bc.

Provided that the basis is orthonormal, the dot product is invariant under isometric changes of the basis: rotations, reflections, and combinations, keeping the origin fixed. The above mentioned geometric interpretation relies on this property. In other words, for an orthonormal space with any number of dimensions, the dot product is invariant under a coordinate transformation based on an orthogonal matrix. This corresponds to the following two conditions:

• The new basis is again orthonormal (i.e., it is orthonormal expressed in the old one).
• The new base vectors have the same length as the old ones (i.e., unit length in terms of the old basis).

If a and b are functions, then the derivative of ab is a'b + ab'

## Triple product expansion

This is a very useful identity (also known as Lagrange's formula) involving the dot- and cross-products. It is written as

$\mathbf\left\{a\right\} \times \left(\mathbf\left\{b\right\} \times \mathbf\left\{c\right\}\right) = \mathbf\left\{b\right\}\left(\mathbf\left\{a\right\}\cdot\mathbf\left\{c\right\}\right) - \mathbf\left\{c\right\}\left(\mathbf\left\{a\right\}\cdot\mathbf\left\{b\right\}\right)$

which is easier to remember as "BAC minus CAB", keeping in mind which vectors are dotted together. This formula is commonly used to simplify vector calculations in physics.

## Proof of the geometric interpretation

Consider the element of Rn

$\mathbf\left\{v\right\} = v_1 \mathbf\left\{\hat\left\{e\right\}\right\}_1 + v_2 \mathbf\left\{\hat\left\{e\right\}\right\}_2 + ... + v_n \mathbf\left\{\hat\left\{e\right\}\right\}_n. \,$

Repeated application of the Pythagorean theorem yields for its length |v|

$|\mathbf\left\{v\right\}|^2 = v_1^2 + v_2^2 + ... + v_n^2. \,$

But this is the same as

$\mathbf\left\{v\right\} \cdot \mathbf\left\{v\right\} = v_1^2 + v_2^2 + ... + v_n^2, \,$

so we conclude that taking the dot product of a vector v with itself yields the squared length of the vector.

Lemma 1
$\mathbf\left\{v\right\} \cdot \mathbf\left\{v\right\} = |\mathbf\left\{v\right\}|^2. \,$

Now consider two vectors a and b extending from the origin, separated by an angle θ. A third vector c may be defined as

$\mathbf\left\{c\right\} \ \stackrel\left\{\mathrm\left\{def\right\}\right\}\left\{=\right\}\ \mathbf\left\{a\right\} - \mathbf\left\{b\right\}. \,$

creating a triangle with sides a, b, and c. According to the law of cosines, we have

$|\mathbf\left\{c\right\}|^2 = |\mathbf\left\{a\right\}|^2 + |\mathbf\left\{b\right\}|^2 - 2 |\mathbf\left\{a\right\}||\mathbf\left\{b\right\}| \cos \theta. \,$

Substituting dot products for the squared lengths according to Lemma 1, we get


 \mathbf{c} \cdot \mathbf{c}


= \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} - 2 |\mathbf{a}||\mathbf{b}| \cos\theta. \,                   (1) But as cab, we also have


 \mathbf{c} \cdot \mathbf{c}


= (\mathbf{a} - \mathbf{b}) \cdot (\mathbf{a} - \mathbf{b}) \,, which, according to the distributive law, expands to


 \mathbf{c} \cdot \mathbf{c}


= \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} -2(\mathbf{a} \cdot \mathbf{b}). \,                     (2) Merging the two cc equations, (1) and (2), we obtain


 \mathbf{a} \cdot \mathbf{a}


+ \mathbf{b} \cdot \mathbf{b} -2(\mathbf{a} \cdot \mathbf{b}) = \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} - 2 |\mathbf{a}||\mathbf{b}| \cos\theta. \, Subtracting aa + bb from both sides and dividing by −2 leaves

$\mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\} = |\mathbf\left\{a\right\}||\mathbf\left\{b\right\}| \cos\theta. \,$

Q.E.D.

## Generalization

The inner product generalizes the dot product to abstract vector spaces and is usually denoted by $\langle\mathbf\left\{a\right\}\, , \mathbf\left\{b\right\}\rangle$. Due to the geometric interpretation of the dot product the norm ||a|| of a vector a in such an inner product space is defined as

$\|\mathbf\left\{a\right\}\| = \sqrt\left\{\langle\mathbf\left\{a\right\}\, , \mathbf\left\{a\right\}\rangle\right\}$

such that it generalizes length, and the angle θ between two vectors a and b by

$\cos\left\{\theta\right\} = \frac\left\{\langle\mathbf\left\{a\right\}\, , \mathbf\left\{b\right\}\rangle\right\}\left\{\|\mathbf\left\{a\right\}\| \, \|\mathbf\left\{b\right\}\|\right\}.$

In particular, two vectors are considered orthogonal if their inner product is zero

$\langle\mathbf\left\{a\right\}\, , \mathbf\left\{b\right\}\rangle = 0.$

For vectors with complex entries, using the given definition of the dot product would lead to quite different geometric properties. For instance the dot product of a vector with itself can be an arbitrary complex number, and can be zero without the vector being the zero vector; this in turn would have severe consequences for notions like length and angle. Many geometric properties can be salvaged, at the cost of giving up the symmetric and bilinear properties of the scalar product, by alternatively defining

$\mathbf\left\{a\right\}\cdot \mathbf\left\{b\right\} = \sum\left\{a_i \overline\left\{b_i\right\}\right\}$

where bi is the complex conjugate of bi. Then the scalar product of any vector with itself is a non-negative real number, and it is nonzero except for the zero vector. However this scalar product is not linear in b (but rather conjugate linear), and the scalar product is not symmetric either, since

$\mathbf\left\{a\right\} \cdot \mathbf\left\{b\right\} = \overline\left\{\mathbf\left\{b\right\} \cdot \mathbf\left\{a\right\}\right\}$.

This type of scalar product is nevertheless quite useful, and leads to the notions of Hermitian form and of general inner product spaces.

The Frobenius inner product generalizes the dot product to matrices. It is defined as the sum of the products of the corresponding components of two matrices having the same size.

### Generalization to tensors

The dot product between a tensor of order n and a tensor of order m is a tensor of order n+m-2. The dot product is worked out by multiplying and summing across a single index in both tensors. If $\mathbf\left\{A\right\}$ and $\mathbf\left\{B\right\}$ are two tensors with element representation $A_\left\{ij\dots\right\}^\left\{k\ell\dots\right\}$ and $B_\left\{mn\dots\right\}^\left\{p\left\{\dots\right\}i\right\}$ the elements of the dot product $\mathbf\left\{A\right\} \cdot \mathbf\left\{B\right\}$ are given by

$A_\left\{ij\dots\right\}^\left\{k\ell\dots\right\}B_\left\{mn\dots\right\}^\left\{p\left\{\dots\right\}i\right\} = \sum_\left\{i=1\right\}^n A_\left\{ij\dots\right\}^\left\{k\ell\dots\right\}B_\left\{mn\dots\right\}^\left\{p\left\{\dots\right\}i\right\}$

This definition naturally reduces to the standard vector dot product when applied to vectors, and matrix multiplication when applied to matrices.

Occasionally, a double dot product is used to represent multiplying and summing across two indices. The double dot product between two 2nd order tensors is a scalar.

# Citable sentences

Up to date as of December 23, 2010

Here are sentences from other pages on Dot product, which are similar to those in the above article.