Vector Subtraction Calculator

Enter the vector components (or their magnitudes and angles) to get the resultant vector of the subtraction a - b using the step-by-step algebraic method and the graphical method.

Vector a
,
Vector b
,

Quick Examples

Rate this tool

How to Use the Calculator

This online vector subtraction solver is a mathematical tool designed to evaluate the difference between two vector quantities. Built to operate in the plane (R2) and in space (R3), this tool allows you to solve linear algebra exercises or physics problems related to kinematics and dynamics. By entering your data, you will get the solution along with the analytical procedure and its geometric representation.

Steps to set up your calculation:

  1. Define the geometric space: use the selector at the top to indicate to the calculator whether you will be working in two dimensions (R2) or three dimensions (R3).
  2. Enter the two vectors: unlike a multiple sum, this operation evaluates the strict difference between two elements. You have two panels available (one for the minuend vector and one for the subtrahend vector) that accept exact fractions, integers, and decimals.
  3. 2D mode: in R2, each vector has its own format dropdown menu. This allows you to define the first vector by its rectangular components (x, y) and the second by its magnitude and angle (polar coordinates), or use the same format for both as your problem requires.
  4. 3D mode: if your exercise is in three-dimensional space, the information is entered using components (x, y, z).

What results does the solver provide?

Upon processing the information, the calculator will generate a complete report. First, you will see a quick answer box with the resultant vector (in exact and decimal format), along with its magnitude and direction. Immediately below, the step-by-step solution using the analytical method will be displayed.

To complement the numerical calculation in two-dimensional exercises, the bottom of the screen will include an interactive graph plotted on the Cartesian plane. Since subtracting a vector is mathematically equivalent to adding its opposite, the plane will show the graphical method by positioning the first vector and then drawing the second vector with its direction reversed (-b). The difference vector starts at the origin and connects to the tip of vector -b.

Solved Examples

The following are examples of problems solved by the calculator.

Calculate the subtraction of vector \(\vec{a}=\langle 5, 2\rangle\) and vector \(\vec{b}=\langle 3, 6\rangle.\)

Result

The resultant vector of the subtraction a - b is:

$$ \displaystyle \vec{R} = \langle 2, -4 \rangle $$

Magnitude: \( |\vec{R}| = 2 \sqrt{5} \approx 4.47 \)

Direction: \( \theta \approx 296.57^\circ \)

Step-by-step solution

1. Identify the vector components.

The given vectors are in rectangular component format. We extract their values directly:

$$ \displaystyle \vec{a} = \langle 5, 2 \rangle \qquad \vec{b} = \langle 3, 6 \rangle $$
$$ \displaystyle a_x = 5, \; a_y = 2 \\[1em] b_x = 3, \; b_y = 6 $$

2. Subtract the vector components.

We subtract the corresponding component of the second vector from each component of the first vector to get the resultant vector R:

$$ \displaystyle R_x = a_x - b_x = 5 - 3 = 2 \\[1em] R_y = a_y - b_y = 2 - 6 = -4 $$

Then, the resultant vector of the subtraction is:

$$ \displaystyle \vec{R} = \langle 2, -4 \rangle $$

3. Calculate the magnitude of the resultant vector.

We apply the formula for the magnitude of a vector using the obtained components:

$$ \displaystyle |\vec{R}| = \sqrt{R_x^2 + R_y^2} \\[1.5em] |\vec{R}| = \sqrt{(2)^2 + (-4)^2} = 2 \sqrt{5} \approx 4.47 $$

4. Calculate the direction of the resultant vector.

We use the arctangent function with the ratio between the vertical and horizontal components of the resultant vector:

$$ \displaystyle \theta' = \arctan\left(\frac{R_y}{R_x}\right) \\[1em] \theta' = \arctan\left(\frac{-4}{2}\right) \approx -63.43^\circ $$

The arctangent function gives a reference angle. By analyzing the signs of the components, we notice that the resultant vector is located in the fourth quadrant. To find the true direction with respect to the positive x-axis, we adjust the result by adding 360°:

$$ \displaystyle \theta = \theta' + 360^\circ \approx -63.43^\circ + 360^\circ = 296.57^\circ $$

Because a - b = a + (-b), we can use the same graphical method as in addition but adding a to -b (vector b in the opposite direction).

Graph on the Cartesian plane of two vectors and the difference vector between them calculated by the graphical method. Example 1.
Graphical method of vector subtraction
Determine the result of the subtraction of the vector with magnitude |a| = 10 and angle α = 45° and the vector with |b| = 5 and β = 135°.

Result

The resultant vector of the subtraction a - b is:

$$ \displaystyle \vec{R} = \left\langle \frac{15}{\sqrt{2}}, \frac{5}{\sqrt{2}} \right\rangle \approx \langle 10.61, 3.54 \rangle $$

Magnitude: \( |\vec{R}| = 5 \sqrt{5} \approx 11.18 \)

