Calculatorism

Vector Subtraction Calculator

Enter two 3D vectors to compute the vector difference. a=(5,7,9), b=(1,2,3) → a-b=(4,5,6).

Input Data

Ax
Ay
Az
Bx
By
Bz

Results

x-component of a-b.
4
5
6
Magnitude of the vector difference.
8.774964

At a glance:Vector subtraction a-b equals a+(-b): reverse b then add to a. Component-wise: a-b=(ax-bx, ay-by, az-bz). Magnitude |a-b|=√(|a|²+|b|²-2a·b) (note the sign — one fewer dot-product term than addition, with opposite sign). Physical meaning: the vector difference expresses a 'relative' relationship. Relative position r_AB=r_A-r_B (position of A relative to B), relative velocity v_AB=v_A-v_B. Displacement is the position-vector difference Δr=r_f-r_i. Applications: (1) relative position/velocity (navigation, pursuit); (2) displacement (position change); (3) electric-field difference, force difference; (4) error vector (measurement − true value); (5) structural deformation (deformed − original).

Formula

Component subtraction: a-b = (ax-bx, ay-by, az-bz)

Equivalent: a-b = a + (-b)

Magnitude: |a-b|² = |a|² + |b|² - 2a·b

Relative position: r_AB = r_A - r_B

Displacement: Δr = r_f - r_i

$$\mathbf{a} - \mathbf{b} = (a_x - b_x, \; a_y - b_y, \; a_z - b_z), \quad |\mathbf{a}-\mathbf{b}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2\mathbf{a}\cdot\mathbf{b}$$

How to Use

  1. Enter the three components of vector a (ax, ay, az).
  2. Enter the three components of vector b (bx, by, bz).
  3. The tool computes the components and magnitude of the vector difference.

Case Studies

Relative Position and Navigation

Two cars: r_A=(1000,2000), r_B=(3000,1000) → r_AB=r_A-r_B=(-2000,1000) m. A is southwest of B. Distance √(4000000+1000000)=2236 m.

GPS navigation: destination (5000,8000), current (2000,3000) → remaining displacement (3000,5000), distance 5831 m, direction 59°. Navigation apps compute the vector difference to give direction.

Hong Kong MTR: Central station (0,0), Tsim Sha Tsui station (2000,-3000) → displacement vector, distance 3606 m. Straight-line vs actual path differ.

Displacement and Error Analysis

Displacement: initial (3,4), final (8,16) → displacement (5,12), magnitude 13 m. Extension of the 3-4-5 triangle (5-12-13). Displacement differs from path — only start and end matter.

Measurement error: measured (10.2, 5.1), true (10, 5) → error vector (0.2, 0.1), magnitude 0.224. Quantifies measurement precision.

Structural deformation: post-load position (1.002, 0.999), original (1,1) → deformation (0.002,-0.001), magnitude 0.0022 m=2.2 mm. Engineering monitoring.

FAQ

How is vector subtraction related to addition?

a-b=a+(-b): subtraction is a special case of addition (adding the reversed vector). Subtract components pair-wise: ax-bx. Magnitude formula |a-b|²=|a|²+|b|²-2a·b (note the minus sign), symmetric with |a+b|²=|a|²+|b|²+2a·b — only the dot-product term's sign differs.

Why does a-b represent a relative vector?

a-b means 'a relative to b in position/velocity'. For example A at (5,0), B at (3,0) → A relative to B is (2,0) (A is 2 units to the right of B). Physically: relative velocity v_AB=v_A-v_B, relative position r_AB=r_A-r_B. Intuition: your position minus someone else's = your position relative to them.

What is the relation between vector subtraction and distance?

Distance between two points = magnitude of the position-vector difference. d=|r_A-r_B|=√((xA-xB)²+(yA-yB)²+(zA-zB)²). First compute the difference (component subtraction), then the magnitude (Pythagorean theorem). GPS distance and straight-line distance are computed this way.

Why does a-b = -(b-a) hold?

Component-wise: (ax-bx, ay-by) = -((bx-ax), (by-ay)) = (ax-bx, ay-by). Symmetry: A's position relative to B = -(B's position relative to A). If you are east of me, I am west of you. Magnitudes equal |a-b|=|b-a|, directions opposite.

What is the difference between displacement and path length?

Displacement = position-vector difference (straight-line vector from start to end), magnitude is the straight-line distance. Path length = actual length of the traversed trajectory. One full lap gives displacement 0, path = circumference. A 400 m running track in Hong Kong: one lap displacement 0, path 400 m. Displacement is a vector, path is a scalar.

Related Tools

References

Content review: Calculatorism Science Team. Results are for reference only; please refer to the relevant authorities for the official figures.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Vector Subtraction Calculator(/physics/vector-subtraction)。