 # Vector Dot Product

Vector dot product is  also called a scalar product because the product of vectors gives a scalar quantity. Sometimes, a dot product is also named as an inner product. In vector algebra, dot product is an operation applied on vectors.

The Scalar product or dot product is commutative. When two vectors are operated under a dot product, the answer is only a number. A brief explanation on dot products is given below.

## Dot Product of Two Vectors

If we have two vectors a = ax+ay and b = bx+by, then the dot product or scalar product between them is defined as

a.b = axb+ ayby

## Formula for vectors Dot Product

Let $\vec A$ and $\vec B$ be two non zero vectors. Then, the scalar product is denoted by $\vec A . \vec B$ and is defined as the scalar $|\vec A||\vec B| \cos \theta$.

$\vec A . \vec B = |\vec A||\vec B| \cos \theta = AB \cos \theta$

### Double Dot Product

To perform a double inner product on vectors, consider the result of the single inner product, then repeat the process of setting the nearest pair of indices equal and summing over them. Only tensors of 2nd rank or higher can participate in double inner products

## Properties

Let $\vec A, \vec B\ and\ \vec C$ be two non zero vectors

Commutative Property:

The scalar product of two vectors is commutative, i.e. $\vec A . \vec B = \vec B . \vec A$.

Distributive Property:

The scalar product is distributive over addition. $\vec A . (\vec B + \vec C) = \vec A . \vec B + \vec A . \vec C$.

Scalar Property:

$m \vec A . n \vec B = mn(\vec A . \vec B) = (mn \vec A) . \vec B = \vec A . (mn \vec B)$

Where $m$, $n$ are scalars

Not associative because the dot product between a scalar (a ⋅ b) and a vector (c) is not defined, which means that the expressions involved in the associative property, (a ⋅ b) ⋅ c or a ⋅ (b ⋅ c) are both ill-defined. Note however that the previously mentioned scalar multiplication property is sometimes called the “associative law for scalar and dot product” or one can say that “the dot product is associative with respect to scalar multiplication” because c (a ⋅ b) = (c a) ⋅ b = a ⋅ (c b).

Orthogonal:

Two non-zero vectors a and b are orthogonal if and only if a ⋅ b = 0.

No cancellation:

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 = a ⋅ c and a ≠ 0, then we can write: a ⋅ (b − c) = 0 by the distributive law; the result above says this just means that a is perpendicular to (b − c), which still allows (b − c) ≠ 0, and therefore b ≠ c.

Product Rule:

If a and b are functions, then the derivative (denoted by a prime ′) of a ⋅ b is a′ ⋅ b + a ⋅ b′.

Bilinear:

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

## Dot Product of Two Parallel Vectors

If two vectors have the same direction or two vectors are parallel to each other, then the dot product of two vectors is the product of their magnitude.

Here, $\theta$ = 0 degree

so, cos 0 = 1

Therefore, $\vec A . \vec B = |\vec A||\vec B| \cos \theta$

= AB

## Dot Product of Opposite Vectors

If the two vectors are opposite in direction, then

$\theta = \pi$

Here, $\cos \pi = -1$

Now, $\vec A . \vec B = |\vec A||\vec B| \cos \pi$ = – AB

## Derivative of Dot Product

If we have A(x) = A1(x), A2(x), …., An(x) and B(x) = B1(x), B2(x), …., Bn(x) are two vectors, then the derivative of dot product is given by $\frac{d}{dx}[A(x) . B(x)] = A'(x).B(x) + A(x).B'(x)$

Proof

We can prove this with the help of definition of dot product and product of real number property as:

$\frac{d}{dx}[A(x) . B(x)] = \frac{d}{dx}\left [ \sum_{j = 1}^{n}A_{j}(x)B_{j}(x) \right ]$

= $\sum_{j = 1}^{n}\frac{d}{dx}\left [A_{j}(x)B_{j}(x) \right ]$

= $\sum_{j = 1}^{n} A’_{j}(x)B_{j}(x) + \sum_{j = 1}^{n} A_{j}(x)B’_{j}(x)$

= $A'(x) . B(x) + A(x) . B'(x)$. Hence Proved

## Geometric Interpretation of Dot Product

If we have two vectors A and B and let $\theta$ is the angle between them, then the dot product is given by $A . B = |A| . |B| \cos \theta$. We can prove this result with the help of cosine formula as explained below.

We know that, the formula for the dot product of two vectors A and B is
A.B = A1B1 + A2B2 + A3B3.

### Proof

For this, let A and B be two non zero vectors. Then, A, B and A – B vectors form a triangle. The length of the triangle is IAI, IBI and IA – BI.

Then, by the use of cosine formula, we get
$\left | A-B \right |^{2}= \left | A \right |^{2}+ \left | B \right |^{2}-2\left | A \right |\left | B \right | \cos \theta$

Since we know that, $A . B = IAI . IBI \cos \theta$ Now, we get
$\left | A – B \right |^{2}$ = $\left | A \right |^{2} + \left | B \right |^{2} – 2 A.B$ …………..(i)

