Scalar product

Kapitoly: Vectors, Operations with vectors, Scalar product, Vector product

The scalar product is defined between two vectors and captures the relationship between the magnitude of the vectors and their angle.

The scalar product

The scalar product is defined between two vectors. We denote it as the normal product, the central dot: $\vec{\mathbf{u}} \cdot \vec{\mathbf{v}}$. The result of a scalar product is a real number, not a vector. If we have two vectors $\vec{\mathbf{u}}=(u_1, u_2)$ and $\vec{\mathbf{v}}=(v_1, v_2)$, then their scalar product is equal:

$$\vec{\mathbf{u}}\cdot \vec{\mathbf{v}}=u_1v_1+u_2v_2$$

If at least one of the vectors $\vec{\mathbf{u}}$ and $\vec{\mathbf{v}}$ is zero, we define their product as follows:

$$\vec{\mathbf{u}}\cdot \vec{\mathbf{v}}=0$$

What is the geometric meaning of the scalar product? For the scalar product of two vectors simultaneously, the following holds

$$\vec{\mathbf{u}}\cdot \vec{\mathbf{v}}=|\vec{\mathbf{u}}|\cdot|\vec{\mathbf{v}}|\cdot\cos\alpha,$$

where α represents the magnitude of the angles of these vectors. This formula gives us a simple way to find the magnitude of the angle of the two vectors. If we isolate the cosine from this formula, we get the formula:

$$\cos\alpha=\frac{\vec{\mathbf{u}}\cdot \vec{\mathbf{v}}}{|\vec{\mathbf{u}}|\cdot|\vec{\mathbf{v}}|}=\frac{u_1v_1+u_2v_2}{\sqrt{u_1^2+u_2^2}\cdot\sqrt{v_1^2+v_2^2}}$$

The formula holds in the plane. If we are moving in space, we need to add another dimension. At this point, we can draw the geometric meaning of the scalar product.

Scalar product

If we scalarly multiply the vectors $\vec{\mathbf{u}}$ and $\vec{\mathbf{v}}$, then if we divide the result by the length of the vector $\vec{\mathbf{v}}$, we get the length of the line segment AD, which is the magnitude of the projection of the vector $\vec{\mathbf{v}}$ into the direction of the vector $\vec{\mathbf{u}}$.

Testing the right angle

We can use the scalar product to test whether the angle between vectors is equal to $90^{\circ}$. When will the scalar product be zero? If we look at the formula...

$$\vec{\mathbf{u}}\cdot \vec{\mathbf{v}}=|\vec{\mathbf{u}}|\cdot|\vec{\mathbf{v}}|\cdot\cos\alpha$$

we find that the product $|\vec{\mathbf{u}}|\cdot|\vec{\mathbf{v}}|$ will probably always be non-zero (we don't define the angle between zero vectors, so we're only dealing with non-zero vectors now). The magnitudes of the vectors will always be positive, and so will their product. The only expression that can bring the whole expression down to zero is the cosine. When is the cosine equal to zero? When the angle is equal to $90^{\circ}$ (or $270^{\circ}$ - but the right angle will be on the other side). So it is true that vectors make a right angle just when their scalar product is zero.

Example: consider the following three vectors: $\vec{\mathbf{u}}_1=(-2, 4), \vec{\mathbf{u}}_2=(2, 1), \vec{\mathbf{u}}_3=(1, 4)$. Which of them are perpendicular to each other? Calculate the scalar product of all vectors in turn: hello

$$\begin{eqnarray} \vec{\mathbf{u}}_1\cdot \vec{\mathbf{u}}_2=-2\cdot2+4\cdot1&=&0\\ \vec{\mathbf{u}}_1\cdot \vec{\mathbf{u}}_3=-2\cdot1+4\cdot4&=&14\\ \vec{\mathbf{u}}_2\cdot \vec{\mathbf{u}}_3=2\cdot1+1\cdot4&=&6 \end{eqnarray}$$

According to the scalar product, there is a right angle only between the vectors $\vec{\mathbf{u}}_1$ and $\vec{\mathbf{u}}_2$. You can see a picture with these vectors:

Right angles between vectors

Let's still try to calculate the angle between the vectors $\vec{\mathbf{u}}_1$ and $\vec{\mathbf{u}}_3$. Simply plug into the formula:

$$\begin{eqnarray} \cos\alpha&=&\frac{-2\cdot1+4\cdot4}{\sqrt{(-2)^2+4^2}\cdot\sqrt{1^2+4^2}}\\ &=&\frac{-2+16}{\sqrt{20}\cdot\sqrt{17}}\\ &=&\frac{14}{\sqrt{340}}\\ &\approx&\frac{14}{18.439} \end{eqnarray}$$

If we calculate the arcus cosine, we get the magnitude of the angle. The result is an angle of approximately the size of $40^{\circ}$.