Skip to content
VidiMaster it, module by module
Module 4/Inner Products & Orthonormal Bases

Inner Products, Norms & Angles

An inner product turns two vectors into a single scalar, and from it we build the norm ∥v∥=⟨v,v⟩\|v\|=\sqrt{\langle v,v\rangle} — unlocking length, distance, the Cauchy–Schwarz inequality, orthogonality, the Pythagorean theorem, and the angle cos⁡θ=u⋅v∥u∥ ∥v∥\cos\theta=\dfrac{u\cdot v}{\|u\|\,\|v\|} between vectors.

Before you start — give these a try

Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.

True or false: the vectors u=(1,2,2)Tu=(1,2,2)^T and v=(2,1,−2)Tv=(2,1,-2)^T are orthogonal.

Find the unit vector u^\hat u in the direction of v=(2,3,6)Tv=(2,3,6)^T. Give the components as decimals (to 3 places).

What you’ll be able to do

  • State the four axioms of an inner product (Definition 8.1) — additivity and homogeneity in the first slot, symmetry, and positive definiteness — and recognise that symmetry forces linearity in the second slot too, making the map bilinear.
  • Apply the Cauchy–Schwarz inequality (Lemma 8.1) ⟨u,v⟩2≤⟨u,u⟩⟨v,v⟩\langle u,v\rangle^2\le\langle u,u\rangle\langle v,v\rangle, equivalently ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u,v\rangle|\le\|u\|\,\|v\|, and know that equality holds exactly when uu and vv are parallel.
  • State the norm axioms (Definition 8.2) and use Theorem 8.1 to form the induced norm ∥v∥=⟨v,v⟩\|v\|=\sqrt{\langle v,v\rangle}, specialising to the dot product (Definition 8.3) and the Euclidean norm ∥v∥=v12+⋯+vn2\|v\|=\sqrt{v_1^2+\cdots+v_n^2} (Definition 8.4).
  • Use Definition 8.5 to test orthogonality (u⋅v=0u\cdot v=0), measure length and distance d(u,v)=∥u−v∥d(u,v)=\|u-v\|, and normalise a nonzero vector to the unit vector u^=1∥v∥v\hat u=\frac{1}{\|v\|}v (Remark 8.2).
  • Apply the Pythagorean theorem (Theorem 8.3) ∥x+y∥2=∥x∥2+∥y∥2  ⟺  x⊥y\|x+y\|^2=\|x\|^2+\|y\|^2\iff x\perp y and compute the angle between vectors via cos⁡θ=u⋅v∥u∥ ∥v∥\cos\theta=\dfrac{u\cdot v}{\|u\|\,\|v\|} (Definition 8.6).

In your course