Since we know that,
$\left | A – B \right |^{2} = (A_{1} – B_{1})^{2} + (A_{2} – B_{2})^{2} + (A_{3} – B_{3})^{2}$

= $A_{1}^{2} – 2A_{1}B_{1} + B_{1}^{2} + A_{2}^{2} – 2A_{2}B_{2} + B_{2}^{2} + A_{3}^{2} – 2A_{3}B_{3} + B_{3}^{2}$

= $(A_{1}^{2} + A_{2}^{2} + A_{3}^{2}) + (B_{1}^{2} + B_{2}^{2} + B_{3}^{2}) – 2(A_{1}B_{1} + A_{2}B_{2} + A_{3}B_{3})$

= $\left | A \right |^{2} + \left | B \right |^{2} – 2(A_{1}B_{1} + A_{2}B_{2} + A_{3}B_{3})$

Therefore, we have form equation (i),
$\left | A \right |^{2}+\left | B \right |^{2}-2(A_{1}B_{1}+A_{2}B_{2}+A_{3}B_{3})= \left | A-B \right |^{2}= \left | A \right |^{2}+\left | B \right |^{2}- 2A.B$

Then $A.B = A_{1}B_{1}+A_{2}B_{2}+A_{3}B_{3}$

### Related articles

Cross product

Scalar triple product

## Solved Examples On Vector Dot Product

Example 1: Let $\vec{a}=\hat{j}-\hat{k}\; and\; \vec{c}=\hat{i}-\hat{j}-\hat{k}.$, then vector $\vec{b}$ satisfying $\vec{a}\times \vec{b}+ \vec{c}=0\; \text \ and\; \vec{a}\cdot \vec{b}=3\; \text \ is$

Solution:

Unit vector perpendicular to the plane of vector a and b –

$\frac{\vec{a}\times \vec{b}}{\left | \vec{a}\times \vec{b} \right |} \text \ – wherein \text \ Here \ \vec{a} \text \ and \ \vec{b} \text \ are \ two \ vectors.\\ \text \ Scalar \ Product \ of \ two \ vectors \ (dot \ product) -\\ \vec{a}\vec{b}=\left | a \right |\left | b \right |Cos\theta\\ \text \ – \ wherein \ \Theta \text \ is \ the \ angle \ between \ the \ vectors\ \vec{a}\: and\:\vec{b}\\ \vec{c}=\vec{b}\times \vec{a}=> \vec{b}\:.\vec{c}=0\\ (b_{1}\hat{i}+b_{2}\hat{j}+b_{3}\hat{k}).(\hat{i}-\hat{j}-\hat{k})=0\\ b_{1}-b_{2}-b_{3}=0\\ \vec{a}\:.\:\vec{b}=3\\ b_{2}-b_{3}=3\\ b_{1}=b_{2}+b_{3}=3+2b_{3}\\ b_{3}=\:-2\\ \vec{b}=(3+2b_{3})\hat{i}+(3+b_{3})\hat{j}+b_{3}\hat{k}\\ \text \ So \ \vec{b}=-\hat{i}+\hat{j}-2\hat{k}\\$

Example 2: Find the angle between the vectors A and B where $\vec{A} = 2i + 3j + 3k, \vec{B} = i + 2j – 3k$.

Solution:

We know that, $\vec{A}.\vec{B} = |A||B| cosθ \text \ where |A| = √(22 +32 + 32) = √22 \ |B| =√(12 + 22+ 32) = √14 \\ cosθ = (\vec{A}.\vec{B})/(|A||B|)\\ =((2i +3j +3k )(i +2j -3k ))/(√22×√14)\\ =(2+6-9)/(2√77)=(-1)/(2√77) \\ θ = cos-1((-1)/(2√77)) \\$

Example 3: Find the angle between two vectors $\vec{a}$ and $\vec{b}$ with magnitude 1 and 2 respectively and $\vec{a}.\vec{b}$ = 1.

Solution:

We have $\left | \vec{a} \right |$ = 1

$\left | \vec{b} \right |$ = 2

$\vec{a}.\vec{b}$ = 1

Let θ be the angle between a and b.

Then cos θ = $\frac{\vec{a}.\vec{b}}{\left | \vec{a} \right |\left | \vec{b} \right |}$

⇒ cos θ = 1/(2×1) = ½

⇒ θ = π/3 .

Hence the required angle is π/3.

Example 4. Find $\vec{a}.\vec{b}$ when $\vec{a}$ = $3\hat{i}+4\hat{j}+\hat{k}$ and $\vec{b}$ = $5\hat{i}-\hat{j}+2\hat{k}$.

Solution:

We have $\vec{a}$ = $3\hat{i}+4\hat{j}+\hat{k}$

$\vec{b}$ = $5\hat{i}-\hat{j}+2\hat{k}$.

$\vec{a}.\vec{b}$ = 3×5+4×-1+1×2

= 15-4+2

= 13.