Linear Algebra – Dot & Cross Product Lecture Notes

Administrative & Logistical Notes

  • All material is provided under Section 113P of the Australian Copyright Act 1968 – do not redistribute.

  • Maths Drop-in Centre: Mon–Fri, Weeks 1-12, 2-4 pm, ground floor of the Mathematical Sciences Institute building.

    • Bring any mathematics question; staff are waiting to help.

  • Slides policy

    • Un-annotated slides go up before lecture; annotated slides (cleaned-up for typos/drawing quality) uploaded afterwards.


Recap: Vector Addition & Scaling

  • Previously learnt how to add vectors and multiply by scalars.

  • Today: two ways to multiply vectors:

    1. Dot product (ab\mathbf a\cdot\mathbf b) – produces a scalar.

    2. Cross product (a×b\mathbf a\times\mathbf b) – produces a vector (and works only in R3\mathbb R^3).


Dot Product (Stewart 10.3)

Definition

  • For u=(u<em>1,u</em>2,u<em>3),  v=(v</em>1,v<em>2,v</em>3)R3\mathbf u=(u<em>1,u</em>2,u<em>3),\;\mathbf v=(v</em>1,v<em>2,v</em>3)\in \mathbb R^3
    uv=u<em>1v</em>1+u<em>2v</em>2+u<em>3v</em>3.\mathbf u\cdot\mathbf v \,=\, u<em>1v</em>1+u<em>2v</em>2+u<em>3v</em>3.

  • Extends to any equal dimension nn by summing component-wise products.

  • Output is a scalar (number).

Basic Algebraic Properties (usable facts)

  1. uv=vu\mathbf u\cdot\mathbf v = \mathbf v\cdot\mathbf u (commutative).

  2. u(v+w)=uv+uw\mathbf u\cdot(\mathbf v+\mathbf w)=\mathbf u\cdot\mathbf v+\mathbf u\cdot\mathbf w (distributive).

  3. (cu)v=c(uv)(c\mathbf u)\cdot\mathbf v = c\,(\mathbf u\cdot\mathbf v) for any scalar cc.

  4. uu=u2.\mathbf u\cdot\mathbf u = |\mathbf u|^{2}.

  5. u=uu|\mathbf u|=\sqrt{\mathbf u\cdot\mathbf u} – links dot product with length.

Geometric Interpretation: Angle Formula

  • If θ\theta is the smaller angle (0θπ0\le\theta\le\pi) between non-zero a,b\mathbf a,\mathbf b then
    ab=abcosθ.\mathbf a\cdot\mathbf b = |\mathbf a|\,|\mathbf b|\,\cos\theta.
    Equivalently,
    cosθ=abab.\cos\theta = \frac{\mathbf a\cdot\mathbf b}{|\mathbf a|\,|\mathbf b|}.

  • Because cosθ\cos\theta is injective on [0,π][0,\pi], the ratio determines a unique θ\theta.

Cauchy–Schwarz (special case here)
  • 1abab1.-1\le \frac{\mathbf a\cdot\mathbf b}{|\mathbf a|\,|\mathbf b|}\le 1.
    Ensures the above formula always legitimate.

Signs & Orthogonality

Using the cosine graph on [0,π][0,\pi]:

  • \mathbf a\cdot\mathbf b>0 ⟺ 0<\theta<\tfrac\pi2 (acute).

  • ab=0\mathbf a\cdot\mathbf b=0θ=π2\theta=\tfrac\pi2 or one vector is 0\mathbf0.

    • Definition: vectors are orthogonal / perpendicular ⇔ their dot product is zero.

  • \mathbf a\cdot\mathbf b<0 ⟺ \tfrac\pi2<\theta<\pi (obtuse).

