Vectors in Space

Study Sheet

Vectors in Space

Dot, cross, and the geometry they encode

Dot and Cross Products

Tip
Dot product = angle detector
(3, 1)(1, 2)(−1, 3)(−2, 1)
u=(3,1)\mathbf u = (3, 1) against three partners: dot products 55, 00, −5-5 — acute, right, obtuse.

u⋅v=∣u∣∣v∣cos⁡θ\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.

Why the cosine appears: the law of cosines on the triangle with sides u\mathbf u, v\mathbf v and u−v\mathbf u - \mathbf v gives ∣u−v∣2=∣u∣2+∣v∣2−2∣u∣∣v∣cos⁡θ|\mathbf u - \mathbf v|^2 = |\mathbf u|^2 + |\mathbf v|^2 - 2|\mathbf u||\mathbf v|\cos\theta, while multiplying out the left side coordinate by coordinate gives ∣u∣2+∣v∣2−2(u1v1+u2v2+u3v3)|\mathbf u|^2 + |\mathbf v|^2 - 2(u_1v_1 + u_2v_2 + u_3v_3). The two expansions must agree, which leaves exactly u1v1+u2v2+u3v3=∣u∣∣v∣cos⁡θu_1v_1 + u_2v_2 + u_3v_3 = |\mathbf u||\mathbf v|\cos\theta (the full proof is below). The lengths are positive, so the sign of the dot product is the sign of cos⁡θ\cos\theta. In the figure u=(3,1)\mathbf u = (3, 1) meets three partners: (1,2)(1, 2) gives 3+2=53 + 2 = 5, an acute angle; (−1,3)(-1, 3) gives −3+3=0-3 + 3 = 0, a right angle; (−2,1)(-2, 1) gives −6+1=−5-6 + 1 = -5, an obtuse angle.

Tip
Cross product = area machine
uv1154
The parallelogram on (4,1)(4, 1) and (1,3)(1, 3): the 5×45\times4 box minus the corner pieces leaves area 11=4⋅3−1⋅111 = 4\cdot3 - 1\cdot1.

u×v\mathbf u\times\mathbf v is perpendicular to both inputs (right-hand rule) with magnitude ∣u∣∣v∣sin⁡θ|\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 ∣ad−bc∣|ad - bc| on the zz-axis.

Why the length is an area: the parallelogram on u\mathbf u and v\mathbf v has base ∣u∣|\mathbf u| and height ∣v∣sin⁡θ|\mathbf v|\sin\theta, and the cross product is built so that its length is that product. For plane vectors you can see it with no trigonometry. Take u=(4,1,0)\mathbf u = (4, 1, 0) and v=(1,3,0)\mathbf v = (1, 3, 0), so u×v=(0,0,4⋅3−1⋅1)=(0,0,11)\mathbf u\times\mathbf v = (0, 0, 4\cdot3 - 1\cdot1) = (0, 0, 11). The parallelogram sits inside a 5×45\times4 box of area 2020; the pieces of the box outside it are two triangles of area 12⋅4⋅1=2\tfrac12\cdot4\cdot1 = 2, two of area 12⋅1⋅3=32\tfrac12\cdot1\cdot3 = \tfrac32 and two unit squares, and 20−4−3−2=1120 - 4 - 3 - 2 = 11. In letters, (a+c)(b+d)−ab−cd−2bc=ad−bc(a+c)(b+d) - ab - cd - 2bc = ad - bc.

Example
A 60° surprise
(1, 1, 0)(0, 1, 1)60°
Two face diagonals from one corner of the unit cube, and the dashed third side: all three have length √2.

The face-diagonal 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.

Why the angle must be 60∘60^\circ: the third side of the triangle is (1,1,0)−(0,1,1)=(1,0,−1)(1,1,0) - (0,1,1) = (1, 0, -1), also of length 2\sqrt2. All three sides are face diagonals of the unit cube, so the triangle is equilateral and each angle is 60∘60^\circ. The dot product reached the same answer in one line without ever drawing the cube.

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=F⋅dW = \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? Then use a dot product to find the length of (1,2,2)(1, 2, 2).

