2D Vectors & Component-wise Representation

⚡ Key Takeaways

A 2D vector is a quantity with both magnitude and direction in the plane, written component-wise as v⃗=(vx,vy)\vec{v} = (v_x, v_y). Key result: any planar vector decomposes uniquely into horizontal and vertical components, and all vector operations (addition, scaling, magnitude) reduce to simple arithmetic on these components. Applies to physics (forces, velocities), computer graphics, navigation, and engineering. Formalized through the 19th-century work of Hamilton, Grassmann, and Gibbs.

💡 The Core Insight

Every vector in the plane can be broken into two perpendicular pieces — one along the xx-axis and one along the yy-axis — and these pieces add back up to recreate the original. Because the axes are independent, operations done on the xx-components never interfere with the yy-components. This decoupling is what turns geometry into arithmetic: to add vectors you add their components separately; to scale, you scale each component; to find length, you apply the Pythagorean theorem to the two components.

Formal Statement

Definition2D Vector and Components

A 2D vector v⃗\vec{v} is an ordered pair of real numbers:

1
v⃗=(vx, vy)=vx ı^+vy ȷ^\quad \vec{v} = (v_x,\, v_y) = v_x\,\hat{\imath} + v_y\,\hat{\jmath}

Derivation hint: any planar vector is a unique linear combination of the basis vectors ı^=(1,0)\hat{\imath}=(1,0) and ȷ^=(0,1)\hat{\jmath}=(0,1); the coefficients are the components. where:

  • vxv_x is the horizontal (x) component (a scalar, can be negative),
  • vyv_y is the vertical (y) component (a scalar, can be negative),
  • ı^=(1,0)\hat{\imath} = (1,0) is the unit vector along the positive xx-axis,
  • ȷ^=(0,1)\hat{\jmath} = (0,1) is the unit vector along the positive yy-axis.

The magnitude (length) of v⃗\vec{v} is:

2
∣v⃗∣=vx2+vy2\quad |\vec{v}| = \sqrt{v_x^2 + v_y^2}

Derivation hint: apply the Pythagorean theorem to the right triangle with legs vxv_x and vyv_y and hypotenuse ∣v⃗∣|\vec{v}|. The direction angle θ\theta measured counterclockwise from the positive xx-axis is:

3
θ=atan2⁡(vy, vx)\quad \theta = \operatorname{atan2}(v_y,\, v_x)

Derivation hint: from tan⁡θ=vy/vx\tan\theta = v_y/v_x; use atan2 (not plain arctan) to resolve which of the four quadrants the vector points into. Conversely, given magnitude r=∣v⃗∣r=|\vec{v}| and angle θ\theta, the components are recovered by:

4
vx=rcos⁡θ,vy=rsin⁡θ\quad v_x = r\cos\theta, \qquad v_y = r\sin\theta

Derivation hint: project the hypotenuse rr onto each axis using the definitions of cosine (adjacent) and sine (opposite).

TheoremComponent-wise Operations

For vectors a⃗=(ax,ay)\vec{a}=(a_x,a_y), b⃗=(bx,by)\vec{b}=(b_x,b_y) and a scalar k∈Rk\in\mathbb{R}:

5
a⃗+b⃗=(ax+bx,  ay+by)\quad \vec{a} + \vec{b} = (a_x + b_x,\; a_y + b_y)

Derivation hint: place b⃗\vec{b} head-to-tail after a⃗\vec{a}; the resultant's horizontal displacement is the sum of horizontal displacements, likewise vertically.

6
ka⃗=(kax,  kay)\quad k\vec{a} = (k a_x,\; k a_y)

Derivation hint: stretching the arrow by factor kk stretches its shadow on each axis by the same factor (similar triangles).

7
a⃗⋅b⃗=axbx+ayby=∣a⃗∣ ∣b⃗∣cos⁡ϕ\quad \vec{a}\cdot\vec{b} = a_x b_x + a_y b_y = |\vec{a}|\,|\vec{b}|\cos\phi

Derivation hint: expand (a⃗−b⃗)⋅(a⃗−b⃗)(\vec{a}-\vec{b})\cdot(\vec{a}-\vec{b}) via the Law of Cosines and compare with the component expansion; ϕ\phi is the angle between them.

Why It Holds / Derivation

ProofComponent Addition from the Triangle Rule

We show that geometric head-to-tail addition equals component-wise addition [5].

Step 1. Represent a⃗\vec{a} as a directed arrow starting at the origin OO and ending at point A=(ax,ay)A=(a_x,a_y). By definition the components ax,aya_x, a_y are the horizontal and vertical displacements from OO to AA.

Step 2. Place the tail of b⃗\vec{b} at the head AA of a⃗\vec{a}. Since b⃗=(bx,by)\vec{b}=(b_x,b_y) produces horizontal displacement bxb_x and vertical displacement byb_y, the head of b⃗\vec{b} lands at the point

B=(ax+bx,  ay+by).B = (a_x + b_x,\; a_y + b_y).

