Ein frei kopier- und anpassbares Lehrmittel von eduskript.org

Vectors

A vector has magnitude and direction: a=(a1,a2,a3)\vec{a} = (a_1, a_2, a_3), a=a12+a22+a32|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}. Physics runs on two products of vectors — one gives a scalar, one gives a vector.

Dot product

ab=a1b1+a2b2+a3b3=abcosθ\vec{a} \cdot \vec{b} = a_1 b_1 + a_2 b_2 + a_3 b_3 = |\vec{a}|\,|\vec{b}|\cos\theta

  • Scalar result.
  • ab=0    \vec{a} \cdot \vec{b} = 0 \iff perpendicular.
  • Projection of a\vec{a} onto b\vec{b}: abb\dfrac{\vec{a} \cdot \vec{b}}{|\vec{b}|}.
  • Physics: work W=FsW = \vec{F} \cdot \vec{s}.

Worked example. Angle between a=(1,2,2)\vec{a} = (1, 2, 2) and b=(2,2,1)\vec{b} = (2, -2, 1):

ab=24+2=0θ=90°\vec{a} \cdot \vec{b} = 2 - 4 + 2 = 0 \Rightarrow \theta = 90°

No cosine computation needed — a zero dot product ends the discussion.

Exercise 3.1

Given u=(3,1,2)\vec{u} = (3, -1, 2) and v=(1,4,2)\vec{v} = (1, 4, -2):

a) Compute uv\vec{u} \cdot \vec{v} and u|\vec{u}|, v|\vec{v}|.

b) Compute cosθ\cos\theta and state whether θ\theta is acute or obtuse.

c) Find the projection of u\vec{u} onto v\vec{v} (scalar projection).

d) Find a nonzero vector perpendicular to u\vec{u} (any valid one).

…or hover here and press Ctrl+V to paste a screenshot

Cross product

a×b=e1e2e3a1a2a3b1b2b3=(a2b3a3b2,  a3b1a1b3,  a1b2a2b1)\vec{a} \times \vec{b} = \begin{vmatrix} \vec{e}_1 & \vec{e}_2 & \vec{e}_3 \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix} = (a_2 b_3 - a_3 b_2,\; a_3 b_1 - a_1 b_3,\; a_1 b_2 - a_2 b_1)

  • Vector result, perpendicular to both factors; direction by right-hand rule.
  • a×b=absinθ|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta = area of the parallelogram they span.
  • Anticommutative: b×a=a×b\vec{b} \times \vec{a} = -\,\vec{a} \times \vec{b}.
  • Physics: torque τ=r×F\vec{\tau} = \vec{r} \times \vec{F}, Lorentz force F=qv×B\vec{F} = q\vec{v} \times \vec{B}.

Worked example. a=(1,0,2)\vec{a} = (1, 0, 2), b=(0,3,1)\vec{b} = (0, 3, -1):

a×b=(0(1)23,  201(1),  1300)=(6,1,3)\vec{a} \times \vec{b} = (0 \cdot (-1) - 2 \cdot 3,\; 2 \cdot 0 - 1 \cdot (-1),\; 1 \cdot 3 - 0 \cdot 0) = (-6, 1, 3)

Check: (6,1,3)(1,0,2)=6+0+6=0(-6,1,3) \cdot (1,0,2) = -6 + 0 + 6 = 0. ✓

Exercise 3.2

Given u=(2,1,0)\vec{u} = (2, 1, 0) and v=(1,1,3)\vec{v} = (1, -1, 3):

a) Compute u×v\vec{u} \times \vec{v}.

b) Verify your result is perpendicular to u\vec{u} (dot product).

c) Area of the parallelogram spanned by u\vec{u} and v\vec{v}.

d) Compute v×u\vec{v} \times \vec{u} without redoing the determinant.

…or hover here and press Ctrl+V to paste a screenshot

Geometric interpretation

Everything above in one picture: the dot product measures alignment (projection), the cross product measures spanned area and gives the normal.

PythonLoading editor…
import numpy as np
import matplotlib.pyplot as plt

u = np.array([3.0, 1.0])   # edit me
v = np.array([1.0, 2.5])   # edit me

proj = (u @ v) / (v @ v) * v            # vector projection of u onto v
area = abs(u[0]*v[1] - u[1]*v[0])       # |cross| in 2D

ax = plt.gca()
for vec, c, name in [(u,'C0','u'), (v,'C1','v'), (proj,'C2','proj_v u')]:
    ax.quiver(0, 0, vec[0], vec[1], angles='xy', scale_units='xy', scale=1, color=c, label=name)
ax.plot([u[0], proj[0]], [u[1], proj[1]], 'k:')
ax.set_xlim(-1, 4); ax.set_ylim(-1, 4); ax.set_aspect('equal')
ax.legend(); ax.grid(True)
ax.set_title(f'u·v = {u@v:.2f}   parallelogram area = {area:.2f}')
plt.show()

Exercise 3.3

Work these geometrically — sketch by hand where it helps:

a) The points A=(1,0,0)A = (1,0,0), B=(0,2,0)B = (0,2,0), C=(0,0,3)C = (0,0,3) form a triangle. Compute its area via a cross product.

b) For which value of tt are (t,2,1)(t, 2, 1) and (4,t,2)(4, t, -2) perpendicular?

c) A force F=(5,0,0)\vec{F} = (5, 0, 0) N acts on a lever arm r=(0.2,0.3,0)\vec{r} = (0.2, 0.3, 0) m. Compute the torque τ=r×F\vec{\tau} = \vec{r} \times \vec{F} and interpret its direction physically.

…or hover here and press Ctrl+V to paste a screenshot