Show the answer

Multiply matching coordinates and add: (2)(4)+(−3)(3)+(1)(1)=8−9+1=0(2)(4) + (-3)(3) + (1)(1) = 8 - 9 + 1 = 0. A zero dot product means cos⁡θ=0\cos\theta = 0, so the vectors are exactly perpendicular; no angle has to be computed. For the length, dot the vector with itself, because v⋅v=∣v∣2\mathbf v\cdot\mathbf v = |\mathbf v|^2: (1,2,2)⋅(1,2,2)=1+4+4=9(1,2,2)\cdot(1,2,2) = 1 + 4 + 4 = 9, so ∣v∣=3|\mathbf v| = 3. The dot product measures length as well as angle.

Projections, Components, and Work

Concept
Split a vector along a direction

The scalar component of u\mathbf u along v\mathbf v is the signed length compvu=u⋅v∣v∣\mathrm{comp}_{\mathbf v}\mathbf u = \dfrac{\mathbf u\cdot\mathbf v}{|\mathbf v|}, and the vector projection is projvu=u⋅vv⋅v v\mathrm{proj}_{\mathbf v}\mathbf u = \dfrac{\mathbf u\cdot\mathbf v}{\mathbf v\cdot\mathbf v}\,\mathbf v. What is left over, u−projvu\mathbf u - \mathrm{proj}_{\mathbf v}\mathbf u, is perpendicular to v\mathbf v, so every vector splits into a part along v\mathbf v and a part across it.

Where the formula comes from: write u=c v+w\mathbf u = c\,\mathbf v + \mathbf w and demand w⋅v=0\mathbf w\cdot\mathbf v = 0. Dotting both sides with v\mathbf v removes w\mathbf w and leaves u⋅v=c (v⋅v)\mathbf u\cdot\mathbf v = c\,(\mathbf v\cdot\mathbf v), so c=u⋅vv⋅vc = \tfrac{\mathbf u\cdot\mathbf v}{\mathbf v\cdot\mathbf v} is forced: it is the only multiple of v\mathbf v that leaves a perpendicular remainder. The division by v⋅v\mathbf v\cdot\mathbf v also makes the answer ignore the length of v\mathbf v: doubling v\mathbf v doubles the numerator, quadruples the denominator and doubles v\mathbf v itself, which cancels exactly.

Example
Example: the shadow of (2, 1, 2) on (1, 1, 0)

Let u=(2,1,2)\mathbf u = (2, 1, 2) and v=(1,1,0)\mathbf v = (1, 1, 0). The two dot products the formula needs are u⋅v=2+1+0=3\mathbf u\cdot\mathbf v = 2 + 1 + 0 = 3 and v⋅v=2\mathbf v\cdot\mathbf v = 2, so projvu=32(1,1,0)=(32,32,0)\mathrm{proj}_{\mathbf v}\mathbf u = \tfrac32(1, 1, 0) = \left(\tfrac32, \tfrac32, 0\right).

The remainder is u−projvu=(12,−12,2)\mathbf u - \mathrm{proj}_{\mathbf v}\mathbf u = \left(\tfrac12, -\tfrac12, 2\right). Check that it really is perpendicular to v\mathbf v, since that is the property the formula was built to have: 12−12+0=0\tfrac12 - \tfrac12 + 0 = 0. The scalar component is 32≈2.12\tfrac{3}{\sqrt2} \approx 2.12, shorter than ∣u∣=3|\mathbf u| = 3 as a shadow must be, and Pythagoras closes the loop: ∣proj∣2+∣remainder∣2=92+92=9=∣u∣2|\mathrm{proj}|^2 + |\text{remainder}|^2 = \tfrac92 + \tfrac92 = 9 = |\mathbf u|^2.

Example
Example: gravity on a ramp
10 N6 N8 N
Gravity (10 N) split into 6 N along the ramp and 8 N into it; the dashed lines close the rectangle.