· MATH2015 · Linear Algebra & Probability
§8.1 Inner products and norms
  • Definition 8.1Inner product
    A map ⟨⋅,⋅⟩:V×V→R\langle\cdot,\cdot\rangle:V\times V\to\mathbb{R} that is additive and homogeneous in the first slot, symmetric, and positive definite (⟨u,u⟩≥0\langle u,u\rangle\ge 0, with ⟨u,u⟩=0  ⟺  u=0\langle u,u\rangle=0\iff u=0).
  • Lemma 8.1Cauchy–Schwarz inequality
    ⟨u,v⟩2≤⟨u,u⟩⟨v,v⟩\langle u,v\rangle^2\le\langle u,u\rangle\langle v,v\rangle, equivalently ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u,v\rangle|\le\|u\|\,\|v\|; equality holds iff uu and vv are parallel.
  • Definition 8.2Norm
    A map ∥⋅∥:V→R\|\cdot\|:V\to\mathbb{R} with ∥λv∥=∣λ∣ ∥v∥\|\lambda v\|=|\lambda|\,\|v\|, the triangle inequality ∥u+v∥≤∥u∥+∥v∥\|u+v\|\le\|u\|+\|v\|, and ∥v∥=0  ⟺  v=0\|v\|=0\iff v=0.
  • Theorem 8.1Norm induced by an inner product
    If VV is a real inner product space, then ∥v∥=⟨v,v⟩\|v\|=\sqrt{\langle v,v\rangle} is a norm on VV.
  • Definition 8.3Dot product on Rn\mathbb{R}^n
    u⋅v=uTv=u1v1+⋯+unvnu\cdot v=u^Tv=u_1v_1+\cdots+u_nv_n.
  • Theorem 8.2The dot product is an inner product
    The dot product on Rn\mathbb{R}^n satisfies the four inner-product axioms.
  • Definition 8.4Euclidean norm
    ∥v∥=v⋅v=v12+⋯+vn2\|v\|=\sqrt{v\cdot v}=\sqrt{v_1^2+\cdots+v_n^2}, the norm induced by the dot product (also written ∥⋅∥2\|\cdot\|_2).
  • Remark 8.1Not every norm comes from an inner product
    The taxicab norm ∥v∥1=∣v1∣+⋯+∣vn∣\|v\|_1=|v_1|+\cdots+|v_n| and the maximum norm ∥v∥∞=max⁡i∣vi∣\|v\|_\infty=\max_i|v_i| are norms not induced by any inner product.
  • Definition 8.5Orthogonality, length, unit vector, distance
    u⊥v  ⟺  u⋅v=0u\perp v\iff u\cdot v=0; length ∥v∥=v⋅v\|v\|=\sqrt{v\cdot v}; uu is a unit vector iff ∥u∥=1\|u\|=1; distance d(u,v)=∥u−v∥d(u,v)=\|u-v\|.
  • Theorem 8.3Pythagorean theorem
    For x,y∈Rnx,y\in\mathbb{R}^n, ∥x+y∥2=∥x∥2+∥y∥2  ⟺  x⊥y\|x+y\|^2=\|x\|^2+\|y\|^2\iff x\perp y.
  • Definition 8.6Angle between vectors
    The unique angle θ∈[0,π]\theta\in[0,\pi] with cos⁡θ=x⋅y∥x∥ ∥y∥\cos\theta=\dfrac{x\cdot y}{\|x\|\,\|y\|}.
Unless another inner product is specified, the default is the dot product and its Euclidean norm; both length and angle depend on the choice of inner product (Remark 8.3).
1

Inner products: multiplying two vectors into a scalar

Let VV be a real vector space. An inner product (or scalar product) is a map ⟨⋅,⋅⟩:V×V→R\langle\cdot,\cdot\rangle:V\times V\to\mathbb{R} that assigns a real number to a pair of vectors and satisfies four axioms for all u,v,w∈Vu,v,w\in V and all λ∈R\lambda\in\mathbb{R} (Definition 8.1): (1) additivity in the first slot, ⟨u+v,w⟩=⟨u,w⟩+⟨v,w⟩\langle u+v,w\rangle=\langle u,w\rangle+\langle v,w\rangle; (2) homogeneity in the first slot, ⟨λu,v⟩=λ⟨u,v⟩\langle\lambda u,v\rangle=\lambda\langle u,v\rangle; (3) symmetry, ⟨u,v⟩=⟨v,u⟩\langle u,v\rangle=\langle v,u\rangle; and (4) positive definiteness, ⟨u,u⟩≥0\langle u,u\rangle\ge 0 with ⟨u,u⟩=0  ⟺  u=0\langle u,u\rangle=0\iff u=0. A space carrying such a map is an inner product space. Because of symmetry, linearity in the first slot automatically yields linearity in the second (⟨u,v+w⟩=⟨u,v⟩+⟨u,w⟩\langle u,v+w\rangle=\langle u,v\rangle+\langle u,w\rangle and ⟨u,λv⟩=λ⟨u,v⟩\langle u,\lambda v\rangle=\lambda\langle u,v\rangle), so an inner product is bilinear. Inner products need not be the dot product: on R2\mathbb{R}^2 the weighted formula ⟨v,w⟩=2v1w1+5v2w2\langle v,w\rangle=2v_1w_1+5v_2w_2 is a genuine inner product (Example 8.1), since it is bilinear, symmetric, and ⟨v,v⟩=2v12+5v22>0\langle v,v\rangle=2v_1^2+5v_2^2>0 whenever v≠0v\neq 0.