Step 3. The resultant a⃗+b⃗\vec{a}+\vec{b} is the arrow from OO to BB. Its horizontal displacement is ax+bxa_x+b_x and its vertical displacement is ay+bya_y+b_y — exactly the components of B−OB-O.

Step 4. Therefore a⃗+b⃗=(ax+bx, ay+by)\vec{a}+\vec{b} = (a_x+b_x,\ a_y+b_y), which is [5]. The key fact used is that total displacement along each axis is the independent sum of the partial displacements — horizontal motion never contributes to vertical position. ■\blacksquare

∎
ProofMagnitude from the Pythagorean Theorem

Step 1. The vector v⃗=(vx,vy)\vec{v}=(v_x,v_y) runs from O=(0,0)O=(0,0) to P=(vx,vy)P=(v_x,v_y).

Step 2. Drop a perpendicular from PP to the xx-axis, meeting it at Q=(vx,0)Q=(v_x,0). Triangle OQPOQP has a right angle at QQ.

Step 3. Leg OQOQ has length ∣vx∣|v_x| and leg QPQP has length ∣vy∣|v_y|. The hypotenuse OPOP has length ∣v⃗∣|\vec{v}|.

Step 4. By Pythagoras, ∣v⃗∣2=vx2+vy2|\vec{v}|^2 = v_x^2 + v_y^2 (the squares discard the sign issue), giving ∣v⃗∣=vx2+vy2|\vec{v}|=\sqrt{v_x^2+v_y^2}, which is [2]. ■\blacksquare

∎
mathematician · Josiah Willard Gibbs | 1839–1903

The modern component notation v⃗=vxı^+vyȷ^\vec{v}=v_x\hat{\imath}+v_y\hat{\jmath} comes largely from Gibbs, an American mathematical physicist at Yale. Drawing on Hamilton's quaternions and Grassmann's algebra of extension, Gibbs distilled a streamlined "vector analysis" in lecture notes (1880s) that separated the genuinely useful operations — dot product, cross product, gradient — from the heavier quaternion machinery. His student E. B. Wilson published these as Vector Analysis (1901), which set the notation used in classrooms today.

Building Intuition

🧠 Intuition

Think of a vector as instructions for a walk: "go 3 steps east, then 4 steps north." The pair (3,4)(3,4) captures the whole trip, and where you started doesn't matter — only the net displacement. The two numbers are independent because east-west walking changes only your east-west position. This is why adding two trips means adding their easting separately from their northing. The magnitude 32+42=5\sqrt{3^2+4^2}=5 is the straight-line "as the crow flies" distance, and the angle tells you the compass bearing. Components are just the shadows the arrow casts onto the two axes when lit from above and from the side.

Figure
A 2D vector resolved into its x- and y-components, with magnitude and direction angle.
x y v v_x = r·cosθ v_y = r·sinθ θ O

Worked Examples

ExampleAdding Two Displacement Vectors

Given: A hiker walks a⃗=(3, 4)\vec{a}=(3,\,4) km, then b⃗=(−1, 2)\vec{b}=(-1,\,2) km. Find the resultant displacement, its magnitude, and its bearing from east.

Step 1 — Add components (using [5]):

a⃗+b⃗=(3+(−1),  4+2)=(2, 6) km.\vec{a}+\vec{b} = (3 + (-1),\; 4 + 2) = (2,\, 6)\ \text{km}.

Step 2 — Magnitude (using [2]):

∣a⃗+b⃗∣=22+62=4+36=40≈6.32 km.|\vec{a}+\vec{b}| = \sqrt{2^2 + 6^2} = \sqrt{4+36} = \sqrt{40} \approx 6.32\ \text{km}.

Step 3 — Direction (using [3]):

θ=atan2⁡(6, 2)=arctan⁡(3)≈71.6∘ (first quadrant).\theta = \operatorname{atan2}(6,\,2) = \arctan(3) \approx 71.6^\circ \text{ (first quadrant)}.

Answer:

 a⃗+b⃗=(2, 6) km,∣⋅∣≈6.32 km,θ≈71.6∘ \boxed{\ \vec{a}+\vec{b}=(2,\,6)\ \text{km},\quad |\cdot|\approx 6.32\ \text{km},\quad \theta\approx 71.6^\circ\ }
ExampleFrom Magnitude and Angle to Components

Given: A force of magnitude F=50 NF = 50\ \text{N} acts at θ=120∘\theta = 120^\circ from the positive xx-axis. Resolve it into components.

Step 1 — Horizontal component (using [4]):

Fx=50cos⁡120∘=50×(−0.5)=−25 N.F_x = 50\cos 120^\circ = 50\times(-0.5) = -25\ \text{N}.

Step 2 — Vertical component (using [4]):

Fy=50sin⁡120∘=50×0.8660=43.3 N.F_y = 50\sin 120^\circ = 50\times 0.8660 = 43.3\ \text{N}.

Step 3 — Check magnitude (using [2]):