Direction: \( \theta \approx 18.43^\circ \)

Step-by-step solution

1. Identify the vector components.

The given vectors are defined by their magnitude and direction:

$$ \displaystyle |\vec{a}| = 10, \; \alpha = 45^\circ \\[0.5em] |\vec{b}| = 5, \; \beta = 135^\circ $$

We resolve each vector into its rectangular components by multiplying the magnitude by the cosine and sine of the respective angle.

We resolve vector a:

$$ \displaystyle a_x = |\vec{a}| \cos(\alpha) = 10 \cos(45^\circ) = \frac{10}{\sqrt{2}} \approx 7.07 \\[0.5em] a_y = |\vec{a}| \sin(\alpha) = 10 \sin(45^\circ) = \frac{10}{\sqrt{2}} \approx 7.07 $$

Therefore:

$$ \displaystyle \vec{a} = \left\langle \frac{10}{\sqrt{2}}, \frac{10}{\sqrt{2}} \right\rangle $$

We resolve vector b:

$$ \displaystyle b_x = |\vec{b}| \cos(\beta) = 5 \cos(135^\circ) = -\frac{5}{\sqrt{2}} \approx -3.54 \\[0.5em] b_y = |\vec{b}| \sin(\beta) = 5 \sin(135^\circ) = \frac{5}{\sqrt{2}} \approx 3.54 $$

Therefore:

$$ \displaystyle \vec{b} = \left\langle -\frac{5}{\sqrt{2}}, \frac{5}{\sqrt{2}} \right\rangle $$

2. Subtract the vector components.

We subtract the corresponding component of the second vector from each component of the first vector to get the resultant vector R:

$$ \displaystyle R_x = a_x - b_x = \left(\frac{10}{\sqrt{2}}\right) - \left(-\frac{5}{\sqrt{2}}\right) = \frac{15}{\sqrt{2}} \\[1em] R_y = a_y - b_y = \left(\frac{10}{\sqrt{2}}\right) - \left(\frac{5}{\sqrt{2}}\right) = \frac{5}{\sqrt{2}} $$

Then, the resultant vector of the subtraction is:

$$ \displaystyle \vec{R} = \left\langle \frac{15}{\sqrt{2}}, \frac{5}{\sqrt{2}} \right\rangle \approx \langle 10.61, 3.54 \rangle $$

3. Calculate the magnitude of the resultant vector.

We apply the formula for the magnitude of a vector using the obtained components:

$$ \displaystyle |\vec{R}| = \sqrt{R_x^2 + R_y^2} \\[1.5em] |\vec{R}| = \sqrt{\left(\frac{15}{\sqrt{2}}\right)^2 + \left(\frac{5}{\sqrt{2}}\right)^2} = 5 \sqrt{5} \approx 11.18 $$

4. Calculate the direction of the resultant vector.

We use the arctangent function with the ratio between the vertical and horizontal components of the resultant vector:

$$ \displaystyle \theta = \arctan\left(\frac{R_y}{R_x}\right) \\[1em] \theta = \arctan\left(\frac{\frac{5}{\sqrt{2}}}{\frac{15}{\sqrt{2}}}\right) \approx 18.43^\circ $$

Because a - b = a + (-b), we can use the same graphical method as in addition but adding a to -b (vector b in the opposite direction).

Graph on the Cartesian plane of two vectors and the difference vector between them calculated by the graphical method. Example 2.
Graphical method of vector subtraction
Find the resultant vector of the subtraction between \(\langle -5, 5\rangle\) and the vector with magnitude |b| = 8 and angle β = 60°.

Result

The resultant vector of the subtraction a - b is:

$$ \displaystyle \vec{R} = \left\langle -9, -4 \sqrt{3}+5 \right\rangle \approx \langle -9, -1.93 \rangle $$

Magnitude: \( |\vec{R}| = \sqrt{\left(-4 \sqrt{3}+5\right)^{2}+81} \approx 9.2 \)

Direction: \( \theta \approx 192.09^\circ \)

Step-by-step solution

1. Identify the vector components.

The given vectors are defined in different formats:

$$ \displaystyle \vec{a} = \langle -5, 5 \rangle \qquad |\vec{b}| = 8, \; \beta = 60^\circ $$

We extract the rectangular components that we can:

$$ \displaystyle a_x = -5, \; a_y = 5 $$

We convert the vector in magnitude and angle form into rectangular components by multiplying the magnitude by the cosine and sine of the respective angle.

We resolve vector b:

$$ \displaystyle b_x = |\vec{b}| \cos(\beta) = 8 \cos(60^\circ) = 4 \\[0.5em] b_y = |\vec{b}| \sin(\beta) = 8 \sin(60^\circ) = 4 \sqrt{3} \approx 6.93 $$

Therefore:

$$ \displaystyle \vec{b} = \left\langle 4, 4 \sqrt{3} \right\rangle $$

