Vectors in Space

Study Sheet

Vectors in Space

Dot, cross, and the geometry they encode

Dot and Cross Products

Tip
Dot product = angle detector

uv=uvcosθ\mathbf u\cdot\mathbf v = |\mathbf u||\mathbf v|\cos\theta, computed coordinate-wise as u1v1+u2v2+u3v3u_1v_1 + u_2v_2 + u_3v_3. Zero dot product means perpendicular; the sign tells acute vs. obtuse.

Tip
Cross product = area machine

u×v\mathbf u\times\mathbf v is perpendicular to both inputs (right-hand rule) with magnitude uvsinθ|\mathbf u||\mathbf v|\sin\theta — the AREA of the parallelogram they span. For plane vectors (a,b,0)(a,b,0) and (c,d,0)(c,d,0) it collapses to the determinant adbc|ad - bc| on the zz-axis.

Example
A 60° surprise

The cube-edge vectors (1,1,0)(1,1,0) and (0,1,1)(0,1,1): dot product 11, lengths 2\sqrt2 each, so cosθ=12\cos\theta = \tfrac12 and θ=60\theta = 60^\circ — connecting face diagonals of a cube always form equilateral triangles.

Side note
Why vectors run all of physics

Force, velocity, momentum, electric field — anything with a magnitude AND a direction is a vector, and the dot/cross pair are the only two ways to multiply them that respect rotations. Work done is a dot product (W=FdW = \mathbf F\cdot\mathbf d); torque and magnetic force are cross products. Learn these two operations and you have learned the grammar of mechanics.

Try it
Try it: perpendicular or not?

Are (2,3,1)(2, -3, 1) and (4,3,1)(4, 3, 1) perpendicular? Work: dot product =89+1=0= 8 - 9 + 1 = 0 — yes, exactly perpendicular, no angle computation needed. Now check (1,2,2)(1, 2, 2) against itself: vv=1+4+4=9=v2\mathbf v\cdot\mathbf v = 1 + 4 + 4 = 9 = |\mathbf v|^2, so v=3|\mathbf v| = 3 — the dot product also measures length.

Proofs & Why It Matters

Tip
Proof: u·v = |u||v|cos θ

Apply the law of cosines to the triangle with sides u\mathbf u, v\mathbf v, and uv\mathbf u - \mathbf v: uv2=u2+v22uvcosθ|\mathbf u - \mathbf v|^2 = |\mathbf u|^2 + |\mathbf v|^2 - 2|\mathbf u||\mathbf v|\cos\theta.

Reminder — Law of Cosines:c2=a2+b22abcosCc^{2}=a^{2}+b^{2}-2ab\cos C

Expand the left side coordinate-wise: uv2=(uivi)2=u22uivi+v2|\mathbf u - \mathbf v|^2 = \sum(u_i - v_i)^2 = |\mathbf u|^2 - 2\sum u_iv_i + |\mathbf v|^2. Comparing the two expansions, the u2|\mathbf u|^2 and v2|\mathbf v|^2 terms cancel and uivi=uvcosθ\sum u_iv_i = |\mathbf u||\mathbf v|\cos\theta. \blacksquare

Tip
Proof: |u×v| is the parallelogram area

The parallelogram on u,v\mathbf u, \mathbf v has base u|\mathbf u| and height vsinθ|\mathbf v|\sin\theta, so its area is uvsinθ|\mathbf u||\mathbf v|\sin\theta.

Now compute u×v2|\mathbf u\times\mathbf v|^2 from the component formula; the Lagrange identity gives u×v2=u2v2(uv)2=u2v2(1cos2θ)=(uvsinθ)2|\mathbf u\times\mathbf v|^2 = |\mathbf u|^2|\mathbf v|^2 - (\mathbf u\cdot\mathbf v)^2 = |\mathbf u|^2|\mathbf v|^2(1 - \cos^2\theta) = \left(|\mathbf u||\mathbf v|\sin\theta\right)^2. Taking square roots matches the area exactly. \blacksquare