A block of weight 1010 N rests on a ramp that rises 33 for every 44 across. Gravity is g=(0,−10)\mathbf g = (0, -10) and the unit vector up the ramp is d=15(4,3)\mathbf d = \tfrac15(4, 3). The component of gravity along the ramp is g⋅d=0−305=−6\mathbf g\cdot\mathbf d = \tfrac{0 - 30}{5} = -6: a pull of 66 N down the slope.

The along-ramp part is −6 d=(−245,−185)-6\,\mathbf d = \left(-\tfrac{24}{5}, -\tfrac{18}{5}\right), and the rest, g−(−245,−185)=(245,−325)\mathbf g - \left(-\tfrac{24}{5}, -\tfrac{18}{5}\right) = \left(\tfrac{24}{5}, -\tfrac{32}{5}\right), presses straight into the ramp. Its length is 576+10245=405=8\tfrac{\sqrt{576 + 1024}}{5} = \tfrac{40}{5} = 8 N. The parts 66, 88, 1010 form a right triangle because the two parts are perpendicular: 245⋅4−325⋅3=0\tfrac{24}{5}\cdot4 - \tfrac{32}{5}\cdot3 = 0. Friction is proportional to the 88 N pressing part, which is why the same block slides more easily on a steeper ramp.

Example
Example: the work done by a constant force

A constant force F=(3,−1,2)\mathbf F = (3, -1, 2) newtons moves an object in a straight line from P=(1,0,0)P = (1, 0, 0) to Q=(4,2,1)Q = (4, 2, 1), in metres. The displacement is d=Q−P=(3,2,1)\mathbf d = Q - P = (3, 2, 1).

Only the part of F\mathbf F along the motion does work, and that part times the distance is compdF⋅∣d∣=F⋅d\mathrm{comp}_{\mathbf d}\mathbf F\cdot|\mathbf d| = \mathbf F\cdot\mathbf d. So W=3⋅3+(−1)⋅2+2⋅1=9−2+2=9W = 3\cdot3 + (-1)\cdot2 + 2\cdot1 = 9 - 2 + 2 = 9 J. The negative term is the yy-part of the force pushing against the motion in yy; the dot product books it as work taken away.

Side note
Where it goes wrong

A common slip is to project with (u⋅v) v(\mathbf u\cdot\mathbf v)\,\mathbf v, forgetting to divide by v⋅v\mathbf v\cdot\mathbf v. For u=(2,1,2)\mathbf u = (2, 1, 2) and v=(1,1,0)\mathbf v = (1, 1, 0) that gives 3(1,1,0)=(3,3,0)3(1, 1, 0) = (3, 3, 0), of length 32≈4.243\sqrt2 \approx 4.24 — longer than u\mathbf u itself, which has length 33. No shadow is longer than the object. The shortcut (u⋅v) v(\mathbf u\cdot\mathbf v)\,\mathbf v is correct only when ∣v∣=1|\mathbf v| = 1.

Try it
Try it: split (4, 2, 1) along (2, 0, 1)

Write u=(4,2,1)\mathbf u = (4, 2, 1) as a vector parallel to v=(2,0,1)\mathbf v = (2, 0, 1) plus a vector perpendicular to v\mathbf v.

Show the answer

First the two dot products: u⋅v=8+0+1=9\mathbf u\cdot\mathbf v = 8 + 0 + 1 = 9 and v⋅v=5\mathbf v\cdot\mathbf v = 5. The parallel part is 95(2,0,1)=(185,0,95)\tfrac95(2, 0, 1) = \left(\tfrac{18}{5}, 0, \tfrac95\right). The perpendicular part is what is left: (4−185, 2, 1−95)=(25,2,−45)\left(4 - \tfrac{18}{5},\ 2,\ 1 - \tfrac95\right) = \left(\tfrac25, 2, -\tfrac45\right). Check it against v\mathbf v: 25⋅2+0−45=0\tfrac25\cdot2 + 0 - \tfrac45 = 0, and the two parts add back to (4,2,1)(4, 2, 1).