2. Subtract the vector components.

We subtract the corresponding component of the second vector from each component of the first vector to get the resultant vector R:

$$ \displaystyle R_x = a_x - b_x = (-5) - 4 = -9 \\[1em] R_y = a_y - b_y = 5 - \left(4 \sqrt{3}\right) = -4 \sqrt{3}+5 $$

Then, the resultant vector of the subtraction is:

$$ \displaystyle \vec{R} = \left\langle -9, -4 \sqrt{3}+5 \right\rangle \approx \langle -9, -1.93 \rangle $$

3. Calculate the magnitude of the resultant vector.

We apply the formula for the magnitude of a vector using the obtained components:

$$ \displaystyle |\vec{R}| = \sqrt{R_x^2 + R_y^2} \\[1.5em] |\vec{R}| = \sqrt{(-9)^2 + \left(-4 \sqrt{3}+5\right)^2} = \sqrt{\left(-4 \sqrt{3}+5\right)^{2}+81} \approx 9.2 $$

4. Calculate the direction of the resultant vector.

We use the arctangent function with the ratio between the vertical and horizontal components of the resultant vector:

$$ \displaystyle \theta' = \arctan\left(\frac{R_y}{R_x}\right) \\[1em] \theta' = \arctan\left(\frac{-4 \sqrt{3}+5}{-9}\right) \approx 12.09^\circ $$

The arctangent function gives a reference angle. By analyzing the signs of the components, we notice that the resultant vector is located in the third quadrant. To find the true direction with respect to the positive x-axis, we adjust the result by adding 180°:

$$ \displaystyle \theta = \theta' + 180^\circ \approx 12.09^\circ + 180^\circ = 192.09^\circ $$

Because a - b = a + (-b), we can use the same graphical method as in addition but adding a to -b (vector b in the opposite direction).

Graph on the Cartesian plane of two vectors and the difference vector between them calculated by the graphical method. Example 3.
Graphical method of vector subtraction
Find the difference between the vectors in R3 \(\vec{a}=\langle 4, -2, 5\rangle\) and \(\vec{b}=\langle -1, 3, 2\rangle.\)

Result

The resultant vector of the subtraction a - b is:

$$ \displaystyle \vec{R} = \langle 5, -5, 3 \rangle $$

Magnitude: \( |\vec{R}| = \sqrt{59} \approx 7.68 \)

Direction angles: \( \alpha \approx 49.39^\circ, \; \beta \approx 130.61^\circ, \; \gamma \approx 67.01^\circ \)

The number α is the angle with respect to the x-axis, β with respect to the y-axis, and γ is the angle with respect to the z-axis.

Step-by-step solution

1. Identify the vector components.

The given vectors are in rectangular component format. We extract their values directly:

$$ \displaystyle \vec{a} = \langle 4, -2, 5 \rangle \qquad \vec{b} = \langle -1, 3, 2 \rangle $$
$$ \displaystyle a_x = 4, \; a_y = -2, \; a_z = 5 \\[1em] b_x = -1, \; b_y = 3, \; b_z = 2 $$

2. Subtract the vector components.

We subtract the corresponding component of the second vector from each component of the first vector to get the resultant vector R:

$$ \displaystyle R_x = a_x - b_x = 4 - (-1) = 5 \\[1em] R_y = a_y - b_y = (-2) - 3 = -5 \\[1em] R_z = a_z - b_z = 5 - 2 = 3 $$

Then, the resultant vector of the subtraction is:

$$ \displaystyle \vec{R} = \langle 5, -5, 3 \rangle $$

3. Calculate the magnitude of the resultant vector.

We apply the formula for the magnitude of a vector using the obtained components:

$$ \displaystyle |\vec{R}| = \sqrt{R_x^2 + R_y^2 + R_z^2} \\[1.5em] |\vec{R}| = \sqrt{(5)^2 + (-5)^2 + (3)^2} = \sqrt{59} \approx 7.68 $$

4. Calculate the direction of the resultant vector.

We calculate the angles that the resultant vector forms with each of the coordinate axes (x, y, z):

$$ \displaystyle \alpha = \arccos\left(\frac{R_x}{|\vec{R}|}\right) = \arccos\left(\frac{5}{\sqrt{59}}\right) \approx 49.39^\circ \\[1.5em] \beta = \arccos\left(\frac{R_y}{|\vec{R}|}\right) = \arccos\left(\frac{-5}{\sqrt{59}}\right) \approx 130.61^\circ \\[1.5em] \gamma = \arccos\left(\frac{R_z}{|\vec{R}|}\right) = \arccos\left(\frac{3}{\sqrt{59}}\right) \approx 67.01^\circ $$

Related Tools

Daniel Machado

Professor of Mathematics, graduated from the Faculty of Exact, Chemical and Natural Sciences of the National University of Misiones (UNAM). Developer and creator of RigelUp, dedicated to building tools for mathematical learning.