Open In App

Vector Operations

Last Updated : 06 Aug, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Vectors are quantities that have both magnitude and direction. While there are various operations that can be applied to vectors, performing mathematical operations on them directly is not always possible. Therefore, special operations are defined specifically for vector quantities, known as vector operations.

It is crucial to understand the types of operations that can be performed on vector quantities, and vector operations provide insight into these possibilities.

Key Vector Operations:


Algebraic Operations - Addition, Subtraction, Scalar Multiplication

Let's take a closer look at the vector operations mentioned above, along with the solved examples and illustrations in the article below.

Addition of Vectors

Vectors cannot be added by the usual algebraic rules. While adding two vectors, the magnitude and the direction of the vectors must be taken into account. The triangle law is used to add two vectors. Vector addition follows the commutative property, which means that the resultant vector is independent of the order in which the two vectors are added. 

\overrightarrow {a} + \overrightarrow {b} = \overrightarrow {c}

The commutative property of vector addition states that,

\overrightarrow {a} + \overrightarrow {b} = \overrightarrow {b} + \overrightarrow {a}

Also Check

Subtraction of Vectors

Two vectors can be easily subtracted using the vector addition rules. A negative vector is considered a vector with an opposite direction, so it is easily solved by reversing its direction and applying the Triangle Law of Vector Addition.

Example:

\overrightarrow {a} = \langle 5, 2 \rangle, \overrightarrow {b} = \langle 3, 1 \rangle

\overrightarrow{a} - \overrightarrow{b} = \langle 5 - 3 , 2 - 1 \rangle = \langle 2, 1\rangle

Multiplication of Vectors by a Scalar

Multiplying a vector a by a constant scalar k gives a vector whose direction is the same, but the magnitude is changed by a factor of k.

In mathematical terms, this can be rewritten as, 

|k\overrightarrow {a}|~=~k|\overrightarrow {a}|

If k > 1, the magnitude of the vector increases, while it decreases when k < 1.

\overrightarrow {a} = \langle 1, 4 \rangle, k =3

k \cdot \overrightarrow {a} = 3 \cdot \langle 1, 4 \rangle = \langle 3, 12 \rangle

Dot Product (Scalar Product)

Consider two \overrightarrow {A}  and \overrightarrow {B} . The scalar product of these two vectors is defined by the equation, 

\overrightarrow {A}\cdot \overrightarrow {B} = |\overrightarrow {A}||\overrightarrow {B}|cos(\theta)

Here, θ is the angle between two vectors.

In case the vectors are given by their components. for example a = a1i + a2j + a3k and b = b1i + b2j + b3k. In this case, the dot product is given by, 

a.b = a1b1i + a2b2j + a3b3k

Example:

\overrightarrow {a} = \langle 1, 2 \rangle, \overrightarrow {b} = \langle 3, 4 \rangle

\overrightarrow{a} \cdot \overrightarrow{b} = 1 \cdot 3 + 2 \cdot 4 = 3 + 8 =11

Cross Product (Vector Product)

Consider two vectors \overrightarrow {A}  and \overrightarrow {B}. The vector product of these two vectors is denoted by \overrightarrow {A} \times \overrightarrow {B}. The direction of this vector is perpendicular to both of the vectors. The magnitude of this vector is given by, 

|\overrightarrow {A} \times \overrightarrow {B}| = |\overrightarrow {A}||\overrightarrow {B}|sin(\theta)

Here, θ is the angle between two vectors. 

The right-hand rule is used to determine the direction of the resulting vector from the cross-product. Note that, unlike the addition and dot product, the vector product is not commutative.

In case the vectors are given by their components.

For example a = a1i + a2j + a3k and b = b1i + b2j + b3k. In this case, the cross-product is given by,

Latex--1

Example:

\overrightarrow {a} = \langle 2 ,3 ,4\rangle, \overrightarrow {b} = \langle 5,6,7 \rangle

latex-2

= \hat{i}(3 \cdot 7 - 4 \cdot 6) - \hat{j}(2 \cdot 7 - 4 \cdot 5) + \hat{k}(2 \cdot 6 - 3 \cdot 5)\\

\overrightarrow{a} \times \overrightarrow{b} = \langle -3,\ 6,\ -3 \rangle

Projection of Vectors

Scalar Projection