2

From inner products to norms: Cauchy–Schwarz and the Euclidean norm

A norm ∥⋅∥:V→R\|\cdot\|:V\to\mathbb{R} measures length. By Definition 8.2 it satisfies ∥λv∥=∣λ∣ ∥v∥\|\lambda v\|=|\lambda|\,\|v\| (scaling), the triangle inequality ∥u+v∥≤∥u∥+∥v∥\|u+v\|\le\|u\|+\|v\|, and ∥v∥=0  ⟺  v=0\|v\|=0\iff v=0. Theorem 8.1 says every inner product induces a norm by ∥v∥=⟨v,v⟩,\|v\|=\sqrt{\langle v,v\rangle}, which is well defined because positive definiteness makes ⟨v,v⟩≥0\langle v,v\rangle\ge 0. The only delicate axiom is the triangle inequality, and it follows from the Cauchy–Schwarz inequality (Lemma 8.1), which in norm notation reads ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u,v\rangle|\le\|u\|\,\|v\|. The central example is the dot product on Rn\mathbb{R}^n, u⋅v=uTv=u1v1+⋯+unvnu\cdot v=u^Tv=u_1v_1+\cdots+u_nv_n (Definition 8.3), which is an inner product (Theorem 8.2); its induced norm is the Euclidean norm ∥v∥=v⋅v=v12+⋯+vn2\|v\|=\sqrt{v\cdot v}=\sqrt{v_1^2+\cdots+v_n^2} (Definition 8.4), sometimes written ∥⋅∥2\|\cdot\|_2. Not every norm comes from an inner product, however: the taxicab norm ∥v∥1=∣v1∣+⋯+∣vn∣\|v\|_1=|v_1|+\cdots+|v_n| and the maximum norm ∥v∥∞=max⁡i∣vi∣\|v\|_\infty=\max_i|v_i| are perfectly good norms with no underlying inner product (Remark 8.1).

3

Geometry: orthogonality, length, unit vectors, and distance

With the dot product in hand, Definition 8.5 imports the familiar Euclidean geometry into Rn\mathbb{R}^n. Two vectors are orthogonal (perpendicular), written u⊥vu\perp v, exactly when their dot product vanishes: u⊥v  ⟺  u⋅v=0.u\perp v\iff u\cdot v=0. The length (or magnitude) of vv is ∥v∥=v⋅v\|v\|=\sqrt{v\cdot v}, and vv is a unit vector when its length is 11, equivalently v⋅v=1v\cdot v=1. The distance between two vectors is the length of their difference, d(u,v)=∥u−v∥d(u,v)=\|u-v\|. Two facts are worth memorising (Remark 8.2): the zero vector is orthogonal to every vector, since 0⋅v=00\cdot v=0; and any nonzero vv can be normalised into a unit vector pointing the same way, u^=1∥v∥ v.\hat u=\frac{1}{\|v\|}\,v. For instance v=(3,4)Tv=(3,4)^T has ∥v∥=9+16=5\|v\|=\sqrt{9+16}=5, so its unit vector is (35,45)T\left(\tfrac35,\tfrac45\right)^T.

4

The Pythagorean theorem and the angle between vectors