Triple Products and Volume

Tip
The scalar triple product is a volume

For three vectors, u⋅(v×w)=det⁡(u1u2u3v1v2v3w1w2w3)\mathbf u\cdot(\mathbf v\times\mathbf w) = \det\begin{pmatrix}u_1 & u_2 & u_3\\ v_1 & v_2 & v_3\\ w_1 & w_2 & w_3\end{pmatrix}. Its absolute value is the volume of the parallelepiped with edges u,v,w\mathbf u, \mathbf v, \mathbf w, and it is 00 exactly when the three vectors lie in one plane through the origin.

Why: v×w\mathbf v\times\mathbf w is perpendicular to the base parallelogram and its length is the base area. Dotting it with u\mathbf u multiplies that area by the component of u\mathbf u along the normal, which is the height of the solid, so the result is base times height. If u\mathbf u lies in the plane of v\mathbf v and w\mathbf w, the height is zero and so is the volume. The sign records orientation: positive when u,v,w\mathbf u, \mathbf v, \mathbf w are arranged like the thumb, index and middle fingers of a right hand.

Example
Example: a slanted box
uvw
The parallelepiped on (1,2,0)(1,2,0), (0,1,3)(0,1,3), (2,0,1)(2,0,1): volume 1313.

Find the volume of the parallelepiped on u=(1,2,0)\mathbf u = (1, 2, 0), v=(0,1,3)\mathbf v = (0, 1, 3), w=(2,0,1)\mathbf w = (2, 0, 1). First the base normal: v×w=(1⋅1−3⋅0, 3⋅2−0⋅1, 0⋅0−1⋅2)=(1,6,−2)\mathbf v\times\mathbf w = (1\cdot1 - 3\cdot0,\ 3\cdot2 - 0\cdot1,\ 0\cdot0 - 1\cdot2) = (1, 6, -2).

Then dot with u\mathbf u to multiply by the height: u⋅(v×w)=1+12+0=13\mathbf u\cdot(\mathbf v\times\mathbf w) = 1 + 12 + 0 = 13, so the volume is 1313. Cross-check with the determinant expanded along its first row: 1(1⋅1−3⋅0)−2(0⋅1−3⋅2)+0=1+12=131(1\cdot1 - 3\cdot0) - 2(0\cdot1 - 3\cdot2) + 0 = 1 + 12 = 13. Two routes, one number.

Example
Example: coplanar or not?

Do (1,2,3)(1, 2, 3), (4,5,6)(4, 5, 6), (7,8,9)(7, 8, 9) lie in one plane through the origin? The determinant is 1(45−48)−2(36−42)+3(32−35)=−3+12−9=01(45 - 48) - 2(36 - 42) + 3(32 - 35) = -3 + 12 - 9 = 0.

Zero volume, so yes: the three are coplanar, and indeed (7,8,9)=2(4,5,6)−(1,2,3)(7, 8, 9) = 2(4, 5, 6) - (1, 2, 3). Change the last entry to 1010: the determinant becomes 1(50−48)−2(40−42)+3(32−35)=2+4−9=−31(50 - 48) - 2(40 - 42) + 3(32 - 35) = 2 + 4 - 9 = -3, so (1,2,3)(1,2,3), (4,5,6)(4,5,6), (7,8,10)(7,8,10) span a solid of volume 33. One changed entry turns a flat triple into a genuine solid, which is why this test is done with exact arithmetic, not by eye.

Side note
Where it goes wrong

Reordering the vectors flips the sign: for the slanted box, u⋅(w×v)=−13\mathbf u\cdot(\mathbf w\times\mathbf v) = -13, because w×v=−(v×w)\mathbf w\times\mathbf v = -(\mathbf v\times\mathbf w). That is not an arithmetic error, but −13-13 is not a volume; the volume is ∣u⋅(v×w)∣=13|\mathbf u\cdot(\mathbf v\times\mathbf w)| = 13. Worse is writing (u⋅v)×w(\mathbf u\cdot\mathbf v)\times\mathbf w: u⋅v\mathbf u\cdot\mathbf v is a number, and a number cannot be crossed with a vector. The brackets in u⋅(v×w)\mathbf u\cdot(\mathbf v\times\mathbf w) are the only ones that make sense.