Tip
Proof: Cauchy–Schwarz |u·v| ≤ |u||v|

For every real tt, 0u+tv2=u2+2t(uv)+t2v20 \le |\mathbf u + t\mathbf v|^2 = |\mathbf u|^2 + 2t(\mathbf u\cdot\mathbf v) + t^2|\mathbf v|^2 — a quadratic in tt that is never negative, so its discriminant is 0\le 0: 4(uv)24u2v204(\mathbf u\cdot\mathbf v)^2 - 4|\mathbf u|^2|\mathbf v|^2 \le 0.

Rearranged, uvuv|\mathbf u\cdot\mathbf v| \le |\mathbf u||\mathbf v|, with equality exactly when u+tv=0\mathbf u + t\mathbf v = \mathbf 0 for some tt — parallel vectors. \blacksquare

Seeing It: Vectors in 2D & 3D

Concept
Vector addition is a parallelogram
u = (3, 1)v = (1, 2)u + v = (4, 3)

Placing v\mathbf v’s tail at u\mathbf u’s head (or vice versa — the parallelogram shows both orders at once) lands at the same corner: u+v\mathbf u + \mathbf v. Coordinates just add: (3,1)+(1,2)=(4,3)(3,1) + (1,2) = (4,3), and the picture explains why — the horizontal runs add, the vertical rises add, independently.

The diagonal of the parallelogram IS the sum; the other diagonal, from head of v\mathbf v to head of u\mathbf u, is the difference uv\mathbf u - \mathbf v. Every force diagram, velocity composition, and displacement chain in physics is this one picture reused.

Concept
The angle lives in the dot product
θuvu · v = |u||v| cos θ

Draw both vectors from one point and the angle θ\theta between them is captured algebraically by uv=uvcosθ\mathbf u\cdot\mathbf v = |\mathbf u||\mathbf v|\cos\theta.

Reading the picture: when θ\theta is small the vectors reinforce and the dot product is large and positive; as θ\theta passes 9090^\circ the cosine — and the dot product — crosses zero and turns negative. So perpendicularity is the single cleanest test in the subject: compute one number, check if it is 00. No angle ever needs to be found unless the problem asks for it.

Concept
Projection: the shadow and the perpendicular remainder
uvproj_v uu − proj (⊥)

The green vector is the SHADOW of u\mathbf u on the line through v\mathbf v — the projection projvu=uvvvv\mathrm{proj}_{\mathbf v}\mathbf u = \dfrac{\mathbf u\cdot\mathbf v}{\mathbf v\cdot\mathbf v}\mathbf v.

The dashed red segment is what remains, uprojvu\mathbf u - \mathrm{proj}_{\mathbf v}\mathbf u, and the small square marks the right angle that DEFINES the projection: the remainder is exactly perpendicular to v\mathbf v. The remainder’s length is the distance from u\mathbf u’s head to the line — which is why this one picture powers point-to-line distances, least squares, and Gram–Schmidt alike.

Concept
The cross product in 3D: perpendicular, with area for length
uvu × varea = |u × v|

In three dimensions u×v\mathbf u\times\mathbf v points PERPENDICULAR to the shaded parallelogram that u\mathbf u and v\mathbf v span — choose which of the two perpendicular directions by the right-hand rule: curl the right hand’s fingers from u\mathbf u toward v\mathbf v and the thumb gives u×v\mathbf u\times\mathbf v (so v×u\mathbf v\times\mathbf u points the OPPOSITE way: the cross product is anti-commutative). Its length equals the parallelogram’s area, uvsinθ|\mathbf u||\mathbf v|\sin\theta: parallel vectors span no area and give the zero vector, perpendicular ones give the maximum uv|\mathbf u||\mathbf v|. Normal vectors to planes, torque, and area computations all read straight off this picture.

Going Deeper: Explanations & Worked Problems

Concept
What the dot product really is, from scratch

