lettura simple

Dot Product of Two Vectors

In this lesson, we'll dissect the concept of the dot product and explore its calculation when it comes to two vectors.

Simply put, the dot product is a scalar quantity, which we obtain by adding together the products of the corresponding components of two vectors. You'll often see it denoted as: $$ \vec{v_1} \cdot \vec{v_2} = x_1 \cdot x_2 + y_1 \cdot y_2 + z_1 \cdot z_2 $$ Or alternatively, in this format: $$ < \vec{v_1} , \vec{v_2} > = x_1 \cdot x_2 + y_1 \cdot y_2 + z_1 \cdot z_2 $$ It's also called inner product or scalar product. The term "scalar" comes into play as the result is not a vector, but rather a standalone number.

Now, let's get our hands dirty with a tangible example.

Imagine two vectors on a plane, represented as:

$$ \vec{v_1} = \begin{pmatrix} x_1 \\ y_1 \end{pmatrix} = \begin{pmatrix} 1 \\ 3 \end{pmatrix} $$

$$ \vec{v_2} = \begin{pmatrix} x_2 \\ y_2 \end{pmatrix} = \begin{pmatrix} 4 \\ 2 \end{pmatrix} $$

These vectors have two components, x and y, correlating with their (x,y) coordinates on the plane.

an example of two vectors

The dot product of these two vectors is the sum of the products of their components, computed as:

$$ \vec{v_1} \cdot \vec{v_2} = x_1 \cdot x_2 + y_1 \cdot y_2 = 1 \cdot 4 + 3 \cdot 2 = 4+ 6 = 10 $$

Consequently, the dot product of these vectors results in the real number 10, illustrating that the outcome is a scalar, not a vector.

Keep in mind that this method isn't limited to two-dimensional vectors. It applies universally, even when you're working with vectors in three or more dimensions. $$ \vec{v_1} = \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} $$ $$ \vec{v_2} = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} $$ For example, to calculate the dot product of two vectors in 3d space, you simply sum the products of their components (x,y,z). $$ \vec{v_1} \cdot \vec{v_2} = x_1 \cdot x_2 + y_1 \cdot y_2 + z_1 \cdot z_2 $$ Il risultato è il prodotto scalare.

So, why does the dot product matter?

Primarily, the dot product gives us insights about the angle between two vectors.

  • If the dot product equals zero, it indicates a 90-degree angle between the vectors - they're either perpendicular or one of the vectors is zero.
     90-degree angle between the vectors
  • A positive dot product means the vectors form an angle less than 90 degrees.
    an angle less than 90 degrees
  • Conversely, a negative dot product reveals an angle greater than 90 degrees between the vectors.
    an angle greater than 90 degrees

In the previous example, the dot product turned out positive ( v1·v2=10 ), suggesting an angle smaller than 90 degrees between the vectors.

if scalar product is positive, the angle between the vectors is smaller than 90 degrees

The alternate formula for calculating the dot product

There's more than one way to calculate the dot product.

You can also compute the dot product by multiplying the magnitudes (lengths) of the two vectors by the cosine of the angle between them: $$ \vec{v_1} \cdot \vec{v_2} = |\vec{v_1} | \cdot |\vec{v_2} | \cdot \cos \alpha $$

This alternate method comes in handy when the vector components are unknown.

Depending on the specifics of your task, one formula may be more practical than the other.

Example

Consider this: in our initial example, the vectors formed a 45-degree angle.

The first vector was of length √10, and the second, √20.

dot product or scalar product (inner product) are the same

Calculating the dot product via this alternative method yields the same result:

$$ \vec{v_1} \cdot \vec{v_2} = |\vec{v_1} | \cdot |\vec{v_2} | \cdot \cos \alpha = \sqrt{10} \cdot \sqrt{20} \cdot \cos 45° = 10 $$

Consistency in results - that's the beauty of the dot product. And that concludes today's lesson on linear algebra. Stick around for more insightful discussions.

The term "dot product," "inner product," and "scalar product" are often used interchangeably and refer to the same mathematical operation. This operation is used to calculate the product of two vectors and yields a scalar value. The result of the dot product is obtained by multiplying the corresponding components of the two vectors and summing the resulting products. So, essentially, these three terms all refer to the same mathematical operation.




Report a mistake or post a question




FacebookTwitterLinkedinLinkedin