{\displaystyle s=\left\|{a} \right\|\cos \theta = {a} \cdot {\hat {b}}} = \frac{{a} \cdot \overrightarrow {b}} {| \overrightarrow{b} |}

This gives a number representing the length of the projection of \overrightarrow a in the direction of \overrightarrow b .

  • If the angle between the vectors is acute, the result is positive.
  • If the angle between them is negative, the result is negative.

Example:

\overrightarrow {a} = \langle 3 ,4\rangle, \overrightarrow {b} = \langle 6,0 \rangle

s = \frac{\overrightarrow{a} \cdot \overrightarrow{b}}{|\vec{b}|}\\ \overrightarrow{a} \cdot \overrightarrow{b} =3 \cdot 6 + 4 \cdot 0 =18\\ |\overrightarrow{b}| = \sqrt{6^2 + 0^2} = \sqrt{36} = 6 \\ s = \frac{\overrightarrow{a} \cdot \overrightarrow{b}}{|\overrightarrow{b}|} = \frac{18}{6} = 3

Vector Projection

{\displaystyle \operatorname {proj} _{\mathbf {b} }\mathbf {a} =\left(\mathbf {a} \cdot \mathbf {\hat {b}} \right)\mathbf {\hat {b}} =\left( {\frac {\mathbf {a} \cdot \mathbf {b} }{\left\|\mathbf {b} \right\|^{2}}} \right) {\mathbf {b} } ~.}

This gives a vector in the direction of \overrightarrow b that represents the component of \overrightarrow a along \overrightarrow b . This is also called projection vector.

Example:

\overrightarrow {a} = \langle 2 ,3 ,4\rangle, \overrightarrow {b} = \langle 5,6,7 \rangle

\text{proj}_{\vec{b}} \vec{a} = \left( \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|^2} \right) \vec{b} = \left( \frac{3 \cdot 4 + 4 \cdot 0}{4^2} \right) \langle 4, 0 \rangle = \left( \frac{12}{16} \right) \langle 4, 0 \rangle \\ \text{proj}_{\vec{b}} \vec{a} = \langle 3, 0 \rangle

Applications of Vector Operations

Computer Graphics:

  • Transformations, lighting, and motion use dot/cross products.
  • Example: To cast shadows, a vector is projected from an object onto the ground plane.

Machine Learning:

  • Vector space models, embeddings, cosine similarity.
  • Example: In PCA, projects high-dimensional data onto directions (principal components) that maximize variance

Robotics:

  • Orientation, control, and kinematics rely on vector math.
  • Example: To keep a robot on a desired path by projecting its position onto the path direction.

Game Development:

  • Motion simulation, collision detection, pathfinding.
  • Example: When an object hits a wall, the velocity vector is decomposed into components along and perpendicular to the surface.

Solved Examples of Vector Operations

Problem 1: A vector is given magnitudes, v = 2i + j. Find the magnitude of the vector when it is scaled by a constant of 0.4. 

Solution: 

For any vector (v) = ai + bj, its magnitude is given as

|v| = \sqrt{a^2 + b^2}

0.4|v| = |0.4v| 

a = 2, b = 1

|0.4v| = |0.4(2i + j)| 

⇒ |0.4v| = |0.8i + 0.4j| 

⇒ |0.4v| = \sqrt{0.8^2 + 0.4^2}

⇒ |0.4v| = \sqrt{0.64 + 0.16}

⇒ |0.4v| = 0.8

Hence, the magnitude of the vector, v = 2i + j when it is scaled by a constant of 0.4 is 0.8

Problem 2: Two vectors with magnitudes 5 and 10. These vectors have a 60° angle between them. Find the magnitude of the resultant vectors. 

Solution: 

Let, two vectors be p and q. Then resultant vector "r" is given by, 

|r| = \sqrt{|p|^2 + |q|^2 + 2|p||q|cos(\theta)}

Given,

  • |p| = 5
  • |q| = 10
  • θ = 60o

|r| = \sqrt{|p|^2 + |q|^2 + 2|p||q|cos(\theta)}

|r| = \sqrt{|5|^2 + |10|^2 + 2|5||10|cos(60)}

|r| = \sqrt{|5|^2 + |10|^2 + (10)(5)}

|r| = \sqrt{25 + 100 + 50}

|r| = \sqrt{175}

The magnitude of resultant vector is |r| = \sqrt{175}


Similar Reads