Worked Examples

  • Example 1: uamp;=(1,2,3) vamp;=(2,4,1)\begin{aligned}\mathbf u&amp;=(1,2,3)\ \mathbf v&amp;=(-2,4,1)\end{aligned}
    uv=1(2)+2(4)+3(1)=9.\mathbf u\cdot\mathbf v = 1(-2)+2(4)+3(1)=9.

  • Example 2 (orthogonality test): a=(2,2,1),  b=(5,4,2).\mathbf a=(2,2,-1),\;\mathbf b=(5,-4,2).
    ab=25+2(4)+(1)2=1082=0    ab.\mathbf a\cdot\mathbf b=2\cdot5+2(-4)+(-1)\cdot2=10-8-2=0\;\Rightarrow\; \mathbf a\perp\mathbf b.

Projection Concepts

Scalar (signed) Projection
  • Component of b\mathbf b along a\mathbf a: compab=aba.\operatorname{comp}_{\mathbf a}\mathbf b = \frac{\mathbf a\cdot\mathbf b}{|\mathbf a|}.

    • Positive if pointing roughly same way as a\mathbf a, negative if opposite.

Vector Projection
  • Actual shadow vector on the line spanned by a\mathbf a: projab=(aba2)a.\operatorname{proj}_{\mathbf a}\mathbf b = \left(\frac{\mathbf a\cdot\mathbf b}{|\mathbf a|^{2}}\right)\mathbf a.

    • Obtained by multiplying scalar projection by the unit vector aa\dfrac{\mathbf a}{|\mathbf a|}.

Quick geometric cases
  • Parallel, same direction → projection equals b\mathbf b.

  • Parallel, opposite direction → projection equals b-\mathbf b.

  • Orthogonal → projection is zero vector.

Interpretations & Uses

  • ab\mathbf a\cdot\mathbf b measures how much b\mathbf b points along a\mathbf a (or vice-versa, symmetry).

  • In physics: determines work done, component of a force along a direction, etc.

  • Computation-friendly: only adds/multiplies; ideal for programming.


Cross Product (Stewart 10.4)

Definition (works only in R3\mathbb R^3)

For a=(a<em>1,a</em>2,a<em>3),  b=(b</em>1,b<em>2,b</em>3)\mathbf a=(a<em>1,a</em>2,a<em>3),\;\mathbf b=(b</em>1,b<em>2,b</em>3),
a×b=(a<em>2b</em>3a<em>3b</em>2,  a<em>3b</em>1a<em>1b</em>3,  a<em>1b</em>2a<em>2b</em>1).\mathbf a\times\mathbf b = \bigl(a<em>2 b</em>3 - a<em>3 b</em>2,\; a<em>3 b</em>1 - a<em>1 b</em>3,\; a<em>1 b</em>2 - a<em>2 b</em>1\bigr).

  • Output is a vector.

  • Also defined in R7\mathbb R^7 (advanced topic), not in other dimensions.

Determinant Mnemonic (cofactor expansion)

\mathbf a\times\mathbf b = \begin{vmatrix}
\mathbf\hat i & \mathbf\hat j & \mathbf\hat k\
a1 & a2 & a3\ b1 & b2 & b3\end{vmatrix}
(Caveat: matrix contains basis vectors – purely a memory aid, not rigorous matrix algebra.)

Key Properties

  • Orthogonality: a×ba\mathbf a\times\mathbf b\perp\mathbf a and a×bb.\mathbf a\times\mathbf b\perp\mathbf b.

  • Anti-commutative: a×b=b×a.\mathbf a\times\mathbf b = -\,\mathbf b\times\mathbf a.

  • Distributive: a×(b+c)=a×b+a×c.\mathbf a\times(\mathbf b+\mathbf c)=\mathbf a\times\mathbf b+\mathbf a\times\mathbf c.

  • Scalar interaction: (ca)×b=c(a×b).(c\mathbf a)\times\mathbf b = c(\mathbf a\times\mathbf b).

Length & Angle Relationship

  • If θ\theta is the smaller angle between non-zero a,b\mathbf a,\mathbf b:
    a×b=absinθ.|\mathbf a\times\mathbf b| = |\mathbf a|\,|\mathbf b|\,\sin\theta.
    Hence
    sinθ=a×bab.\sin\theta = \frac{|\mathbf a\times\mathbf b|}{|\mathbf a|\,|\mathbf b|}.

  • Consequences

    • Cross‐product magnitude is maximal when θ=π2\theta=\tfrac\pi2 (vectors orthogonal).

    • Zero when vectors are parallel or anti-parallel.

