You are on page 1of 3

Dot Products

James Limon - Case Western Reserve University


March 2018

1 Introduction to Dot Products


The dot product is a vector operation that takes two vectors and produces a scalar. For
this reason the dot product is commonly referred to as a scalar product. The dot product
is defined both algebraically and geometrically, so we will discuss both.

2 Algebraic Definition
Given two vectors, ~a = ha0 , a1 , a2 , . . . , an i and ~b = hb0 , b1 , b2 , . . . , bn i, the dot product is
defined as:
n
X
~a · ~b = ai bi (1)
i=0
= a0 b0 + a1 b1 + a2 b2 + . . . + an bn (2)

For example, take the 4 dimensional vectors ~a = h1, 2, 3, 4i and ~b = h4, 3, 2, 1i. The dot
product, ~a · ~b, is equal to:

~a · ~b = 1(4) + 2(3) + 3(2) + 4(1)


=4+6+6+4
= 20

The dot product can also be computed through matrix multiplication. Given two vectors
in matrix notation:

 
A= a0 a1 a2 ... an

 
B= b0 b1 b2 ... bn

The dot product ~a · ~b is equal to AB T , in which B T is the transpose of B. Therefore


the dot product of two vectors, ~a and ~b is:

1
~a · ~b = AB T
 
b0
b1 
 

 b2 
 
= a0 a1 a2 ... an 
 .. 
.
 

bn
= a0 b0 + a1 b1 + a2 b2 + · · · + an bn
As you can clearly see, the dot product is simply a row vector multiplied by a column
vector, though even with an understanding of the algebraic definition of a dot product, it
can be difficult to see what the purpose of a dot product even is. In order to remedy that,
we will now move on to the geometric definition of the dot product.
It is useful to note that the dot product is applicable in n dimensional space, meaning
that it can be used in 2 dimensions, 5 dimensions, 1020 dimensions, and nothing changes in
its computation.

3 Geometric Definition
The geometric meaning of the dot product can be thought of in many ways. The dot product
is a way to find the angle between two vectors.


~a · ~b = k~ak ~b cos (θ) (3)

This tells us that the dot product is equal to the magnitudes of the two vectors times
the cosine of the angle between the vectors. This formula can be re-derived by thinking
of the dot product as the product of and the component of in the direction of . It is a
good exercise to attempt this derivation for the 2D case, but know that it still holds for n
dimensional space.
This can also be though of as a measure of how similar the directions of the two vectors
are. If the vectors are in the exact same direction, θ = 0, then the cosine of the angle is 1,
and so the dot product is simply the magnitude of ~a times the magnitude of ~b. However, if
the vectors are perpendicular to each other, or orthogonal, then θ = π2 , and the cosine of
the angle becomes 0. This means that if two vectors are perpendicular, the dot product of
the two vectors must be 0. This is an important thing to remember since it comes in handy
quite often in higher level math.

4 Practice Problems
For problems 1 - 4, compute the dot product:

1. h1, 2, 3i · h3, −2, 1i 3. h2, 2, 2, 2, 2i · h3, 3, 3, 3, 3i


2. h1, 5i · h2, 7i 4. h1, −2i · h2, 1i

2
For problems 5 - 8, compute the angle between the vectors in problems 1 - 4:

5. h1, 2, 3i · h3, −2, 1i 7. h2, 2, 2, 2, 2i · h3, 3, 3, 3, 3i


6. h1, 5i · h2, 7i 8. h1, −2i · h2, 1i

You might also like