Expanding a squared norm with bilinearity gives ∥x+y∥2=(x+y)⋅(x+y)=∥x∥2+2(x⋅y)+∥y∥2\|x+y\|^2=(x+y)\cdot(x+y)=\|x\|^2+2(x\cdot y)+\|y\|^2. The cross term 2(x⋅y)2(x\cdot y) disappears precisely when x⊥yx\perp y, which is the Pythagorean theorem (Theorem 8.3): ∥x+y∥2=∥x∥2+∥y∥2  ⟺  x⊥y.\|x+y\|^2=\|x\|^2+\|y\|^2\iff x\perp y. Cauchy–Schwarz also lets us define angles. For nonzero x,yx,y it guarantees −1≤x⋅y∥x∥ ∥y∥≤1-1\le\dfrac{x\cdot y}{\|x\|\,\|y\|}\le 1, so there is a unique angle 0≤θ≤π0\le\theta\le\pi with cos⁡θ=x⋅y∥x∥ ∥y∥\cos\theta=\frac{x\cdot y}{\|x\|\,\|y\|} (Definition 8.6); orthogonal vectors meet at θ=90∘\theta=90^\circ, where the cosine is 00. For example x=(1,0,1)Tx=(1,0,1)^T and y=(0,1,1)Ty=(0,1,1)^T give x⋅y=1x\cdot y=1 and ∥x∥=∥y∥=2\|x\|=\|y\|=\sqrt2, so cos⁡θ=12\cos\theta=\tfrac12 and θ=60∘\theta=60^\circ. Remark 8.3 cautions that both length and angle depend on the chosen inner product — switch to a weighted inner product and the same two vectors generally subtend a different angle.

Lemma 8.1 — Cauchy–Schwarz inequality

In a real inner product space VV, every u,v∈Vu,v\in V satisfy ⟨u,v⟩2≤⟨u,u⟩⟨v,v⟩\langle u,v\rangle^2\le\langle u,u\rangle\langle v,v\rangle, equivalently ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u,v\rangle|\le\|u\|\,\|v\|. Equality holds if and only if uu and vv are parallel.

Intuition. If uu or vv is zero, both sides are 00. Otherwise the quadratic p(t)=⟨tu+v, tu+v⟩=⟨u,u⟩t2+2⟨u,v⟩t+⟨v,v⟩p(t)=\langle tu+v,\,tu+v\rangle=\langle u,u\rangle t^2+2\langle u,v\rangle t+\langle v,v\rangle is ≥0\ge 0 for every real tt by positive definiteness, so it cannot have two distinct real roots: its discriminant 4(⟨u,v⟩2−⟨u,u⟩⟨v,v⟩)4\big(\langle u,v\rangle^2-\langle u,u\rangle\langle v,v\rangle\big) must be ≤0\le 0, giving the inequality. The discriminant is 00 exactly when pp has a root t0t_0 with t0u+v=0t_0u+v=0, i.e. when uu and vv are parallel.
Theorem 8.1 — A norm induced by an inner product

If VV is a real inner product space, then ∥v∥=⟨v,v⟩\|v\|=\sqrt{\langle v,v\rangle} defines a norm on VV.

Intuition. Positive definiteness makes ⟨v,v⟩≥0\langle v,v\rangle\ge 0, so the square root is real and vanishes only when v=0v=0 (norm axiom 3). Scaling is direct: ∥λv∥=⟨λv,λv⟩=λ2⟨v,v⟩=∣λ∣ ∥v∥\|\lambda v\|=\sqrt{\langle\lambda v,\lambda v\rangle}=\sqrt{\lambda^2\langle v,v\rangle}=|\lambda|\,\|v\|. The triangle inequality is the only subtle part and drops straight out of Cauchy–Schwarz: ∥u+v∥2=∥u∥2+2⟨u,v⟩+∥v∥2≤∥u∥2+2∥u∥∥v∥+∥v∥2=(∥u∥+∥v∥)2\|u+v\|^2=\|u\|^2+2\langle u,v\rangle+\|v\|^2\le\|u\|^2+2\|u\|\|v\|+\|v\|^2=(\|u\|+\|v\|)^2.
Theorem 8.2 — The dot product is an inner product

The dot product u⋅v=uTv=u1v1+⋯+unvnu\cdot v=u^Tv=u_1v_1+\cdots+u_nv_n on Rn\mathbb{R}^n (Definition 8.3) satisfies all four inner-product axioms; the norm it induces is the Euclidean norm ∥v∥=v12+⋯+vn2\|v\|=\sqrt{v_1^2+\cdots+v_n^2} (Definition 8.4).