(−25)2+43.32=625+1874.9=2499.9≈50.0 N. ✓\sqrt{(-25)^2 + 43.3^2} = \sqrt{625 + 1874.9} = \sqrt{2499.9} \approx 50.0\ \text{N}.\ \checkmark

Answer:

 F⃗=(−25, 43.3) N \boxed{\ \vec{F} = (-25,\ 43.3)\ \text{N}\ }

The negative xx-component correctly reflects that 120∘120^\circ points up and to the left.

Common Misconceptions

⚠️ Common mistake

Magnitudes do not add unless the vectors are parallel. A common error is to compute ∣a⃗+b⃗∣=∣a⃗∣+∣b⃗∣|\vec{a}+\vec{b}| = |\vec{a}| + |\vec{b}|. This holds only when a⃗\vec{a} and b⃗\vec{b} point the same direction. In general, the triangle inequality gives

∣a⃗+b⃗∣≤∣a⃗∣+∣b⃗∣.|\vec{a}+\vec{b}| \le |\vec{a}| + |\vec{b}|.

Always add the components first, then take the magnitude of the result — never add the magnitudes directly.

⚠️ Common mistake

Use `atan2`, not plain `arctan`. The formula θ=arctan⁡(vy/vx)\theta = \arctan(v_y/v_x) returns values only in (−90∘,90∘)(-90^\circ, 90^\circ) and cannot distinguish a vector pointing into the second quadrant from one in the fourth. Plain arctan gives the same answer for (1,1)(1,1) and (−1,−1)(-1,-1), which point in opposite directions. The two-argument `atan2(v_y, v_x)` inspects both signs and returns the correct angle in all four quadrants.

Counterexample

Consider a⃗=(3,0)\vec{a}=(3,0) and b⃗=(0,4)\vec{b}=(0,4). Naïvely adding magnitudes suggests a result of length 3+4=73+4=7. But:

a⃗+b⃗=(3,4),∣a⃗+b⃗∣=9+16=5≠7.\vec{a}+\vec{b}=(3,4), \qquad |\vec{a}+\vec{b}|=\sqrt{9+16}=5 \neq 7.

The correct length is 55, not 77 — because the vectors are perpendicular, the "extra" length is lost to the change in direction. This single example demolishes the magnitude-addition fallacy.

Connections

connection

2D vectors are the gateway to a web of related ideas. They generalize directly to 3D Vectors by adding a zz-component and a k^\hat{k} basis vector. The Dot Product (equation [7]) extracts the angle between vectors and underlies the notion of projection and work. The whole framework rests on The Cartesian Coordinate System, which supplies the axes onto which components are measured, and on the Pythagorean Theorem, which converts components into length. When vectors are packed into rows and columns, they become the objects acted on by Matrices and Linear Transformations, where rotation and scaling are encoded as matrix multiplication. Finally, the same arrows reappear as Complex Numbers, where (a,b)(a,b) is written a+bia+bi and addition is identical.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1637 — René Descartes introduces coordinate geometry in La Géométrie, giving the plane its (x,y)(x,y) address system that components rely on.
- 1799 — Caspar Wessel publishes a geometric representation of complex numbers as directed line segments in the plane, an early vector idea.
- 1806 — Jean-Robert Argand independently popularizes the plane-diagram view of complex numbers (the "Argand diagram").
- 1827 — August Möbius's Barycentric Calculus develops directed quantities and their addition.
- 1843 — William Rowan Hamilton invents quaternions, embedding 2D and 3D directed magnitudes in an algebra and coining the word "vector."
- 1844 — Hermann Grassmann publishes Die lineale Ausdehnungslehre, a sweeping but under-read theory of nn-dimensional vector spaces.
- 1881–84 — J. Willard Gibbs distributes printed lecture notes on vector analysis, isolating the dot and cross products.
- 1901 — E. B. Wilson's textbook Vector Analysis, based on Gibbs's lectures, standardizes the ı^,ȷ^,k^\hat{\imath},\hat{\jmath},\hat{k} notation worldwide.
- 1910s–20s — Vector methods become the default language of physics and engineering, displacing quaternion-based approaches in mechanics and electromagnetism.

Subtleties & Limits

open-problem

Component representation is not absolute: the components themselves depend entirely on the chosen axes, while geometric quantities like magnitude and the angle between two vectors do not. This raises a deep question explored in linear algebra and physics — which quantities are coordinate-independent (invariant), and which are mere artifacts of bookkeeping? A vector "is" the same arrow whether you describe it as (3,4)(3,4) or, after rotating your axes by 30∘30^\circ, as some other pair; the invariant is what physics actually cares about. Pushing this principle to curved spaces and accelerating frames leads to tensor analysis and ultimately the machinery of general relativity, where naïve component arithmetic must be replaced by rules that track how components transform when the coordinate grid itself bends.

See Also

3D Vectors · The Dot Product · The Cross Product · The Cartesian Coordinate System · Complex Numbers · Matrices and Linear Transformations · Trigonometry of Right Triangles · Projectile Motion