Try it
Try it: a tetrahedron inside a cube

The points O=(0,0,0)O = (0,0,0), A=(1,1,0)A = (1,1,0), B=(0,1,1)B = (0,1,1), C=(1,0,1)C = (1,0,1) are alternate corners of the unit cube. A tetrahedron has one sixth of the volume of the parallelepiped on the same three edges. Find the volume of OABCOABC.

Show the answer

Take the edges from OO: OB→×OC→=(0,1,1)×(1,0,1)=(1⋅1−1⋅0, 1⋅1−0⋅1, 0⋅0−1⋅1)=(1,1,−1)\overrightarrow{OB}\times\overrightarrow{OC} = (0,1,1)\times(1,0,1) = (1\cdot1 - 1\cdot0,\ 1\cdot1 - 0\cdot1,\ 0\cdot0 - 1\cdot1) = (1, 1, -1). Dot with OA→=(1,1,0)\overrightarrow{OA} = (1, 1, 0): 1+1+0=21 + 1 + 0 = 2. The parallelepiped has volume 22, so the tetrahedron has volume 26=13\tfrac26 = \tfrac13. This regular tetrahedron fills exactly a third of the cube; the four corners cut off are tetrahedra of volume 16\tfrac16 each, and 13+4⋅16=1\tfrac13 + 4\cdot\tfrac16 = 1.

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 u−v\mathbf u - \mathbf v: ∣u−v∣2=∣u∣2+∣v∣2−2∣u∣∣v∣cos⁡θ|\mathbf u - \mathbf v|^2 = |\mathbf u|^2 + |\mathbf v|^2 - 2|\mathbf u||\mathbf v|\cos\theta.

Reminder — Law of Cosines:  c2=a2+b2−2abcos⁡Cc^{2}=a^{2}+b^{2}-2ab\cos C

Expand the left side coordinate-wise: ∣u−v∣2=∑(ui−vi)2=∣u∣2−2∑uivi+∣v∣2|\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 ∣u∣2|\mathbf u|^2 and ∣v∣2|\mathbf v|^2 terms cancel and ∑uivi=∣u∣∣v∣cos⁡θ\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 ∣v∣sin⁡θ|\mathbf v|\sin\theta, so its area is ∣u∣∣v∣sin⁡θ|\mathbf u||\mathbf v|\sin\theta.

Now compute ∣u×v∣2|\mathbf u\times\mathbf v|^2 from the component formula; the Lagrange identity gives ∣u×v∣2=∣u∣2∣v∣2−(u⋅v)2=∣u∣2∣v∣2(1−cos⁡2θ)=(∣u∣∣v∣sin⁡θ)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, 0≤∣u+tv∣2=∣u∣2+2t(u⋅v)+t2∣v∣20 \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(u⋅v)2−4∣u∣2∣v∣2≤04(\mathbf u\cdot\mathbf v)^2 - 4|\mathbf u|^2|\mathbf v|^2 \le 0.