Intuition. Bilinearity and symmetry are immediate from the formula — each side is a sum of products uiviu_iv_i, symmetric in uu and vv and linear in each argument. Positive definiteness is the key point: v⋅v=v12+⋯+vn2v\cdot v=v_1^2+\cdots+v_n^2 is a sum of squares, so it is always ≥0\ge 0 and equals 00 only when every vi=0v_i=0, i.e. v=0v=0.
Theorem 8.3 — Pythagorean theorem

For x,y∈Rnx,y\in\mathbb{R}^n, ∥x+y∥2=∥x∥2+∥y∥2\|x+y\|^2=\|x\|^2+\|y\|^2 if and only if x⊥yx\perp y (that is, x⋅y=0x\cdot y=0).

Intuition. Expand with bilinearity: ∥x+y∥2=(x+y)⋅(x+y)=∥x∥2+2(x⋅y)+∥y∥2\|x+y\|^2=(x+y)\cdot(x+y)=\|x\|^2+2(x\cdot y)+\|y\|^2. The clean identity ∥x+y∥2=∥x∥2+∥y∥2\|x+y\|^2=\|x\|^2+\|y\|^2 holds exactly when the cross term 2(x⋅y)2(x\cdot y) is zero, i.e. when xx and yy are orthogonal — the nn-dimensional version of the right-triangle relation a2+b2=c2a^2+b^2=c^2.

Worked examples

Example 1

Let x=(1,0,1)Tx=(1,0,1)^T and y=(0,1,1)Ty=(0,1,1)^T in R3\mathbb{R}^3. Find the dot product x⋅yx\cdot y, the Euclidean norms ∥x∥\|x\| and ∥y∥\|y\|, and the angle θ\theta between xx and yy (in degrees).

  1. 1

    Dot product (Definition 8.3): x⋅y=(1)(0)+(0)(1)+(1)(1)=1x\cdot y=(1)(0)+(0)(1)+(1)(1)=1.

  2. 2

    Euclidean norms (Definition 8.4): ∥x∥=12+02+12=2\|x\|=\sqrt{1^2+0^2+1^2}=\sqrt2 and ∥y∥=02+12+12=2\|y\|=\sqrt{0^2+1^2+1^2}=\sqrt2.

  3. 3

    Angle (Definition 8.6): cos⁡θ=x⋅y∥x∥ ∥y∥=12⋅2=12\cos\theta=\dfrac{x\cdot y}{\|x\|\,\|y\|}=\dfrac{1}{\sqrt2\cdot\sqrt2}=\dfrac12.

  4. 4

    Invert the cosine: θ=arccos⁡12=60∘\theta=\arccos\tfrac12=60^\circ.

Answer. x⋅y=1x\cdot y=1, ∥x∥=∥y∥=2\|x\|=\|y\|=\sqrt2, and θ=60∘\theta=60^\circ (since cos⁡θ=12\cos\theta=\tfrac12).
Example 2

Let u=(3,4)Tu=(3,4)^T and w=(−8,6)Tw=(-8,6)^T in R2\mathbb{R}^2. (a) Find ∥u∥\|u\|. (b) Find the unit vector u^\hat u in the direction of uu. (c) Show uu and ww are orthogonal. (d) Find the distance d(u,w)d(u,w).

Example 3

Equip R2\mathbb{R}^2 with the weighted inner product ⟨v,w⟩=2v1w1+5v2w2\langle v,w\rangle=2v_1w_1+5v_2w_2 (Example 8.1). For v=(1,2)Tv=(1,2)^T and w=(3,−1)Tw=(3,-1)^T, compute ⟨v,w⟩\langle v,w\rangle, the induced norms ∥v∥\|v\| and ∥w∥\|w\|, and verify the Cauchy–Schwarz inequality.