Vector Operations

Last Updated : 17 Jan, 2026

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

1. 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}

Laws of Vector Addition

a.) Triangle Law of Vector Addition

Triangle law of vector addition states that when the two vectors are represented by the two sides of the triangle, then the third side of the triangle represents the resultant vector of addition i.e., the third side of the triangle represents both the magnitude and direction (opposite to the direction of given vectors) of the resultant vector.

If \overrightarrow{\rm A} and \overrightarrow{\rm B} are two vectors. We have to add these two vectors, then the resultant vector \overrightarrow{\rm R} according to triangle law of vector addition is given by:-

\overrightarrow{\rm R}=\overrightarrow{\rm A}+\overrightarrow{\rm B}

triangle_law_of_vector_addition_

b.) Parallelogram Law of Vector Addition

Parallelogram Law of Vector Addition states when two vectors represented by the adjacent sides of a parallelogram are added together then their sum is represented by the diagonal of the parallelogram from the point of contact of the two vectors It is a mathematical principle that tells about how to add two vectors geometrically to find their resultant vector, and is given by:-

\overrightarrow{\rm R}=\overrightarrow{\rm A}+\overrightarrow{\rm B}

parallelogram_law_of_vector_addition

FORMULAS ( For Vector Addition)

Formula for Magnitude of Resultant Vector:- \boxed{|R| = \sqrt{A^2 + B^2 + 2AB\cos\theta}}

Formula for Direction of Resultant Vector of A and B i.e., Φ : \boxed{\Phi = \tan^{-1}\!\left(\frac{B\sin\theta}{A + B\cos\theta}\right)}

where,

  • R is the Resultant of A and B
  • A and B are two vectors
  • θ is the angle between A and B
  • Φ is the angle of Resultant Vector from positive x-axis

2.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

3. Multiplication of Vector 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

4. Multiplication of Vector by a Vector

a. 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

b. 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

5. 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}

Unsolved Practice Problems:

Problem 1: A vector \mathbf{u} = -3\hat{i} + 4\hat{j}​. Find the magnitude of the vector after scaling it by the scalar 0.6.

Problem 2: Find the resultant \mathbf{R}=\mathbf{A}+\mathbf{B} and its magnitude for A=(4,−1) and B=(−2,5). Also give the direction angle of R measured counterclockwise from the + x - axis.

Problem 3: Two forces of magnitudes 7 N and 9 N act with an angle of 120 between them.

  • Find the magnitude of the resultant force.
  • Find the angle the resultant makes with the 7 N force (use the formula tan⁡ϕ=Qsin⁡θP+Qcos⁡θ\tan\phi = \dfrac{Q\sin\theta}{P+Q\cos\theta}.​).

Problem 4: Given \mathbf{a}=(2,-1,3) and \mathbf{b}=(-4,2,1):

  1. Compute a - 2b.
  2. Find the magnitude of a - 2b.
  3. Find the unit vector in the direction of a - 2b.
Comment

Explore