Rearranged, ∣u⋅v∣≤∣u∣∣v∣|\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
xyu = (3, 1)v = (1, 2)u + v = (4, 3)
Both routes — u\mathbf u then v\mathbf v, or v\mathbf v then u\mathbf u (dashed) — end at (4,3)(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 u−v\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
θu = (4, 1)v = (1, 3)
θ≈57.5∘\theta \approx 57.5^\circ: acute, so u⋅v=7\mathbf u\cdot\mathbf v = 7 is positive.

Draw both vectors from one point and the angle θ\theta between them is captured algebraically by u⋅v=∣u∣∣v∣cos⁡θ\mathbf u\cdot\mathbf v = |\mathbf u||\mathbf v|\cos\theta. For u=(4,1)\mathbf u = (4, 1) and v=(1,3)\mathbf v = (1, 3): cos⁡θ=4+317 10=7170\cos\theta = \dfrac{4 + 3}{\sqrt{17}\,\sqrt{10}} = \dfrac{7}{\sqrt{170}}, so θ≈57.5∘\theta \approx 57.5^\circ.

Reading the picture: when θ\theta is small the vectors reinforce and the dot product is large and positive; as θ\theta passes 90∘90^\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
vuproj
The shadow of u=(2,3)\mathbf u = (2, 3) on the line of v=(4,1)\mathbf v = (4, 1); the dashed remainder meets that line at a right angle.

The vector labelled projvu\mathrm{proj}_{\mathbf v}\mathbf u is the shadow of u\mathbf u on the line through v\mathbf v — the projection projvu=u⋅vv⋅vv\mathrm{proj}_{\mathbf v}\mathbf u = \dfrac{\mathbf u\cdot\mathbf v}{\mathbf v\cdot\mathbf v}\mathbf v. For u=(2,3)\mathbf u = (2, 3) and v=(4,1)\mathbf v = (4, 1): u⋅v=11\mathbf u\cdot\mathbf v = 11 and v⋅v=17\mathbf v\cdot\mathbf v = 17, so projvu=1117(4,1)=(4417,1117)\mathrm{proj}_{\mathbf v}\mathbf u = \tfrac{11}{17}(4, 1) = \left(\tfrac{44}{17}, \tfrac{11}{17}\right).

The dashed segment is what remains, u−projvu=(−1017,4017)\mathbf u - \mathrm{proj}_{\mathbf v}\mathbf u = \left(-\tfrac{10}{17}, \tfrac{40}{17}\right), 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. Here the check is one line: (−1017)(4)+4017(1)=0\left(-\tfrac{10}{17}\right)(4) + \tfrac{40}{17}(1) = 0, and the remainder has length 1017≈2.43\tfrac{10}{\sqrt{17}} \approx 2.43, the distance from the point (2,3)(2, 3) to the line through (4,1)(4, 1).

Concept
The cross product in 3D: perpendicular, with area for length
xyzuvu × v
(2,0,0)×(0,1,1)=(0,−2,2)(2,0,0)\times(0,1,1) = (0,-2,2) leaves the shaded parallelogram at a right angle to both edges.

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, ∣u∣∣v∣sin⁡θ|\mathbf u||\mathbf v|\sin\theta: parallel vectors span no area and give the zero vector, perpendicular ones give the maximum ∣u∣∣v∣|\mathbf u||\mathbf v|. Normal vectors to planes, torque, and area computations all read straight off this picture. For example u=(2,0,0)\mathbf u = (2, 0, 0) and v=(0,1,1)\mathbf v = (0, 1, 1) give u×v=(0,−2,2)\mathbf u\times\mathbf v = (0, -2, 2), of length 22=∣u∣∣v∣sin⁡90∘=2⋅22\sqrt2 = |\mathbf u||\mathbf v|\sin 90^\circ = 2\cdot\sqrt2.

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: u⋅v=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=a⋅v+b⋅v(\mathbf a + \mathbf b)\cdot\mathbf v = \mathbf a\cdot\mathbf v + \mathbf b\cdot\mathbf v, straight from distributing the products), it gives u⋅u=∣u∣2\mathbf u\cdot\mathbf u = |\mathbf u|^2 (agreement with yourself is total), and — the theorem proved on the proof slide — it equals ∣u∣∣v∣cos⁡θ|\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: 3⋅5+4⋅12+0⋅0=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⁡θ=u⋅v∣u∣∣v∣=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=(u2v3−u3v2,  u3v1−u1v3,  u1v2−u2v1)=(1⋅0−0⋅3,  0⋅1−2⋅0,  2⋅3−1⋅1)=(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 ∣u∣∣v∣sin⁡θ=50⋅12=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.