Right-Hand Rule (orientation)

  • Point fingers along a\mathbf a, curl towards b\mathbf b; thumb indicates a×b.\mathbf a\times\mathbf b.

  • Reversing order reverses direction.

Area Interpretation

  • Parallelogram spanned by a,b\mathbf a,\mathbf b has area
    Area=a×b.\text{Area}=|\mathbf a\times\mathbf b|.

  • Useful for computing surface normals, torque, magnetic force, etc.

Example Sketch (exercise)

Let a=(1,0,2),  b=(3,1,1).\mathbf a=(1,0,2),\;\mathbf b=(3,1,-1). Compute using determinant mnemonic.


Dot vs Cross – Comparative Table

  • Dot → scalar, cos angle, measures alignment.

  • Cross → vector, sin angle, produces perpendicular direction & area.

  • Dot zero ⇒ orthogonal; Cross magnitude maximal ⇒ orthogonal.

  • Dot commutative; Cross anti-commutative.


Additional Observations & Star Tasks ★

  • ★ Geometric proofs: verify each dot-product property using the parallelogram law & cosine rule.

  • ★ Planes in R3\mathbb R^3: show two non-collinear vectors define one plane; collinear vectors define infinitely many – connect to angle discussion.

  • ★ Why swapping a,b\mathbf a,\mathbf b in projection formulas still holds (dot symmetry).

  • ★ Research: why only R3\mathbb R^3 and R7\mathbb R^7 admit a binary vector product with similar properties.


Practical Tips for Assignments & MATLAB Grader

  • Enter exact symbolic answers (e.g. arccos(2/(338))\arccos\bigl(2/(3\sqrt{38})\bigr)) – avoid intermediate decimal rounding.

  • Remember compab\operatorname{comp}_{\mathbf a}\mathbf b may be negative; indicate sign explicitly.

  • Always check “zero” answers: is it numeric 0 or the zero vector? (MATLAB distinguishes.)


Quick Reference Formula Sheet

  • ab=<em>i=1na</em>ibi.\mathbf a\cdot\mathbf b = \sum<em>{i=1}^{n} a</em>i b_i.

  • cosθ=abab.\cos\theta = \dfrac{\mathbf a\cdot\mathbf b}{|\mathbf a|\,|\mathbf b|}.

  • compab=aba.\operatorname{comp}_{\mathbf a}\mathbf b = \dfrac{\mathbf a\cdot\mathbf b}{|\mathbf a|}.

  • projab=(aba2)a.\operatorname{proj}_{\mathbf a}\mathbf b = \left(\dfrac{\mathbf a\cdot\mathbf b}{|\mathbf a|^{2}}\right)\mathbf a.

  • a×b=(a<em>2b</em>3a<em>3b</em>2,  a<em>3b</em>1a<em>1b</em>3,  a<em>1b</em>2a<em>2b</em>1).\mathbf a\times\mathbf b = (a<em>2 b</em>3-a<em>3 b</em>2,\;a<em>3 b</em>1-a<em>1 b</em>3,\;a<em>1 b</em>2-a<em>2 b</em>1).

  • a×b=absinθ.|\mathbf a\times\mathbf b| = |\mathbf a|\,|\mathbf b|\,\sin\theta.

  • Areaparallelogram=a×b.\text{Area}_{\text{parallelogram}} = |\mathbf a\times\mathbf b|.


Suggested Practice

  1. Compute angles between random 3-D vectors using dot-product formula.

  2. Given a triangle in R3\mathbb R^3, find normal vector via cross product.

  3. Verify Cauchy–Schwarz numerically on several vector pairs.

  4. Decompose a force vector into components parallel and perpendicular to a surface normal.

Happy studying – master these tools; they recur in multivariable calculus, physics, computer graphics, and beyond!