Start with lengths: in 3D, u=u12+u22+u32|\mathbf u| = \sqrt{u_1^2 + u_2^2 + u_3^2} — Pythagoras applied twice, first in the floor plane to get the horizontal run u12+u22\sqrt{u_1^2+u_2^2}, then in the vertical plane with the height u3u_3.

Reminder — The Pythagorean theorem:a2+b2=c2a^2+b^2=c^2

Now ask: how much do two vectors AGREE in direction? Multiply matching coordinates and add: uv=u1v1+u2v2+u3v3\mathbf u\cdot\mathbf v = u_1v_1 + u_2v_2 + u_3v_3. Why is that a good measure? Because it is LINEAR in each slot ((a+b)v=av+bv(\mathbf a + \mathbf b)\cdot\mathbf v = \mathbf a\cdot\mathbf v + \mathbf b\cdot\mathbf v, straight from distributing the products), it gives uu=u2\mathbf u\cdot\mathbf u = |\mathbf u|^2 (agreement with yourself is total), and — the theorem proved on the proof slide — it equals uvcosθ|\mathbf u||\mathbf v|\cos\theta. So the sign of the dot product is the sign of cosθ\cos\theta: positive means the angle is acute (the vectors lean the same way), zero means perpendicular, negative means obtuse. Every fact in this topic flows from those three properties.

Example
Worked: the angle between (3, 4, 0) and (5, 12, 0), every step

Step 1 — dot product: 35+412+00=15+48=633\cdot5 + 4\cdot12 + 0\cdot0 = 15 + 48 = 63.

Step 2 — lengths: u=9+16=5|\mathbf u| = \sqrt{9 + 16} = 5 and v=25+144=13|\mathbf v| = \sqrt{25 + 144} = 13 (two Pythagorean triples).

Step 3 — solve the angle formula for cosθ\cos\theta: cosθ=uvuv=6365\cos\theta = \dfrac{\mathbf u\cdot\mathbf v}{|\mathbf u||\mathbf v|} = \dfrac{63}{65}.

Step 4 — interpret: 6365\tfrac{63}{65} is close to 11, so the angle is small (θ14.25\theta \approx 14.25^\circ); both vectors point into the first quadrant, so a small positive angle is exactly what geometry predicts. Always end with this sanity check — a negative cosine for two first-quadrant vectors would signal an arithmetic slip.

Example
Worked: a full cross product, and checking it two ways

Compute (2,1,0)×(1,3,0)(2, 1, 0)\times(1, 3, 0).

Step 1 — the determinant recipe: u×v=(u2v3u3v2,;u3v1u1v3,;u1v2u2v1)=(1003,;0120,;2311)=(0,0,5)\mathbf u\times\mathbf v = \left(u_2v_3 - u_3v_2,; u_3v_1 - u_1v_3,; u_1v_2 - u_2v_1\right) = (1\cdot0 - 0\cdot3,; 0\cdot1 - 2\cdot0,; 2\cdot3 - 1\cdot1) = (0, 0, 5).

Step 2 — perpendicularity check: (0,0,5)(2,1,0)=0(0,0,5)\cdot(2,1,0) = 0 ✓ and (0,0,5)(1,3,0)=0(0,0,5)\cdot(1,3,0) = 0 ✓, as the cross product must be orthogonal to both inputs.

Step 3 — magnitude check by the area formula: u=5|\mathbf u| = \sqrt5, v=10|\mathbf v| = \sqrt{10}, and cosθ=2+3510=550=12\cos\theta = \tfrac{2 + 3}{\sqrt5\sqrt{10}} = \tfrac{5}{\sqrt{50}} = \tfrac{1}{\sqrt2}, so sinθ=12\sin\theta = \tfrac{1}{\sqrt2} and uvsinθ=5012=5|\mathbf u||\mathbf v|\sin\theta = \sqrt{50}\cdot\tfrac{1}{\sqrt2} = 5 — matching (0,0,5)=5|(0,0,5)| = 5 exactly. Two independent routes to the same number is how you KNOW the computation is right.